mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
chore: change the CDN link of the logo and modify the OCR port (#84)
* Change the CDN link of the logo and modify the OCR port * Update * Rollback OCR interface
This commit is contained in:
22
.github/workflows/auto_lang.yml
vendored
22
.github/workflows/auto_lang.yml
vendored
@ -33,33 +33,33 @@ jobs:
|
||||
- name: Checkout alist
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: alist
|
||||
path: openlist
|
||||
|
||||
- name: Checkout alist-web
|
||||
- name: Checkout openlist-frontend
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'alist-org/alist-web'
|
||||
repository: 'OpenListTeam/OpenList-Frontend'
|
||||
ref: main
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
path: alist-web
|
||||
path: OpenList-Frontend
|
||||
|
||||
- name: Generate lang
|
||||
run: |
|
||||
cd alist
|
||||
cd openlist
|
||||
go run ./main.go lang
|
||||
cd ..
|
||||
|
||||
- name: Copy lang file
|
||||
run: |
|
||||
cp -f ./alist/lang/*.json ./alist-web/src/lang/en/ 2>/dev/null || :
|
||||
cp -f ./openlist/lang/*.json ./OpenList-Frontend/src/lang/en/ 2>/dev/null || :
|
||||
|
||||
- name: Commit git
|
||||
run: |
|
||||
cd alist-web
|
||||
cd OpenList-Frontend
|
||||
git add .
|
||||
git config --local user.email "bot@nn.ci"
|
||||
git config --local user.name "IlaBot"
|
||||
git config --local user.email "bot@openlist.team"
|
||||
git config --local user.name "The OpenList Bot"
|
||||
git commit -m "chore: auto update i18n file" -a 2>/dev/null || :
|
||||
cd ..
|
||||
|
||||
@ -68,5 +68,5 @@ jobs:
|
||||
with:
|
||||
github_token: ${{ secrets.MY_TOKEN }}
|
||||
branch: main
|
||||
directory: alist-web
|
||||
repository: alist-org/alist-web
|
||||
directory: OpenList-Frontend
|
||||
repository: OpenListTeam/OpenList-Frontend
|
||||
|
@ -39,7 +39,7 @@ func convert(s string) string {
|
||||
}
|
||||
|
||||
func writeFile(name string, data interface{}) {
|
||||
f, err := os.Open(fmt.Sprintf("../alist-web/src/lang/en/%s.json", name))
|
||||
f, err := os.Open(fmt.Sprintf("../OpenList-Frontend/src/lang/en/%s.json", name))
|
||||
if err != nil {
|
||||
log.Errorf("failed to open %s.json: %+v", name, err)
|
||||
return
|
||||
|
@ -163,7 +163,7 @@ func (d *Pan123) login() error {
|
||||
SetHeaders(map[string]string{
|
||||
"origin": "https://www.123pan.com",
|
||||
"referer": "https://www.123pan.com/",
|
||||
"user-agent": "Dart/2.19(dart:io)-alist",
|
||||
"user-agent": "Dart/2.19(dart:io)-openlist",
|
||||
"platform": "web",
|
||||
"app-version": "3",
|
||||
//"user-agent": base.UserAgent,
|
||||
@ -202,7 +202,7 @@ do:
|
||||
"origin": "https://www.123pan.com",
|
||||
"referer": "https://www.123pan.com/",
|
||||
"authorization": "Bearer " + d.AccessToken,
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) openlist-client",
|
||||
"platform": "web",
|
||||
"app-version": "3",
|
||||
//"user-agent": base.UserAgent,
|
||||
|
@ -61,7 +61,7 @@ func (d *Pan123Share) request(url string, method string, callback base.ReqCallba
|
||||
"origin": "https://www.123pan.com",
|
||||
"referer": "https://www.123pan.com/",
|
||||
"authorization": "Bearer " + d.AccessToken,
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) opnelist-client",
|
||||
"platform": "web",
|
||||
"app-version": "3",
|
||||
//"user-agent": base.UserAgent,
|
||||
|
@ -13,7 +13,7 @@ type Addition struct {
|
||||
RefreshToken string `json:"refresh_token" required:"true"`
|
||||
driver.RootPath
|
||||
|
||||
OauthTokenURL string `json:"oauth_token_url" default:"https://api.xhofe.top/alist/dropbox/token"`
|
||||
OauthTokenURL string `json:"oauth_token_url" default:"https://api.example.com/alist/dropbox/token"` // TODO: Replace this with a community hosted api endpoint
|
||||
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
|
||||
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
|
||||
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Addition struct {
|
||||
driver.RootID
|
||||
RepoStructure string `json:"repo_structure" type:"text" required:"true" default:"alistGo/alist" help:"structure:[path:]org/repo"`
|
||||
RepoStructure string `json:"repo_structure" type:"text" required:"true" default:"OpenListTeam/OpenList-Frontend" help:"structure:[path:]org/repo"`
|
||||
ShowReadme bool `json:"show_readme" type:"bool" default:"true" help:"show README、LICENSE file"`
|
||||
Token string `json:"token" type:"string" required:"false" help:"GitHub token, if you want to access private repositories or increase the rate limit"`
|
||||
ShowAllVersion bool `json:"show_all_version" type:"bool" default:"false" help:"show all versions"`
|
||||
|
@ -13,7 +13,7 @@ func (d *LenovoNasShare) request(url string, method string, callback base.ReqCal
|
||||
req.SetHeaders(map[string]string{
|
||||
"origin": "https://siot-share.lenovo.com.cn",
|
||||
"referer": "https://siot-share.lenovo.com.cn/",
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
|
||||
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) openlist-client",
|
||||
"platform": "web",
|
||||
"app-version": "3",
|
||||
})
|
||||
|
@ -10,7 +10,7 @@ type Addition struct {
|
||||
// driver.RootPath
|
||||
// driver.RootID
|
||||
// define other
|
||||
UrlStructure string `json:"url_structure" type:"text" required:"true" default:"https://jsd.nn.ci/gh/OpenListTeam/OpenList/README.md\nhttps://jsd.nn.ci/gh/OpenListTeam/OpenList/README_cn.md\nfolder:\n CONTRIBUTING.md:1635:https://jsd.nn.ci/gh/OpenListTeam/OpenList/CONTRIBUTING.md\n CODE_OF_CONDUCT.md:2093:https://jsd.nn.ci/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://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"`
|
||||
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"`
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ func InitialSettings() []model.SettingItem {
|
||||
{Key: conf.VERSION, Value: conf.Version, Type: conf.TypeString, Group: model.SITE, Flag: model.READONLY},
|
||||
//{Key: conf.ApiUrl, Value: "", Type: conf.TypeString, Group: model.SITE},
|
||||
//{Key: conf.BasePath, Value: "", Type: conf.TypeString, Group: model.SITE},
|
||||
{Key: conf.SiteTitle, Value: "AList", Type: conf.TypeString, Group: model.SITE},
|
||||
{Key: conf.SiteTitle, Value: "OpenList", Type: conf.TypeString, Group: model.SITE},
|
||||
{Key: conf.Announcement, Value: "### repo\nhttps://github.com/OpenListTeam/OpenList", Type: conf.TypeText, Group: model.SITE},
|
||||
{Key: "pagination_type", Value: "all", Type: conf.TypeSelect, Options: "all,pagination,load_more,auto_load_more", Group: model.SITE},
|
||||
{Key: "default_page_size", Value: "30", Type: conf.TypeNumber, Group: model.SITE},
|
||||
@ -104,8 +104,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.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeText, Group: model.STYLE},
|
||||
{Key: conf.Favicon, Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeString, Group: model.STYLE},
|
||||
{Key: conf.Logo, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg", Type: conf.TypeText, Group: model.STYLE},
|
||||
{Key: conf.Favicon, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.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},
|
||||
@ -138,7 +138,7 @@ func InitialSettings() []model.SettingItem {
|
||||
// {Key: conf.PdfViewers, Value: `{
|
||||
// "pdf.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$url"
|
||||
//}`, Type: conf.TypeText, Group: model.PREVIEW},
|
||||
{Key: "audio_cover", Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeString, Group: model.PREVIEW},
|
||||
{Key: "audio_cover", Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.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},
|
||||
@ -155,7 +155,7 @@ func InitialSettings() []model.SettingItem {
|
||||
([[:xdigit:]]{1,4}(?::[[:xdigit:]]{1,4}){7}|::|:(?::[[:xdigit:]]{1,4}){1,6}|[[:xdigit:]]{1,4}:(?::[[:xdigit:]]{1,4}){1,5}|(?:[[:xdigit:]]{1,4}:){2}(?::[[:xdigit:]]{1,4}){1,4}|(?:[[:xdigit:]]{1,4}:){3}(?::[[:xdigit:]]{1,4}){1,3}|(?:[[:xdigit:]]{1,4}:){4}(?::[[:xdigit:]]{1,4}){1,2}|(?:[[:xdigit:]]{1,4}:){5}:[[:xdigit:]]{1,4}|(?:[[:xdigit:]]{1,4}:){1,6}:)
|
||||
(?U)access_token=(.*)&`,
|
||||
Type: conf.TypeText, Group: model.GLOBAL, Flag: model.PRIVATE},
|
||||
{Key: conf.OcrApi, Value: "https://api.nn.ci/ocr/file/json", Type: conf.TypeString, Group: model.GLOBAL}, // TODO: This can be replace by a community-hosted endpoint, see https://github.com/xhofe/ocr_api_server
|
||||
{Key: conf.OcrApi, Value: "https://api.example.com/ocr/file/json", Type: conf.TypeString, Group: model.GLOBAL}, // TODO: This can be replace by a community-hosted endpoint, see https://github.com/xhofe/ocr_api_server
|
||||
{Key: conf.FilenameCharMapping, Value: `{"/": "|"}`, Type: conf.TypeText, Group: model.GLOBAL},
|
||||
{Key: conf.ForwardDirectLinkParams, Value: "false", Type: conf.TypeBool, Group: model.GLOBAL},
|
||||
{Key: conf.IgnoreDirectLinkParams, Value: "sign,alist_ts", Type: conf.TypeString, Group: model.GLOBAL},
|
||||
|
@ -177,5 +177,5 @@ func (u *User) WebAuthnCredentials() []webauthn.Credential {
|
||||
}
|
||||
|
||||
func (u *User) WebAuthnIcon() string {
|
||||
return "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg"
|
||||
return "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg"
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ func (d *FtpMainDriver) ClientConnected(cc ftpserver.ClientContext) (string, err
|
||||
}
|
||||
defer d.shutdownLock.RUnlock()
|
||||
d.clients[cc.ID()] = cc
|
||||
return "AList FTP Endpoint", nil
|
||||
return "OpenList FTP Endpoint", nil
|
||||
}
|
||||
|
||||
func (d *FtpMainDriver) ClientDisconnected(cc ftpserver.ClientContext) {
|
||||
|
@ -63,7 +63,7 @@ func (a *AferoAdapter) Stat(name string) (os.FileInfo, error) {
|
||||
}
|
||||
|
||||
func (a *AferoAdapter) Name() string {
|
||||
return "AList FTP Endpoint"
|
||||
return "OpenList FTP Endpoint"
|
||||
}
|
||||
|
||||
func (a *AferoAdapter) Chmod(_ string, _ os.FileMode) error {
|
||||
|
@ -65,7 +65,7 @@ func UpdateIndex() {
|
||||
mainColor := setting.GetStr(conf.MainColor)
|
||||
conf.ManageHtml = conf.RawIndexHtml
|
||||
replaceMap1 := map[string]string{
|
||||
"https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg": favicon,
|
||||
"https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg": favicon,
|
||||
"Loading...": title,
|
||||
"main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor),
|
||||
}
|
||||
|
Reference in New Issue
Block a user