Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-05-05 00:27:57 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-05-05 00:27:57 +0300
commit32b7ada54915adc7b6f93e9fef5e468e2fe66f6a (patch)
tree340b86a6cc30e0fc841daf0d6fd2ba1605c96028 /web/html
parent6099a07ff0a3f619ace3c7645ee76dce943a97e0 (diff)
subpage: enabled state
Track and surface a subscription's enabled state from backend to frontend so the UI can show inactive subscriptions and use it in active-state logic. Changes: - sub/subService.go: track hasEnabledClient, set traffic.Enable, add Enabled to PageData and populate it in BuildPageData. - sub/subController.go: include enabled in the page context. - web/html/settings/panel/subscription/subpage.html: emit data-enabled attribute and render an "inactive" tag when disabled. - web/assets/js/subscription.js: read data-enabled and include it in isActive() checks. This ensures subscriptions with no enabled clients are marked inactive in the UI and excluded from being considered active.
Diffstat (limited to 'web/html')
-rw-r--r--web/html/settings/panel/subscription/subpage.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/html/settings/panel/subscription/subpage.html b/web/html/settings/panel/subscription/subpage.html
index 48f0ecfb..adfbea93 100644
--- a/web/html/settings/panel/subscription/subpage.html
+++ b/web/html/settings/panel/subscription/subpage.html
@@ -153,7 +153,10 @@
app.sId
]]</a-descriptions-item>
<a-descriptions-item label='{{ i18n "subscription.status" }}'>
- <template v-if="isUnlimited">
+ <template v-if="!app.enabled">
+ <a-tag color="red">{{ i18n "subscription.inactive" }}</a-tag>
+ </template>
+ <template v-else-if="isUnlimited">
<a-tag color="purple">{{ i18n
"subscription.unlimited" }}</a-tag>
</template>
@@ -275,7 +278,7 @@
data-subclash-url="{{ .subClashUrl }}" data-download="{{ .download }}" data-upload="{{ .upload }}"
data-used="{{ .used }}" data-total="{{ .total }}" data-remained="{{ .remained }}" data-expire="{{ .expire }}"
data-lastonline="{{ .lastOnline }}" data-downloadbyte="{{ .downloadByte }}" data-uploadbyte="{{ .uploadByte }}"
- data-totalbyte="{{ .totalByte }}" data-datepicker="{{ .datepicker }}"></template>
+ data-totalbyte="{{ .totalByte }}" data-datepicker="{{ .datepicker }}" data-enabled="{{ .enabled }}"></template>
<textarea id="subscription-links" style="display:none">{{ range .result }}{{ . }}
{{ end }}</textarea>