Skip to content

Commit 4a91f3f

Browse files
committed
fix some link
1 parent b908742 commit 4a91f3f

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

integrations/links_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestRedirectsNoLogin(t *testing.T) {
5151
"/user2/repo1/src/master": "/user2/repo1/src/branch/master",
5252
"/user2/repo1/src/master/file.txt": "/user2/repo1/src/branch/master/file.txt",
5353
"/user2/repo1/src/master/directory/file.txt": "/user2/repo1/src/branch/master/directory/file.txt",
54-
"/user/avatar/Ghost/-1": "/img/avatar_default.png",
54+
"/user/avatar/Ghost/-1": "/assets/img/avatar_default.png",
5555
"/api/v1/swagger": "/api/swagger",
5656
}
5757
for link, redirectLink := range redirects {

models/avatar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func DefaultAvatarLink() string {
3232
return ""
3333
}
3434

35-
u.Path = path.Join(u.Path, "/img/avatar_default.png")
35+
u.Path = path.Join(u.Path, "/assets/img/avatar_default.png")
3636
return u.String()
3737
}
3838

models/oauth2.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ type OAuth2Provider struct {
2323
// key is used to map the OAuth2Provider with the goth provider type (also in LoginSource.OAuth2Config.Provider)
2424
// value is used to store display data
2525
var OAuth2Providers = map[string]OAuth2Provider{
26-
"bitbucket": {Name: "bitbucket", DisplayName: "Bitbucket", Image: "/img/auth/bitbucket.png"},
27-
"dropbox": {Name: "dropbox", DisplayName: "Dropbox", Image: "/img/auth/dropbox.png"},
28-
"facebook": {Name: "facebook", DisplayName: "Facebook", Image: "/img/auth/facebook.png"},
26+
"bitbucket": {Name: "bitbucket", DisplayName: "Bitbucket", Image: "/assets/img/auth/bitbucket.png"},
27+
"dropbox": {Name: "dropbox", DisplayName: "Dropbox", Image: "/assets/img/auth/dropbox.png"},
28+
"facebook": {Name: "facebook", DisplayName: "Facebook", Image: "/assets/img/auth/facebook.png"},
2929
"github": {
30-
Name: "github", DisplayName: "GitHub", Image: "/img/auth/github.png",
30+
Name: "github", DisplayName: "GitHub", Image: "/assets/img/auth/github.png",
3131
CustomURLMapping: &oauth2.CustomURLMapping{
3232
TokenURL: oauth2.GetDefaultTokenURL("github"),
3333
AuthURL: oauth2.GetDefaultAuthURL("github"),
@@ -36,36 +36,36 @@ var OAuth2Providers = map[string]OAuth2Provider{
3636
},
3737
},
3838
"gitlab": {
39-
Name: "gitlab", DisplayName: "GitLab", Image: "/img/auth/gitlab.png",
39+
Name: "gitlab", DisplayName: "GitLab", Image: "/assets/img/auth/gitlab.png",
4040
CustomURLMapping: &oauth2.CustomURLMapping{
4141
TokenURL: oauth2.GetDefaultTokenURL("gitlab"),
4242
AuthURL: oauth2.GetDefaultAuthURL("gitlab"),
4343
ProfileURL: oauth2.GetDefaultProfileURL("gitlab"),
4444
},
4545
},
46-
"gplus": {Name: "gplus", DisplayName: "Google", Image: "/img/auth/google.png"},
47-
"openidConnect": {Name: "openidConnect", DisplayName: "OpenID Connect", Image: "/img/auth/openid_connect.svg"},
48-
"twitter": {Name: "twitter", DisplayName: "Twitter", Image: "/img/auth/twitter.png"},
49-
"discord": {Name: "discord", DisplayName: "Discord", Image: "/img/auth/discord.png"},
46+
"gplus": {Name: "gplus", DisplayName: "Google", Image: "/assets/img/auth/google.png"},
47+
"openidConnect": {Name: "openidConnect", DisplayName: "OpenID Connect", Image: "/assets/img/auth/openid_connect.svg"},
48+
"twitter": {Name: "twitter", DisplayName: "Twitter", Image: "/assets/img/auth/twitter.png"},
49+
"discord": {Name: "discord", DisplayName: "Discord", Image: "/assets/img/auth/discord.png"},
5050
"gitea": {
51-
Name: "gitea", DisplayName: "Gitea", Image: "/img/auth/gitea.png",
51+
Name: "gitea", DisplayName: "Gitea", Image: "/assets/img/auth/gitea.png",
5252
CustomURLMapping: &oauth2.CustomURLMapping{
5353
TokenURL: oauth2.GetDefaultTokenURL("gitea"),
5454
AuthURL: oauth2.GetDefaultAuthURL("gitea"),
5555
ProfileURL: oauth2.GetDefaultProfileURL("gitea"),
5656
},
5757
},
5858
"nextcloud": {
59-
Name: "nextcloud", DisplayName: "Nextcloud", Image: "/img/auth/nextcloud.png",
59+
Name: "nextcloud", DisplayName: "Nextcloud", Image: "/assets/img/auth/nextcloud.png",
6060
CustomURLMapping: &oauth2.CustomURLMapping{
6161
TokenURL: oauth2.GetDefaultTokenURL("nextcloud"),
6262
AuthURL: oauth2.GetDefaultAuthURL("nextcloud"),
6363
ProfileURL: oauth2.GetDefaultProfileURL("nextcloud"),
6464
},
6565
},
66-
"yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/img/auth/yandex.png"},
66+
"yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/assets/img/auth/yandex.png"},
6767
"mastodon": {
68-
Name: "mastodon", DisplayName: "Mastodon", Image: "/img/auth/mastodon.png",
68+
Name: "mastodon", DisplayName: "Mastodon", Image: "/assets/img/auth/mastodon.png",
6969
CustomURLMapping: &oauth2.CustomURLMapping{
7070
AuthURL: oauth2.GetDefaultAuthURL("mastodon"),
7171
},

modules/setting/picture.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ func newRepoAvatarService() {
110110
RepoAvatar.Storage = getStorage("repo-avatars", storageType, repoAvatarSec)
111111

112112
RepoAvatar.Fallback = sec.Key("REPOSITORY_AVATAR_FALLBACK").MustString("none")
113-
RepoAvatar.FallbackImage = sec.Key("REPOSITORY_AVATAR_FALLBACK_IMAGE").MustString("/img/repo_default.png")
113+
RepoAvatar.FallbackImage = sec.Key("REPOSITORY_AVATAR_FALLBACK_IMAGE").MustString("/assets/img/repo_default.png")
114114
}

0 commit comments

Comments
 (0)