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(),
"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 {

View file

@ -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,

View file

@ -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