minor change

This commit is contained in:
mhsanaei 2025-09-18 12:20:21 +02:00
parent c720008187
commit 8c8d280f14
No known key found for this signature in database
GPG key ID: D875CD086CF668A0
4 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ func setEmbeddedTemplates(engine *gin.Engine) error {
webpkg.EmbeddedHTML(), webpkg.EmbeddedHTML(),
"html/common/page.html", "html/common/page.html",
"html/component/aThemeSwitch.html", "html/component/aThemeSwitch.html",
"html/subscription.html", "html/settings/panel/subscription/subpage.html",
) )
if err != nil { if err != nil {
return err return err
@ -207,7 +207,7 @@ func (s *Server) getHtmlFiles() ([]string, error) {
files = append(files, theme) files = append(files, theme)
} }
// page itself // 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 { if _, err := os.Stat(page); err == nil {
files = append(files, page) files = append(files, page)
} else { } else {

View file

@ -75,7 +75,7 @@ func (a *SUBController) subs(c *gin.Context) {
// Build page data in service // Build page data in service
subURL, subJsonURL := a.subService.BuildURLs(scheme, hostWithPort, a.subPath, a.subJsonPath, subId) subURL, subJsonURL := a.subService.BuildURLs(scheme, hostWithPort, a.subPath, a.subJsonPath, subId)
page := a.subService.BuildPageData(subId, hostHeader, traffic, lastOnline, subs, subURL, subJsonURL) 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", "title": "subscription.title",
"cur_ver": config.GetVersion(), "cur_ver": config.GetVersion(),
"host": page.Host, "host": page.Host,

View file

@ -1007,7 +1007,7 @@ func searchHost(headers any) string {
return "" return ""
} }
// PageData is a view model for subscription.html // PageData is a view model for subpage.html
type PageData struct { type PageData struct {
Host string Host string
BasePath string BasePath string