diff --git a/sub/subService.go b/sub/subService.go
index 332f8150..ddf9692b 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -20,6 +20,7 @@ type SubService struct {
address string
showInfo bool
remarkModel string
+ datepicker string
inboundService service.InboundService
settingService service.SettingService
}
@@ -39,6 +40,10 @@ func (s *SubService) GetSubs(subId string, host string, showInfo bool) ([]string
if err != nil {
s.remarkModel = "-ieo"
}
+ s.datepicker, err = s.settingService.GetDatepicker()
+ if err != nil {
+ s.datepicker = "gregorian"
+ }
for _, inbound := range inbounds {
clients, err := s.inboundService.GetClients(inbound)
if err != nil {
diff --git a/web/assets/js/model/setting.js b/web/assets/js/model/setting.js
index 86bea983..3ddddb18 100644
--- a/web/assets/js/model/setting.js
+++ b/web/assets/js/model/setting.js
@@ -12,6 +12,7 @@ class AllSetting {
this.expireDiff = "";
this.trafficDiff = "";
this.remarkModel = "-ieo";
+ this.datepicker = "gregorian";
this.tgBotEnable = false;
this.tgBotToken = "";
this.tgBotChatId = "";
diff --git a/web/entity/entity.go b/web/entity/entity.go
index 69e5b2d4..5b09400c 100644
--- a/web/entity/entity.go
+++ b/web/entity/entity.go
@@ -47,6 +47,7 @@ type AllSetting struct {
SubEncrypt bool `json:"subEncrypt" form:"subEncrypt"`
SubShowInfo bool `json:"subShowInfo" form:"subShowInfo"`
SubURI string `json:"subURI" form:"subURI"`
+ Datepicker string `json:"datepicker" form:"datepicker"`
}
func (s *AllSetting) CheckValid() error {
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html
index 75e9bf6b..c951bc8d 100644
--- a/web/html/xui/client_bulk_modal.html
+++ b/web/html/xui/client_bulk_modal.html
@@ -104,8 +104,10 @@
-
+
@@ -234,6 +236,9 @@
get delayedExpireDays() {
return this.clientsBulkModal.expiryTime < 0 ? this.clientsBulkModal.expiryTime / -86400000 : 0;
},
+ get datepicker() {
+ return app.datepicker;
+ },
set delayedExpireDays(days) {
this.clientsBulkModal.expiryTime = -86400000 * days;
},
diff --git a/web/html/xui/client_modal.html b/web/html/xui/client_modal.html
index 1bc48a6a..4b270607 100644
--- a/web/html/xui/client_modal.html
+++ b/web/html/xui/client_modal.html
@@ -94,6 +94,9 @@
get isEdit() {
return this.clientModal.isEdit;
},
+ get datepicker() {
+ return app.datepicker;
+ },
get isTrafficExhausted() {
if (!clientStats) return false
if (clientStats.total <= 0) return false
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html
index dff1dd5c..f6335915 100644
--- a/web/html/xui/form/client.html
+++ b/web/html/xui/form/client.html
@@ -150,8 +150,10 @@
-
+
Expired
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
index 6f0480c3..5da8ec56 100644
--- a/web/html/xui/form/inbound.html
+++ b/web/html/xui/form/inbound.html
@@ -54,9 +54,11 @@
-
+
diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html
index f7f9d727..ab42e09c 100644
--- a/web/html/xui/inbound_modal.html
+++ b/web/html/xui/inbound_modal.html
@@ -63,6 +63,9 @@
get client() {
return inModal.inbound.clients[0];
},
+ get datepicker() {
+ return app.datepicker;
+ },
get delayedExpireDays() {
return this.client && this.client.expiryTime < 0 ? this.client.expiryTime / -86400000 : 0;
},
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 2be031e5..8d1da2f4 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -446,6 +446,7 @@
{{template "component/themeSwitcher" .}}
+{{template "component/persianDatepicker" .}}