diff --git a/drivers/url_tree/meta.go b/drivers/url_tree/meta.go index e298c7be..1ec57ee0 100644 --- a/drivers/url_tree/meta.go +++ b/drivers/url_tree/meta.go @@ -10,7 +10,7 @@ type Addition struct { // driver.RootPath // driver.RootID // define other - UrlStructure string `json:"url_structure" type:"text" required:"true" default:"https://cdn.oplist.org/gh/OpenListTeam/OpenList/README.md\nhttps://cdn.oplist.org/gh/OpenListTeam/OpenList/README_cn.md\nfolder:\n CONTRIBUTING.md:1635:https://cdn.oplist.org/gh/OpenListTeam/OpenList/CONTRIBUTING.md\n CODE_OF_CONDUCT.md:2093:https://cdn.oplist.org/gh/OpenListTeam/OpenList/CODE_OF_CONDUCT.md" help:"structure:FolderName:\n [FileName:][FileSize:][Modified:]Url"` + UrlStructure string `json:"url_structure" type:"text" required:"true" default:"https://raw.githubusercontent.com/OpenListTeam/OpenList/main/README.md\nhttps://raw.githubusercontent.com/OpenListTeam/OpenList/main/README_cn.md\nfolder:\n CONTRIBUTING.md:1635:https://raw.githubusercontent.com/OpenListTeam/OpenList/main/CONTRIBUTING.md\n CODE_OF_CONDUCT.md:2093:https://raw.githubusercontent.com/OpenListTeam/OpenList/main/CODE_OF_CONDUCT.md" help:"structure:FolderName:\n [FileName:][FileSize:][Modified:]Url"` HeadSize bool `json:"head_size" type:"bool" default:"false" help:"Use head method to get file size, but it may be failed."` Writable bool `json:"writable" type:"bool" default:"false"` } diff --git a/internal/bootstrap/data/setting.go b/internal/bootstrap/data/setting.go index d4dc9121..4718b844 100644 --- a/internal/bootstrap/data/setting.go +++ b/internal/bootstrap/data/setting.go @@ -107,8 +107,8 @@ func InitialSettings() []model.SettingItem { {Key: conf.AllowMounted, Value: "true", Type: conf.TypeBool, Group: model.SITE}, {Key: conf.RobotsTxt, Value: "User-agent: *\nAllow: /", Type: conf.TypeText, Group: model.SITE}, // style settings - {Key: conf.Logo, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeText, Group: model.STYLE}, - {Key: conf.Favicon, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeString, Group: model.STYLE}, + {Key: conf.Logo, Value: "https://res.oplist.org/logo/logo.svg", MigrationValue: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeText, Group: model.STYLE}, + {Key: conf.Favicon, Value: "https://res.oplist.org/logo/logo.svg", MigrationValue: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeString, Group: model.STYLE}, {Key: conf.MainColor, Value: "#1890ff", Type: conf.TypeString, Group: model.STYLE}, {Key: "home_icon", Value: "🏠", Type: conf.TypeString, Group: model.STYLE}, {Key: "home_container", Value: "max_980px", Type: conf.TypeSelect, Options: "max_980px,hope_container", Group: model.STYLE}, @@ -141,7 +141,7 @@ func InitialSettings() []model.SettingItem { // {Key: conf.PdfViewers, Value: `{ // "pdf.js":"https://openlistteam.github.io/pdf.js/web/viewer.html?file=$url" //}`, Type: conf.TypeText, Group: model.PREVIEW}, - {Key: "audio_cover", Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeString, Group: model.PREVIEW}, + {Key: "audio_cover", Value: "https://res.oplist.org/logo/logo.svg", MigrationValue: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg", Type: conf.TypeString, Group: model.PREVIEW}, {Key: conf.AudioAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW}, {Key: conf.VideoAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW}, {Key: conf.PreviewArchivesByDefault, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW}, diff --git a/internal/model/user.go b/internal/model/user.go index 65188558..78fa33b6 100644 --- a/internal/model/user.go +++ b/internal/model/user.go @@ -185,5 +185,5 @@ func (u *User) WebAuthnCredentials() []webauthn.Credential { } func (u *User) WebAuthnIcon() string { - return "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg" + return "https://res.oplist.org/logo/logo.svg" } diff --git a/server/static/static.go b/server/static/static.go index b415f109..29f97ff7 100644 --- a/server/static/static.go +++ b/server/static/static.go @@ -116,10 +116,10 @@ func UpdateIndex() { mainColor := setting.GetStr(conf.MainColor) utils.Log.Debug("Applying replacements for default pages...") replaceMap1 := map[string]string{ - "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.svg": favicon, - "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/logo.png": logo, - "Loading...": title, - "main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor), + "https://res.oplist.org/logo/logo.svg": favicon, + "https://res.oplist.org/logo/logo.png": logo, + "Loading...": title, + "main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor), } conf.ManageHtml = replaceStrings(conf.RawIndexHtml, replaceMap1) utils.Log.Debug("Applying replacements for manage pages...")