Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many of the UPDATEEEEEEE #8

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ export default defineConfig({
nav: [
{ text: '首页', link: '/zh-cn/' },
{ text: '简介', link: '/zh-cn/intro' },
{ text: '贡献', link: '/zh-cn/contributing/' },
{ text: '下载', link: '/zh-cn/downloads' },
{ text: '关于', link: '/zh-cn/about' },
],
sidebar: [
{ text: '什么是 Epherome?', link: '/zh-cn/intro' },
{ text: '下载', link: '/zh-cn/downloads' },
{ text: '关于', link: '/zh-cn/about' }
{ text: '关于', link: '/zh-cn/about' },
{
text: '开发者文档',
items: [
{ text: '代码贡献', link: '/zh-cn/contributing/' },
{ text: '国际化', link: '/zh-cn/contributing/translations' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/ResetPower/Epherome' }
Expand Down
4 changes: 3 additions & 1 deletion contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can use command line `git clone https://github.com/{username}/Epherome` or `
- Use `npm install` to install required packages.
- Use `npm run tauri dev` to run Epherome in development mode.

Epherome uses Tauri as its backend. For more specific actions, you can refer to the Tauri documents.
Epherome uses Tauri as its backend. For more specific actions, you can refer to the [Tauri documents](https://tauri.app/).

After the steps above, you can start editing code.

Expand All @@ -34,7 +34,9 @@ After the steps above, you can start editing code.
> You can try your best to follow the commit message guidelines. You can start by imitating Epherome commit messages.
>
> Specifically, a commit message should be written in the format `type(scope): <short summary>`.
>
> The short summary can be a noun, a symbol or a verb phrase. Note that any verbs should be in present tense.
>
> The scope can be omitted, just like Epherome does.
>
> But that **doesn't matter**, because the author can rewrite commit message when using *Squash and Merge*.
24 changes: 15 additions & 9 deletions downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<p id="EPHVERSION"></p>
<div id="downloadButtonContainer"></div>

You can go to [GitHub Releases](https://github.com/ResetPower/Epherome/releases) to find all versions.
You can go to [GitHub Releases](https://github.com/ResetPower/Epherome/releases) or [Phasmaruo Mirror](https://mirror.phasmaruo.com/epherome) to find all versions.

::: tip Important
>[Phasmaruo Mirror](https://mirror.phasmaruo.com) is a Release Mirror for SpiderKingWynn and his friends. This mirror effectively solves the problem that GitHub cannot be accessed in Mainland China.
>
>For Epherome, Phasmaruo Mirror is updated hourly, so head over to [GitHub Releases](https://github.com/ResetPower/Epherome/releases) for the fastest and most up-to-date version.
:::

## System Requirements

Expand All @@ -27,7 +33,7 @@ You can go to [GitHub Releases](https://github.com/ResetPower/Epherome/releases)
<script module>
export default {
mounted() {
fetch('https://api.github.com/repos/ResetPower/Epherome/releases')
fetch('https://mirror.phasmaruo.com/epherome/release.json')
.then(response => response.json())
.then(data => {
const htmlUrl = data[0].html_url;
Expand All @@ -44,19 +50,19 @@ You can go to [GitHub Releases](https://github.com/ResetPower/Epherome/releases)
if (userAgent.indexOf("win") >= 0) {
osName = "Windows";
osVersion = "Windows 10 and above (Windows 7 users must compile from <a href='https://github.com/ResetPower/Epherome' target='_blank'>source</a> according to the <a href='https://tauri.app/v1/guides/building/windows#supporting-windows-7' target='_blank'>Tauri documentation</a>)";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_x86-setup.exe", "Download x86 Installer(.exe)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_x64-setup.exe", "Download x64 Installer(.exe)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_arm64-setup.exe", "Download arm64 Installer(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_x86-setup.exe", "Download x86 Installer(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_x64-setup.exe", "Download x64 Installer(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_arm64-setup.exe", "Download arm64 Installer(.exe)");
} else if (userAgent.indexOf("mac") >= 0) {
osName = "macOS";
osVersion = "macOS High Sierra (10.13) and above";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_universal.dmg", "Download Universal Installer Image(.dmg)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_universal.app.tar.gz", "Download Universal Software(.app)")
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_universal.dmg", "Download Universal Installer Image(.dmg)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_universal.app.tar.gz", "Download Universal Software(.app)")
} else if (userAgent.indexOf("linux") >= 0) {
osName = "Linux";
osVersion = "Linux with webkit2gtk 4.0 (e.g. Ubuntu 18.04+), Linux Arm64 is not supported yet.";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_amd64.deb", "Download amd64 Software Package(.deb)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_amd64.AppImage", "Download amd64 Common Software Package(.AppImage)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_amd64.deb", "Download amd64 Software Package(.deb)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_amd64.AppImage", "Download amd64 Common Software Package(.AppImage)");
}
document.getElementById("Download").innerHTML = "Epherome " + osName + " Version";
document.getElementById("OSVERSION").innerHTML = "System Requirements: " + osVersion;
Expand Down
40 changes: 40 additions & 0 deletions zh-cn/contributing/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 想要改进 Epherome ?

Epherome 将 GitHub 作为其唯一的源码管理、开发、协作和持续集成平台。

想要对 Epherome 进行改进,您必须学习一些有关 Git 和 GitHub 的基本知识。

本文将向您介绍向 Epherome 提交代码的基本流程。

## 分叉 (Fork)

要开始开发 Epherome,您必须 分叉 (Fork) GitHub 上的版本库。

分叉后,您将拥有自己的版本库`{username}/Epherome`,它与您分叉时的 Epherome 版本库内容相同。**但您必须手动与上游版本库同步**。

*上游版本库*是指该版本库分叉出来的版本库。在本文档中,上游版本库指的是 `ResetPower/Epherome` 。

您可以使用命令行 `git clone https://github.com/{username}/Epherome` 或 `gh repo clone {username}/Epherome` 将版本库克隆到本地。

## 开发

- 打开命令行,`cd`到目录`Epherome`,其中包含`package.json`。
- 使用 `npm install` 安装所需的软件包。
- 使用 `npm run tauri dev` 以开发模式运行 Epherome。

Epherome 使用 Tauri 作为后端。有关更多具体操作,请参阅 [Tauri 文档](https://tauri.app/zh-cn/)。

完成上述步骤后,就可以开始编辑代码了。

## 拉取请求 (Pull Request)
- 将您的更改提交到您的版本库,更具体地说是`{username}/Epherome`。
- 在仓库的 GitHub 主页上启动拉取请求 (Pull Reqeust)。
> 您可以遵循提交信息指南。比如,从模仿 Epherome 的提交信息开始。
>
> 具体来说,提交信息应该为 `type(scope): <描述您做了哪些更改>`的格式,并使用英文。
>
> 描述更改部分可以是名词、符号或动词短语。请注意,任何动词都应使用现在时。
>
> scope可以省略,就像 Epherome 所做的那样。
>
> 但这**并不重要**,因为作者可以在使用 *Squash 和 Merge* 时重写提交信息。
34 changes: 34 additions & 0 deletions zh-cn/contributing/translations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 对 Epherome 进行本地化/国际化

Epherome代码中有一个国际化系统。您可以在Epherome的常规设置中修改*显示语言*。

## 简介

关于本地化/国际化系统的代码位于 `src/intl`。

- `src/intl/index.ts` 是该系统的核心实现。
- `src/intl/root.ts` 是*英语(全球)*(`en-ww`)的定义文件,它还定义了类型 `LanguageMessages`。

## 完善现有语言

- `src/intl/{language-code}.ts` 是语言定义文件。若要修改文本,只需填写其中的 `messages`。

> 有两种类型的i18n消息,`string` 和 `function`。
>
> 如果您不知道如何操作,最好的方法是参考 `src/intl/root.ts` 的做法。

## 创建新的语言文件

- 创建一个新文件 `src/intl/{language-code}.ts`。
- 将以下内容写入文件中:
```typescript
export default {
name: "{language-name}",
code: "{language-code}",
messages: {
// ...
},
}
```

在上述文件中,*language-name* 是语言本身的名称。例如,希腊语的 *language-name* 是 `Ελληνικά`,而希腊语的 *language-code* 是 `el-gr`。
24 changes: 15 additions & 9 deletions zh-cn/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<p id="EPHVERSION"></p>
<div id="downloadButtonContainer"></div>

前往 [GitHub Releases](https://github.com/ResetPower/Epherome/releases) 以取得全部版本的下载链接。
前往 [GitHub Releases](https://github.com/ResetPower/Epherome/releases) 或 [Phasmaruo Mirror](https://mirror.phasmaruo.com/epherome) 以取得全部版本的下载链接。

::: tip 重要提示
>[Phasmaruo Mirror](https://mirror.phasmaruo.com) 是提供给SpiderKingWynn和他的朋友们的发行版镜像。此镜像有效的解决了GitHub在中国大陆无法访问的问题。
>
>对于 Epherome,Phasmaruo Mirror 采用的是每小时同步一次,所以请前往 [GitHub Releases](https://github.com/ResetPower/Epherome/releases) 以获取最快最新的版本。
:::

## 操作系统要求

Expand All @@ -27,7 +33,7 @@
<script module>
export default {
mounted() {
fetch('https://api.github.com/repos/ResetPower/Epherome/releases')
fetch('https://mirror.phasmaruo.com/epherome/release.json')
.then(response => response.json())
.then(data => {
const htmlUrl = data[0].html_url;
Expand All @@ -44,19 +50,19 @@
if (userAgent.indexOf("win") >= 0) {
osName = "Windows";
osVersion = "Windows 10 及以上(Windows 7 用户请自行从 <a href='https://github.com/ResetPower/Epherome/' target='_blank'>源代码</a> 参照 <a href='https://tauri.app/zh-cn/v1/guides/building/windows/#supporting-windows-7' target='_blank'>Tauri 官方文档</a> 进行编译使用)";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_x86-setup.exe", "下载 x86 安装程序(.exe)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_x64-setup.exe", "下载 x64 安装程序(.exe)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_arm64-setup.exe", "下载 arm64 安装程序(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_x86-setup.exe", "下载 x86 安装程序(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_x64-setup.exe", "下载 x64 安装程序(.exe)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_arm64-setup.exe", "下载 arm64 安装程序(.exe)");
} else if (userAgent.indexOf("mac") >= 0) {
osName = "macOS";
osVersion = "macOS High Sierra (10.13) 及以上";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_"+version+"_universal.dmg", "下载 Universal 安装映像(.dmg)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/Epherome_universal.app.tar.gz", "下载 Universal 软件(.app)")
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_"+version+"_universal.dmg", "下载 Universal 安装映像(.dmg)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/Epherome_universal.app.tar.gz", "下载 Universal 软件(.app)")
} else if (userAgent.indexOf("linux") >= 0) {
osName = "Linux";
osVersion = "含有webkit2gtk 4.0的Linux (如 Ubuntu 18.04+),暂未支持Linux Arm64";
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/epherome_"+version+"_amd64.deb", "下载 amd64 软件包(.deb)");
this.addDownloadButton("https://github.com/ResetPower/Epherome/releases/download/"+version+"/epherome_"+version+"_amd64.AppImage", "下载 amd64 通用软件包(.AppImage)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/epherome_"+version+"_amd64.deb", "下载 amd64 软件包(.deb)");
this.addDownloadButton("https://mirror.phasmaruo.com/epherome/"+version+"/epherome_"+version+"_amd64.AppImage", "下载 amd64 通用软件包(.AppImage)");
}
document.getElementById("Download").innerHTML = "Epherome " + osName + "版";
document.getElementById("OSVERSION").innerHTML = "系统要求:" + osVersion;
Expand Down