Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit d95c4f0

Browse files
authored
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
1 parent 1c58d11 commit d95c4f0

File tree

13 files changed

+28
-28
lines changed

13 files changed

+28
-28
lines changed

.github/workflows/auto_lang.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,33 @@ jobs:
3333
- name: Checkout alist
3434
uses: actions/checkout@v4
3535
with:
36-
path: alist
36+
path: openlist
3737

38-
- name: Checkout alist-web
38+
- name: Checkout openlist-frontend
3939
uses: actions/checkout@v4
4040
with:
41-
repository: 'alist-org/alist-web'
41+
repository: 'OpenListTeam/OpenList-Frontend'
4242
ref: main
4343
persist-credentials: false
4444
fetch-depth: 0
45-
path: alist-web
45+
path: OpenList-Frontend
4646

4747
- name: Generate lang
4848
run: |
49-
cd alist
49+
cd openlist
5050
go run ./main.go lang
5151
cd ..
5252
5353
- name: Copy lang file
5454
run: |
55-
cp -f ./alist/lang/*.json ./alist-web/src/lang/en/ 2>/dev/null || :
55+
cp -f ./openlist/lang/*.json ./OpenList-Frontend/src/lang/en/ 2>/dev/null || :
5656
5757
- name: Commit git
5858
run: |
59-
cd alist-web
59+
cd OpenList-Frontend
6060
git add .
61-
git config --local user.email "bot@nn.ci"
62-
git config --local user.name "IlaBot"
61+
git config --local user.email "bot@openlist.team"
62+
git config --local user.name "The OpenList Bot"
6363
git commit -m "chore: auto update i18n file" -a 2>/dev/null || :
6464
cd ..
6565
@@ -68,5 +68,5 @@ jobs:
6868
with:
6969
github_token: ${{ secrets.MY_TOKEN }}
7070
branch: main
71-
directory: alist-web
72-
repository: alist-org/alist-web
71+
directory: OpenList-Frontend
72+
repository: OpenListTeam/OpenList-Frontend

cmd/lang.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func convert(s string) string {
3939
}
4040

4141
func writeFile(name string, data interface{}) {
42-
f, err := os.Open(fmt.Sprintf("../alist-web/src/lang/en/%s.json", name))
42+
f, err := os.Open(fmt.Sprintf("../OpenList-Frontend/src/lang/en/%s.json", name))
4343
if err != nil {
4444
log.Errorf("failed to open %s.json: %+v", name, err)
4545
return

drivers/123/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (d *Pan123) login() error {
163163
SetHeaders(map[string]string{
164164
"origin": "https://www.123pan.com",
165165
"referer": "https://www.123pan.com/",
166-
"user-agent": "Dart/2.19(dart:io)-alist",
166+
"user-agent": "Dart/2.19(dart:io)-openlist",
167167
"platform": "web",
168168
"app-version": "3",
169169
//"user-agent": base.UserAgent,
@@ -202,7 +202,7 @@ do:
202202
"origin": "https://www.123pan.com",
203203
"referer": "https://www.123pan.com/",
204204
"authorization": "Bearer " + d.AccessToken,
205-
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
205+
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) openlist-client",
206206
"platform": "web",
207207
"app-version": "3",
208208
//"user-agent": base.UserAgent,

drivers/123_share/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (d *Pan123Share) request(url string, method string, callback base.ReqCallba
6161
"origin": "https://www.123pan.com",
6262
"referer": "https://www.123pan.com/",
6363
"authorization": "Bearer " + d.AccessToken,
64-
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
64+
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) opnelist-client",
6565
"platform": "web",
6666
"app-version": "3",
6767
//"user-agent": base.UserAgent,

drivers/dropbox/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Addition struct {
1313
RefreshToken string `json:"refresh_token" required:"true"`
1414
driver.RootPath
1515

16-
OauthTokenURL string `json:"oauth_token_url" default:"https://api.xhofe.top/alist/dropbox/token"`
16+
OauthTokenURL string `json:"oauth_token_url" default:"https://api.example.com/alist/dropbox/token"` // TODO: Replace this with a community hosted api endpoint
1717
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
1818
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
1919

drivers/github_releases/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
type Addition struct {
99
driver.RootID
10-
RepoStructure string `json:"repo_structure" type:"text" required:"true" default:"alistGo/alist" help:"structure:[path:]org/repo"`
10+
RepoStructure string `json:"repo_structure" type:"text" required:"true" default:"OpenListTeam/OpenList-Frontend" help:"structure:[path:]org/repo"`
1111
ShowReadme bool `json:"show_readme" type:"bool" default:"true" help:"show README、LICENSE file"`
1212
Token string `json:"token" type:"string" required:"false" help:"GitHub token, if you want to access private repositories or increase the rate limit"`
1313
ShowAllVersion bool `json:"show_all_version" type:"bool" default:"false" help:"show all versions"`

drivers/lenovonas_share/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (d *LenovoNasShare) request(url string, method string, callback base.ReqCal
1313
req.SetHeaders(map[string]string{
1414
"origin": "https://siot-share.lenovo.com.cn",
1515
"referer": "https://siot-share.lenovo.com.cn/",
16-
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) alist-client",
16+
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) openlist-client",
1717
"platform": "web",
1818
"app-version": "3",
1919
})

drivers/url_tree/meta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Addition struct {
1010
// driver.RootPath
1111
// driver.RootID
1212
// define other
13-
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"`
13+
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"`
1414
HeadSize bool `json:"head_size" type:"bool" default:"false" help:"Use head method to get file size, but it may be failed."`
1515
Writable bool `json:"writable" type:"bool" default:"false"`
1616
}

internal/bootstrap/data/setting.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ func InitialSettings() []model.SettingItem {
9696
{Key: conf.VERSION, Value: conf.Version, Type: conf.TypeString, Group: model.SITE, Flag: model.READONLY},
9797
//{Key: conf.ApiUrl, Value: "", Type: conf.TypeString, Group: model.SITE},
9898
//{Key: conf.BasePath, Value: "", Type: conf.TypeString, Group: model.SITE},
99-
{Key: conf.SiteTitle, Value: "AList", Type: conf.TypeString, Group: model.SITE},
99+
{Key: conf.SiteTitle, Value: "OpenList", Type: conf.TypeString, Group: model.SITE},
100100
{Key: conf.Announcement, Value: "### repo\nhttps://github.com/OpenListTeam/OpenList", Type: conf.TypeText, Group: model.SITE},
101101
{Key: "pagination_type", Value: "all", Type: conf.TypeSelect, Options: "all,pagination,load_more,auto_load_more", Group: model.SITE},
102102
{Key: "default_page_size", Value: "30", Type: conf.TypeNumber, Group: model.SITE},
103103
{Key: conf.AllowIndexed, Value: "false", Type: conf.TypeBool, Group: model.SITE},
104104
{Key: conf.AllowMounted, Value: "true", Type: conf.TypeBool, Group: model.SITE},
105105
{Key: conf.RobotsTxt, Value: "User-agent: *\nAllow: /", Type: conf.TypeText, Group: model.SITE},
106106
// style settings
107-
{Key: conf.Logo, Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeText, Group: model.STYLE},
108-
{Key: conf.Favicon, Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeString, Group: model.STYLE},
107+
{Key: conf.Logo, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg", Type: conf.TypeText, Group: model.STYLE},
108+
{Key: conf.Favicon, Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg", Type: conf.TypeString, Group: model.STYLE},
109109
{Key: conf.MainColor, Value: "#1890ff", Type: conf.TypeString, Group: model.STYLE},
110110
{Key: "home_icon", Value: "🏠", Type: conf.TypeString, Group: model.STYLE},
111111
{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 {
138138
// {Key: conf.PdfViewers, Value: `{
139139
// "pdf.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$url"
140140
//}`, Type: conf.TypeText, Group: model.PREVIEW},
141-
{Key: "audio_cover", Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeString, Group: model.PREVIEW},
141+
{Key: "audio_cover", Value: "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg", Type: conf.TypeString, Group: model.PREVIEW},
142142
{Key: conf.AudioAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
143143
{Key: conf.VideoAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
144144
{Key: conf.PreviewArchivesByDefault, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
@@ -155,7 +155,7 @@ func InitialSettings() []model.SettingItem {
155155
([[: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}:)
156156
(?U)access_token=(.*)&`,
157157
Type: conf.TypeText, Group: model.GLOBAL, Flag: model.PRIVATE},
158-
{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
158+
{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
159159
{Key: conf.FilenameCharMapping, Value: `{"/": "|"}`, Type: conf.TypeText, Group: model.GLOBAL},
160160
{Key: conf.ForwardDirectLinkParams, Value: "false", Type: conf.TypeBool, Group: model.GLOBAL},
161161
{Key: conf.IgnoreDirectLinkParams, Value: "sign,alist_ts", Type: conf.TypeString, Group: model.GLOBAL},

internal/model/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,5 @@ func (u *User) WebAuthnCredentials() []webauthn.Credential {
177177
}
178178

179179
func (u *User) WebAuthnIcon() string {
180-
return "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg"
180+
return "https://cdn.oplist.org/gh/OpenListTeam/Logo@main/OpenList.svg"
181181
}

0 commit comments

Comments
 (0)