Skip to content

Commit 0e54dfb

Browse files
authored
docs(res): update outdated links and informations (#326)
1 parent da7fb16 commit 0e54dfb

7 files changed

Lines changed: 79 additions & 45 deletions

File tree

components/OpenListDownload.vue

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
<p>{{ t('download.version') }}:</p>
33
<div class="filter-buttons">
44
<button :class="{ active: selectedVersion === 'latest' }" @click="selectedVersion = 'latest'">
5-
Latest
5+
{{ t('download.latest') }}
66
</button>
77
<button :class="{ active: selectedVersion === 'beta' }" @click="selectedVersion = 'beta'">
8-
Beta
8+
{{ t('download.beta') }}
99
</button>
1010
</div>
1111

1212
<p>{{ t('download.os') }}:</p>
1313
<div class="filter-buttons">
14-
<button :class="{ active: selectedOS === '' }" @click="selectedOS = ''">All</button>
14+
<button :class="{ active: selectedOS === '' }" @click="selectedOS = ''">
15+
{{ t('download.all') }}
16+
</button>
1517
<button
1618
v-for="os in availableOS"
1719
:key="os"
@@ -24,7 +26,9 @@
2426

2527
<p>{{ t('download.cpu') }}:</p>
2628
<div class="filter-buttons">
27-
<button :class="{ active: selectedCPU === '' }" @click="selectedCPU = ''">All CPU</button>
29+
<button :class="{ active: selectedCPU === '' }" @click="selectedCPU = ''">
30+
{{ t('download.all') }}
31+
</button>
2832
<button
2933
v-for="cpu in availableCPU"
3034
:key="cpu"
@@ -35,6 +39,19 @@
3539
</button>
3640
</div>
3741

42+
<p v-if="locale == 'zh-CN'">{{ t('download.down_source') }}:</p>
43+
<div class="filter-buttons">
44+
<button
45+
v-if="locale == 'zh-CN'"
46+
v-for="source in sources"
47+
:key="source.name"
48+
:class="{ active: selectedDownSource.name === source.name }"
49+
@click="selectedDownSource = source"
50+
>
51+
{{ source.name }}
52+
</button>
53+
</div>
54+
3855
<div class="file-list">
3956
<div v-for="download in filteredDownloads" :key="download.filename" class="file-item">
4057
<div class="file-content">
@@ -51,21 +68,12 @@
5168
</div>
5269
<div class="downloads">
5370
<a
54-
v-if="locale === 'zh-CN'"
55-
:href="getGhProxyUrl(download.filename)"
56-
class="download-button"
57-
:download="download.filename"
58-
target="_blank"
59-
>
60-
{{ t('download.gh_proxy') }}
61-
</a>
62-
<a
63-
:href="getDirectUrl(download.filename)"
71+
:href="getDownloadUrl(download.filename)"
6472
class="download-button"
6573
:download="download.filename"
6674
target="_blank"
6775
>
68-
{{ t('download.download') }}
76+
{{ t('download.download') }} ({{ selectedDownSource.name }})
6977
</a>
7078
</div>
7179
</div>
@@ -83,12 +91,38 @@
8391
import releases from './openlist_releases_db.json'
8492
8593
type VersionType = 'latest' | 'beta'
94+
type Source = {
95+
name: string
96+
prefix: string
97+
}
98+
99+
const sources: Source[] = [
100+
{ name: 'GitHub', prefix: 'https://github.com/OpenListTeam/OpenList' },
101+
{ name: 'ghfast.top', prefix: 'https://ghfast.top/https://github.com/OpenListTeam/OpenList' },
102+
{
103+
name: 'v6.gh-proxy.org',
104+
prefix: 'https://v6.gh-proxy.org/https://github.com/OpenListTeam/OpenList',
105+
},
106+
{
107+
name: 'hk.gh-proxy.org',
108+
prefix: 'https://hk.gh-proxy.org/https://github.com/OpenListTeam/OpenList',
109+
},
110+
{
111+
name: 'cdn.gh-proxy.org',
112+
prefix: 'https://cdn.gh-proxy.org/https://github.com/OpenListTeam/OpenList',
113+
},
114+
{
115+
name: 'edgeone.gh-proxy.org',
116+
prefix: 'https://edgeone.gh-proxy.org/https://github.com/OpenListTeam/OpenList',
117+
},
118+
]
86119
87120
const { t, locale } = useI18n()
88121
89122
const selectedVersion = ref<VersionType>('latest')
90123
const selectedOS = ref<string>('')
91124
const selectedCPU = ref<string>('')
125+
const selectedDownSource = ref<Source>(sources[0])
92126
93127
const availableOS = computed((): string[] => {
94128
const osSet = new Set(releases.map(d => d.os).filter(os => os))
@@ -125,16 +159,10 @@
125159
return filtered
126160
})
127161
128-
const getDirectUrl = (filename: string): string => {
129-
const basePath =
130-
selectedVersion.value === 'latest' ? 'releases/latest/download' : 'releases/download/beta'
131-
return `https://github.com/OpenListTeam/OpenList/${basePath}/${filename}`
132-
}
133-
134-
const getGhProxyUrl = (filename: string): string => {
162+
const getDownloadUrl = (filename: string): string => {
135163
const basePath =
136164
selectedVersion.value === 'latest' ? 'releases/latest/download' : 'releases/download/beta'
137-
return `https://ghproxy.cn/https://github.com/OpenListTeam/OpenList/${basePath}/${filename}`
165+
return `${selectedDownSource.value.prefix}/${basePath}/${filename}`
138166
}
139167
</script>
140168

locales/en.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ post:
6262

6363
# ! components/OpenListDownload.vue
6464
download:
65+
all: All
6566
os: Operating System
6667
cpu: CPU Architecture
68+
down_source: Download Source
6769
download: Download
6870
gh_proxy: GhProxy
6971
version: Version
72+
beta: Beta
73+
latest: Latest

locales/zh-CN.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ post:
6262

6363
# ! components/OpenListDownload.vue
6464
download:
65+
all: 全部
6566
os: 操作系统
6667
cpu: CPU 架构
6768
download: 下载
69+
down_source: 下载来源
6870
gh_proxy: 加速下载
6971
version: 版本
72+
beta: 测试版
73+
latest: 最新版

pages/guide/installation/docker.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ categories:
1111
- installation
1212
---
1313

14-
::: en
15-
::: warning
16-
It is highly recommended to deploy OpenList in an isolated environment using Docker. Otherwise, without security measures like SELinux or AppArmor, if your password is exposed, and hackers may gain access to all the files on your server.
17-
:::
18-
19-
::: zh-CN
20-
::: warning
21-
强烈建议使用 Docker 在隔离环境中部署 OpenList。否则,如果没有正确配置像 SELinux 或 AppArmor 这样的安全措施,假如您的密码暴露,黑客将可以访问您服务器上的所有文件。
22-
:::
23-
2414
::: zh-CN
2515
::: warning
2616

pages/guide/installation/manual.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,32 +276,28 @@ openlist server
276276

277277
#### WinGet
278278

279-
[![winget package](https://repology.org/badge/version-for-repo/winget/openlist.svg)](https://repology.org/project/openlist/versions)
280-
281279
```powershell
282280
winget install OpenListTeam.OpenList
283281
openlist server
284282
```
285283

286-
:::
287-
288-
### MacOS
284+
### macOS
289285

290286
::: en
291287
OpenList is available via Homebrew on macOS.
292288
:::
293289
::: zh-CN
294-
MacOS 可以从 Homebrew 安装。
290+
macOS 可以从 Homebrew 安装。
295291
:::
296292

297293
#### Homebrew
298294

295+
[![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/openlist.svg)](https://repology.org/project/openlist/versions)
296+
299297
```bash
300298
$ brew install openlist
301299
```
302300

303-
:::
304-
305301
### Android
306302

307303
::: en

pages/guide/installation/script.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,22 @@ Requirements:
4141

4242
### 安装 { lang="zh-CN" }
4343

44-
```bash
44+
::: code-group
45+
46+
```bash [🌍Global]
4547
curl -fsSL https://res.oplist.org/script/v4.sh > install-openlist-v4.sh && sudo bash install-openlist-v4.sh
4648
```
4749

50+
```bash [🇨🇳CN]
51+
curl -fsSL https://res.oplist.org.cn/script/v4.sh > install-openlist-v4.sh && sudo bash install-openlist-v4.sh
52+
```
53+
54+
```bash [GitHub]
55+
curl -fsSL https://raw.githubusercontent.com/OpenListTeam/OpenList-Resource/refs/heads/main/script/v4.sh > install-openlist-v4.sh && sudo bash install-openlist-v4.sh
56+
```
57+
58+
:::
59+
4860
```bash
4961
欢迎使用 OpenList 管理脚本
5062

pages/guide/installation/source.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ This step is only for users who need to modify the source code by themselves. If
2727
## 环境准备 { lang="zh-CN" }
2828

2929
::: en
30-
First, you need to have an environment of `git`, `nodejs>=22`, `pnpm`, `golang>=1.24`, `gcc`
30+
First, you need to have an environment of `git`, `nodejs>=24`, `pnpm`, `golang>=1.24`, `gcc`
3131
:::
3232
::: zh-CN
33-
首先,你需要一个有`git``nodejs>=22``pnpm``golang>=1.24``gcc`的环境
33+
首先,你需要一个有`git``nodejs>=24``pnpm``golang>=1.24``gcc`的环境
3434
:::
3535

3636
On **Windows**, use Scoop:
@@ -57,7 +57,7 @@ xcode-select --install
5757

5858
# Install nodejs and golang use Homebrew for newer version
5959
curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
60-
brew install node@22 go
60+
brew install node@24 go
6161
corepack enable pnpm
6262
```
6363

0 commit comments

Comments
 (0)