diff --git a/public/js/subscription.js b/public/js/subscription.js index e6e4909..ed2cb17 100644 --- a/public/js/subscription.js +++ b/public/js/subscription.js @@ -68,6 +68,15 @@ const component = () => { .fail((jqXHR, status) => { alert('danger', `Failed to check subscription. Error: [${jqXHR.status}] ${jqXHR.statusText}`); }); + }, + + formatRange(min, max) { + if (!isNaN(min) && isNaN(max)) return `≥ ${min}`; + if (isNaN(min) && !isNaN(max)) return `≤ ${max}`; + if (isNaN(min) && isNaN(max)) return 'All'; + + if (min === max) return `= ${min}`; + return `${min} - ${max}`; } }; }; diff --git a/src/views/subscription.html.ecr b/src/views/subscription.html.ecr index c01604e..cc96c47 100644 --- a/src/views/subscription.html.ecr +++ b/src/views/subscription.html.ecr @@ -1,58 +1,54 @@
The subscription manager uses a MangaDex API that requires authentication. Please connect to MangaDex before using this feature.
+The subscription manager uses a MangaDex API that requires authentication. Please connect to MangaDex before using this feature.
-No subscription found. Go to the MangaDex download page and start subscribing.
+No subscription found. Go to the MangaDex download page and start subscribing.
- - - + + +