mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 04:06:18 +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
|
- name: Checkout alist
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: alist
|
path: openlist
|
||||||
|
|
||||||
- name: Checkout alist-web
|
- name: Checkout openlist-frontend
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'alist-org/alist-web'
|
repository: 'OpenListTeam/OpenList-Frontend'
|
||||||
ref: main
|
ref: main
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
path: alist-web
|
path: OpenList-Frontend
|
||||||
|
|
||||||
- name: Generate lang
|
- name: Generate lang
|
||||||
run: |
|
run: |
|
||||||
cd alist
|
cd openlist
|
||||||
go run ./main.go lang
|
go run ./main.go lang
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Copy lang file
|
- name: Copy lang file
|
||||||
run: |
|
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
|
- name: Commit git
|
||||||
run: |
|
run: |
|
||||||
cd alist-web
|
cd OpenList-Frontend
|
||||||
git add .
|
git add .
|
||||||
git config --local user.email "bot@nn.ci"
|
git config --local user.email "bot@openlist.team"
|
||||||
git config --local user.name "IlaBot"
|
git config --local user.name "The OpenList Bot"
|
||||||
git commit -m "chore: auto update i18n file" -a 2>/dev/null || :
|
git commit -m "chore: auto update i18n file" -a 2>/dev/null || :
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
@ -68,5 +68,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.MY_TOKEN }}
|
github_token: ${{ secrets.MY_TOKEN }}
|
||||||
branch: main
|
branch: main
|
||||||
directory: alist-web
|
directory: OpenList-Frontend
|
||||||
repository: alist-org/alist-web
|
repository: OpenListTeam/OpenList-Frontend
|
||||||
|
@ -39,7 +39,7 @@ func convert(s string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func writeFile(name string, data interface{}) {
|
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 {
|
if err != nil {
|
||||||
log.Errorf("failed to open %s.json: %+v", name, err)
|
log.Errorf("failed to open %s.json: %+v", name, err)
|
||||||
return
|
return
|
||||||
|
@ -163,7 +163,7 @@ func (d *Pan123) login() error {
|
|||||||
SetHeaders(map[string]string{
|
SetHeaders(map[string]string{
|
||||||
"origin": "https://www.123pan.com",
|
"origin": "https://www.123pan.com",
|
||||||
"referer": "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",
|
"platform": "web",
|
||||||
"app-version": "3",
|
"app-version": "3",
|
||||||
//"user-agent": base.UserAgent,
|
//"user-agent": base.UserAgent,
|
||||||
@ -202,7 +202,7 @@ do:
|
|||||||
"origin": "https://www.123pan.com",
|
"origin": "https://www.123pan.com",
|
||||||
"referer": "https://www.123pan.com/",
|
"referer": "https://www.123pan.com/",
|
||||||
"authorization": "Bearer " + d.AccessToken,
|
"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",
|
"platform": "web",
|
||||||
"app-version": "3",
|
"app-version": "3",
|
||||||
//"user-agent": base.UserAgent,
|
//"user-agent": base.UserAgent,
|
||||||
|
@ -61,7 +61,7 @@ func (d *Pan123Share) request(url string, method string, callback base.ReqCallba
|
|||||||
"origin": "https://www.123pan.com",
|
"origin": "https://www.123pan.com",
|
||||||
"referer": "https://www.123pan.com/",
|
"referer": "https://www.123pan.com/",
|
||||||
"authorization": "Bearer " + d.AccessToken,
|
"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",
|
"platform": "web",
|
||||||
"app-version": "3",
|
"app-version": "3",
|
||||||
//"user-agent": base.UserAgent,
|
//"user-agent": base.UserAgent,
|
||||||
|
@ -13,7 +13,7 @@ type Addition struct {
|
|||||||
RefreshToken string `json:"refresh_token" required:"true"`
|
RefreshToken string `json:"refresh_token" required:"true"`
|
||||||
driver.RootPath
|
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"`
|
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"`
|
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 {
|
type Addition struct {
|
||||||
driver.RootID
|
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"`
|
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"`
|
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"`
|
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{
|
req.SetHeaders(map[string]string{
|
||||||
"origin": "https://siot-share.lenovo.com.cn",
|
"origin": "https://siot-share.lenovo.com.cn",
|
||||||
"referer": "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",
|
"platform": "web",
|
||||||
"app-version": "3",
|
"app-version": "3",
|
||||||
})
|
})
|
||||||
|
@ -10,7 +10,7 @@ type Addition struct {
|
|||||||
// driver.RootPath
|
// driver.RootPath
|
||||||
// driver.RootID
|
// driver.RootID
|
||||||
// define other
|
// 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."`
|
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"`
|
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.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.ApiUrl, Value: "", Type: conf.TypeString, Group: model.SITE},
|
||||||
//{Key: conf.BasePath, 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: 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: "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},
|
{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.AllowMounted, Value: "true", Type: conf.TypeBool, Group: model.SITE},
|
||||||
{Key: conf.RobotsTxt, Value: "User-agent: *\nAllow: /", Type: conf.TypeText, Group: model.SITE},
|
{Key: conf.RobotsTxt, Value: "User-agent: *\nAllow: /", Type: conf.TypeText, Group: model.SITE},
|
||||||
// style settings
|
// style settings
|
||||||
{Key: conf.Logo, Value: "https://cdn.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeText, 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.statically.io/gh/OpenListTeam/Logo/main/OpenList.svg", Type: conf.TypeString, 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: conf.MainColor, Value: "#1890ff", Type: conf.TypeString, Group: model.STYLE},
|
||||||
{Key: "home_icon", Value: "🏠", 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},
|
{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: `{
|
// {Key: conf.PdfViewers, Value: `{
|
||||||
// "pdf.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$url"
|
// "pdf.js":"https://alist-org.github.io/pdf.js/web/viewer.html?file=$url"
|
||||||
//}`, Type: conf.TypeText, Group: model.PREVIEW},
|
//}`, 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.AudioAutoplay, Value: "true", Type: conf.TypeBool, Group: model.PREVIEW},
|
||||||
{Key: conf.VideoAutoplay, 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},
|
{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}:)
|
([[: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=(.*)&`,
|
(?U)access_token=(.*)&`,
|
||||||
Type: conf.TypeText, Group: model.GLOBAL, Flag: model.PRIVATE},
|
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.FilenameCharMapping, Value: `{"/": "|"}`, Type: conf.TypeText, Group: model.GLOBAL},
|
||||||
{Key: conf.ForwardDirectLinkParams, Value: "false", Type: conf.TypeBool, 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},
|
{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 {
|
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()
|
defer d.shutdownLock.RUnlock()
|
||||||
d.clients[cc.ID()] = cc
|
d.clients[cc.ID()] = cc
|
||||||
return "AList FTP Endpoint", nil
|
return "OpenList FTP Endpoint", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *FtpMainDriver) ClientDisconnected(cc ftpserver.ClientContext) {
|
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 {
|
func (a *AferoAdapter) Name() string {
|
||||||
return "AList FTP Endpoint"
|
return "OpenList FTP Endpoint"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AferoAdapter) Chmod(_ string, _ os.FileMode) error {
|
func (a *AferoAdapter) Chmod(_ string, _ os.FileMode) error {
|
||||||
|
@ -65,7 +65,7 @@ func UpdateIndex() {
|
|||||||
mainColor := setting.GetStr(conf.MainColor)
|
mainColor := setting.GetStr(conf.MainColor)
|
||||||
conf.ManageHtml = conf.RawIndexHtml
|
conf.ManageHtml = conf.RawIndexHtml
|
||||||
replaceMap1 := map[string]string{
|
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,
|
"Loading...": title,
|
||||||
"main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor),
|
"main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user