Skip to content

Commit

Permalink
[chore/frontend] remove references to unused bundle.js (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmethurst authored Nov 23, 2022
1 parent 50dc179 commit 1281a9f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
11 changes: 4 additions & 7 deletions internal/web/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ func (m *Module) profileGETHandler(c *gin.Context) {
}

stylesheets := []string{
"/assets/Fork-Awesome/css/fork-awesome.min.css",
"/assets/dist/status.css",
"/assets/dist/profile.css",
assetsPathPrefix + "/Fork-Awesome/css/fork-awesome.min.css",
distPathPrefix + "/status.css",
distPathPrefix + "/profile.css",
}
if config.GetAccountsAllowCustomCSS() {
stylesheets = append(stylesheets, "/@"+account.Username+"/custom.css")
Expand All @@ -128,10 +128,7 @@ func (m *Module) profileGETHandler(c *gin.Context) {
"statuses_next": statusResp.NextLink,
"show_back_to_top": showBackToTop,
"stylesheets": stylesheets,
"javascript": []string{
"/assets/dist/bundle.js",
"/assets/dist/frontend.js",
},
"javascript": []string{distPathPrefix + "/frontend.js"},
})
}

Expand Down
14 changes: 6 additions & 8 deletions internal/web/settings-panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ func (m *Module) SettingsPanelHandler(c *gin.Context) {
"instance": instance,
"stylesheets": []string{
assetsPathPrefix + "/Fork-Awesome/css/fork-awesome.min.css",
assetsPathPrefix + "/dist/_colors.css",
assetsPathPrefix + "/dist/base.css",
assetsPathPrefix + "/dist/profile.css",
assetsPathPrefix + "/dist/status.css",
assetsPathPrefix + "/dist/settings-style.css",
},
"javascript": []string{
assetsPathPrefix + "/dist/settings.js",
distPathPrefix + "/_colors.css",
distPathPrefix + "/base.css",
distPathPrefix + "/profile.css",
distPathPrefix + "/status.css",
distPathPrefix + "/settings-style.css",
},
"javascript": []string{distPathPrefix + "/settings.js"},
})
}
9 changes: 3 additions & 6 deletions internal/web/thread.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func (m *Module) threadGETHandler(c *gin.Context) {
}

stylesheets := []string{
"/assets/Fork-Awesome/css/fork-awesome.min.css",
"/assets/dist/status.css",
assetsPathPrefix + "/Fork-Awesome/css/fork-awesome.min.css",
distPathPrefix + "/status.css",
}
if config.GetAccountsAllowCustomCSS() {
stylesheets = append(stylesheets, "/@"+username+"/custom.css")
Expand All @@ -118,10 +118,7 @@ func (m *Module) threadGETHandler(c *gin.Context) {
"context": context,
"ogMeta": ogBase(instance).withStatus(status),
"stylesheets": stylesheets,
"javascript": []string{
"/assets/dist/bundle.js",
"/assets/dist/frontend.js",
},
"javascript": []string{distPathPrefix + "/frontend.js"},
})
}

Expand Down
1 change: 1 addition & 0 deletions internal/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
rssFeedPath = profilePath + "/feed.rss"
statusPath = profilePath + "/statuses/:" + statusIDKey
assetsPathPrefix = "/assets"
distPathPrefix = assetsPathPrefix + "/dist"
userPanelPath = "/settings/user"
adminPanelPath = "/settings/admin"

Expand Down

0 comments on commit 1281a9f

Please sign in to comment.