From 8c8d280f147ce4e8f604080d1dbf066332e55efc Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 18 Sep 2025 12:20:21 +0200 Subject: minor change --- sub/sub.go | 4 +- sub/subController.go | 2 +- sub/subService.go | 2 +- web/html/settings/panel/subscription/subpage.html | 276 ++++++++++++++++++++++ web/html/subscription.html | 276 ---------------------- 5 files changed, 280 insertions(+), 280 deletions(-) create mode 100644 web/html/settings/panel/subscription/subpage.html delete mode 100644 web/html/subscription.html diff --git a/sub/sub.go b/sub/sub.go index b7e2603e..8a16120d 100644 --- a/sub/sub.go +++ b/sub/sub.go @@ -30,7 +30,7 @@ func setEmbeddedTemplates(engine *gin.Engine) error { webpkg.EmbeddedHTML(), "html/common/page.html", "html/component/aThemeSwitch.html", - "html/subscription.html", + "html/settings/panel/subscription/subpage.html", ) if err != nil { return err @@ -207,7 +207,7 @@ func (s *Server) getHtmlFiles() ([]string, error) { files = append(files, theme) } // page itself - page := filepath.Join(dir, "web", "html", "subscription.html") + page := filepath.Join(dir, "web", "html", "subpage.html") if _, err := os.Stat(page); err == nil { files = append(files, page) } else { diff --git a/sub/subController.go b/sub/subController.go index 0e16a02d..170cfa74 100644 --- a/sub/subController.go +++ b/sub/subController.go @@ -75,7 +75,7 @@ func (a *SUBController) subs(c *gin.Context) { // Build page data in service subURL, subJsonURL := a.subService.BuildURLs(scheme, hostWithPort, a.subPath, a.subJsonPath, subId) page := a.subService.BuildPageData(subId, hostHeader, traffic, lastOnline, subs, subURL, subJsonURL) - c.HTML(200, "subscription.html", gin.H{ + c.HTML(200, "subpage.html", gin.H{ "title": "subscription.title", "cur_ver": config.GetVersion(), "host": page.Host, diff --git a/sub/subService.go b/sub/subService.go index 17b05ad0..201fa09d 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -1007,7 +1007,7 @@ func searchHost(headers any) string { return "" } -// PageData is a view model for subscription.html +// PageData is a view model for subpage.html type PageData struct { Host string BasePath string diff --git a/web/html/settings/panel/subscription/subpage.html b/web/html/settings/panel/subscription/subpage.html new file mode 100644 index 00000000..c9cf241f --- /dev/null +++ b/web/html/settings/panel/subscription/subpage.html @@ -0,0 +1,276 @@ +{{ template "page/head_start" .}} + + + + + + + +{{ template "page/head_end" .}} + +{{ template "page/body_start" .}} + + + + + + + + + + + + + + + + {{ i18n + "pages.settings.subSettings"}} + + + + + + + + + + + + {{ i18n + "pages.settings.subSettings"}} + Json + + + + + + + + + + + + + + + [[ + app.sId + ]] + + + + + [[ + app.download + ]] + [[ + app.upload + ]] + [[ app.used + ]] + [[ + app.total + ]] + [[ + app.remained ]] + + + + + + + + + + + + +
+ + +
+ [[ linkName(link, idx) + ]] +
+
+
+
+ + + + + + + + + Android + + + V2Box + V2RayNG + Sing-box + V2RayTun + NPV + Tunnel + + + + + + + + iOS + + + Shadowrocket + V2Box + Streisand + V2RayTun + NPV + Tunnel + + + + + + + +
+
+
+
+
+ + + + + +{{template "component/aThemeSwitch" .}} + + +{{ template "page/body_end" .}} \ No newline at end of file diff --git a/web/html/subscription.html b/web/html/subscription.html deleted file mode 100644 index c9cf241f..00000000 --- a/web/html/subscription.html +++ /dev/null @@ -1,276 +0,0 @@ -{{ template "page/head_start" .}} - - - - - - - -{{ template "page/head_end" .}} - -{{ template "page/body_start" .}} - - - - - - - - - - - - - - - - {{ i18n - "pages.settings.subSettings"}} - - - - - - - - - - - - {{ i18n - "pages.settings.subSettings"}} - Json - - - - - - - - - - - - - - - [[ - app.sId - ]] - - - - - [[ - app.download - ]] - [[ - app.upload - ]] - [[ app.used - ]] - [[ - app.total - ]] - [[ - app.remained ]] - - - - - - - - - - - - -
- - -
- [[ linkName(link, idx) - ]] -
-
-
-
- - - - - - - - - Android - - - V2Box - V2RayNG - Sing-box - V2RayTun - NPV - Tunnel - - - - - - - - iOS - - - Shadowrocket - V2Box - Streisand - V2RayTun - NPV - Tunnel - - - - - - - -
-
-
-
-
- - - - - -{{template "component/aThemeSwitch" .}} - - -{{ template "page/body_end" .}} \ No newline at end of file -- cgit v1.2.3