docs: add CONTRIBUTING.md (#586)

* docs(contributing): 更新贡献指南
相关issuse: https://github.com/hakadao/BewlyBewly/issues/164

* docs(CONTRIBUTING): Update contributing guidelines formatting and language

* feat: add icons to `NotificationsPop` &&  `MorePop` (#580)

* feat: `MorePop` item icon and cache `MomentPop`

* chore: revert cache MomentPop

* feat: `NotificationsPop` item icon

* chore(pkg): update deps

* style: Update icons in MorePop and NotificationsPop components

---------

Co-authored-by: starknt <1431880400@qq.com>

* docs: Update CONTRIBUTING.md && support other languages

* docs: update other languages link

* docs: update readme

---------

Co-authored-by: pengyunfei <pengyunfei@360.cn>
Co-authored-by: starknt <1431880400@qq.com>
This commit is contained in:
Hakadao
2024-04-16 02:46:45 +08:00
committed by GitHub
parent d9b703bc93
commit 19e8a20caa
13 changed files with 521 additions and 293 deletions

View File

@@ -62,75 +62,13 @@ BewlyBewly 是一个用于 BiliBili 的浏览器扩展,旨在通过重新设
</details>
## 🔧 开发和构建项目
请使用 dev 分支进行开发
### Chrome or Edge browser
<details>
<summary>Chrome or Edge browser</summary>
#### 开发 (Chrome or Edge)
```bash
pnpm dev
```
然后**在浏览器中使用 `加载已解压的拓展程序` 加载 `extension` 文件夹**。
每次修改后,您需要单击 [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
#### 构建 (Chrome or Edge)
要构建拓展程序,运行
```bash
pnpm build
```
然后打包到 `extension` 文件夹
</details>
### Firefox browser
<details>
<summary>Firefox</summary>
#### 开发 (Firefox)
```bash
pnpm dev-firefox
```
然后**在浏览器中使用 `加载已解压的拓展程序` 加载 `extension-firefox/` 文件夹**。
每次修改后,您需要单击 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
#### 构建 (Firefox)
要构建拓展程序,运行
```bash
pnpm build-firefox
```
然后打包到 `extension-firefox` 文件夹
</details>
## 🤝 贡献
### 关于分支
查看 [CONTRIBUTION.md](docs/CONTRIBUTING.md)
- **Main**: 此分支用于只涉及文档文件(如 README 文件)的更改,不改变代码或其功能。
- **Dev**: 用此分支进行新功能的开发、性能改进或对国际化i18n文件的修改。
- **Bugfixes**: 此分支专门用于修复 main 分支中出现的错误。
### 贡献者
### I18n
- 在进行翻译时,如果你遇到一种你不熟悉的语言,可以使用另一种你已经翻译过的语言,并在 PR 中指出你无法翻译的语言。
- **请手动维护 i18n 国际化文件!!!** 不要使用 `i18n Ally` 或其他扩展来维护它们。我知道你可能会感到困惑或不喜欢这样做,但使用 `i18n Ally` 进行维护会不确定翻译放在哪里或删除代码注释。
![Contributors](https://contrib.rocks/image?repo=hakadao/BewlyBewly)
## ❤️ 鸣谢
@@ -138,3 +76,9 @@ pnpm build-firefox
- [UserScripts/bilibiliHome](https://github.com/indefined/UserScripts/tree/master/bilibiliHome), [bilibili-app-recommend](https://github.com/magicdawn/bilibili-app-recommend) - 获取访问密钥的参考来源
- [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) - 部分功能实现
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect)
## 捐赠
如果您喜欢这个项目,您可以考虑捐赠以支持我。我并不处于财务困境,所以请根据您的意愿提供支持即可。
![image](https://github.com/hakadao/BewlyBewly/assets/33394391/41711f39-8c6c-4dea-964e-5ae7f0d5b8ad)

View File

@@ -62,74 +62,13 @@ BewlyBewly 是一個針對 BiliBili 的瀏覽器擴充功能,旨在透過重
</details>
## 🔧 開發與建置專案
請使用 dev 分支進行開發
### Chrome or Edge browser
<details>
<summary>Chrome or Edge browser</summary>
#### 開發 (Chrome or Edge)
```bash
pnpm dev
```
然後在瀏覽器中使用 `extension/` 資料夾載入此擴充功能。
每次修改後,您需要點選 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按鈕,然後重新整理頁面,以確保更改生效。
#### 建置 (Chrome or Edge)
建置此擴充功能,需要執行以下指令
```bash
pnpm build
```
然後打包 `extension` 下的檔案
</details>
### Firefox browser
<details>
<summary>Firefox browser</summary>
#### 開發 (Firefox)
```bash
pnpm dev-firefox
```
然後在瀏覽器中使用 `extension-firefox/` 資料夾載入此擴充功能。
每次修改後,您需要點選 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按鈕,然後重新整理頁面,以確保更改生效。
#### 建置 (Firefox)
建置此擴充功能,需要執行以下指令
```bash
pnpm build-firefox
```
然後打包 `extension-firefox` 下的檔案
</details>
## 🤝 貢獻
### 關於分支
詳情 [CONTRIBUTION.md](docs/CONTRIBUTING.md)
- **Main**: 此分支設計用於僅涉及文件檔案(如 README 檔案)的更改,不更改程式碼或其功能。
- **Dev**: 使用此分支進行新功能的開發、改進效能或對語系檔i18n的修改。
- **Bugfixes**: 此分支專門用於修正 main 分支中出現的錯誤。
### 貢獻者
### I18n
- 在進行翻譯時,如果你遇到一種你不熟悉的語言,你可以使用另一種你已經翻譯過的語言來翻譯,並在 PR 中指出你無法翻譯的那個語言。
- **請手動維護 i18n 國際化語系檔!!!** 請勿使用 `i18n Ally` 或其他擴充套件來進行維護。 我知道你可能會感到困惑,或者可能不喜歡這樣做,但使用 `i18n Ally` 進行維護後,將不確定翻譯放在哪裏,或刪除程式碼註解。
![Contributors](https://contrib.rocks/image?repo=hakadao/BewlyBewly)
## ❤️ 鳴謝
@@ -137,3 +76,9 @@ pnpm build-firefox
- [UserScripts/bilibiliHome](https://github.com/indefined/UserScripts/tree/master/bilibiliHome), [bilibili-app-recommend](https://github.com/magicdawn/bilibili-app-recommend) - 參考取得 access key 之方法
- [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) - 部分功能的實現
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect)
## 捐贈
如果您喜歡這份專案,您可以考慮捐贈以支持我。我沒有財務困難,所以請根據您的意願進行支持。
![image](https://github.com/hakadao/BewlyBewly/assets/33394391/41711f39-8c6c-4dea-964e-5ae7f0d5b8ad)

View File

@@ -62,74 +62,13 @@ BewlyBewly 係一個用於 BiliBili 嘅瀏覽器延伸功能,目的係透過
</details>
## 🔧 開發同建置專案
請使用 dev 分支進行開發
### Chrome or Edge browser
<details>
<summary>Chrome or Edge browser</summary>
#### 開發 (Chrome or Edge)
```bash
pnpm dev
```
然之後喺瀏覽器度用 `extension/` 資料夾愛嚟載入此擴充功能。
每一次執過 code 之後,你都要撳 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 粒掣,然之後 refresh 個 page確保係有效果。
#### 建置 (Chrome or Edge)
建置擴充功能,要執行下底嘅指令
```bash
pnpm build
```
然之後打包 `extension` 下嘅檔案
</details>
### Firefox browser
<details>
<summary>Firefox</summary>
#### 開發 (Firefox)
```bash
pnpm dev-firefox
```
然之後喺瀏覽器度用 `extension-firefox/` 資料夾愛嚟載入此擴充功能。
每一次執過 code 之後,你都要撳 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 粒掣,然之後 refresh 個 page確保係有效果。
#### 建置 (Firefox)
建置擴充功能,要執行下底嘅指令
```bash
pnpm build-firefox
```
然之後打包 `extension-firefox` 下嘅檔案
</details>
## 🤝 貢獻
### 關於分支
See [CONTRIBUTION.md](docs/CONTRIBUTING.md)
- **Main**: 呢個分支係專門愛嚟執吓文件檔案(例如如 README 檔案),唔執程式碼抑或佢啲功能。
- **Dev**: 用呢個分支進行新功能嘅開發、改進效能抑或執語系檔i18n
- **Bugfixes**: 呢個分支專門愛嚟執啲喺 main 分支中出現嘅錯誤。
### 貢獻者
### i18n
- 喺翻譯嗰陣,若然你遇到一種你唔熟嘅語言,你可以用第種識翻譯嘅語言來翻譯,兼且喺 PR 講明你唔識譯邊種語言。
- **請手動維護 i18n 國際化語系檔!!!** 請勿使用 `i18n Ally` 抑或其他擴充套件維護。 我知你可能唔係幾明,抑或可能唔鍾意咁樣,但係用 `i18n Ally` 進行維護之後,你唔之你翻譯咗嘅內容擺喺邊處,或剷咗程式碼註解。
![Contributors](https://contrib.rocks/image?repo=hakadao/BewlyBewly)
## ❤️ 鳴謝
@@ -137,3 +76,9 @@ pnpm build-firefox
- [UserScripts/bilibiliHome](https://github.com/indefined/UserScripts/tree/master/bilibiliHome), [bilibili-app-recommend](https://github.com/magicdawn/bilibili-app-recommend) - 參考取得 access key 之方法
- [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) - 部分功能嘅實現
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect)
## 捐贈
若然你鐘意呢份專案,你可以考慮捐贈嚟支持我。我而家唔係財務困境,捐幾多睇你啦。
![image](https://github.com/hakadao/BewlyBewly/assets/33394391/41711f39-8c6c-4dea-964e-5ae7f0d5b8ad)

View File

@@ -62,75 +62,13 @@ Opening the `edge://extensions` page in the Edge or `chrome://extensions` page i
</details>
## 🔧 Development & Build
Please use the dev branch for development
### Chrome or Edge browser
<details>
<summary>Chrome or Edge browser</summary>
#### Development (Chrome or Edge)
```bash
pnpm dev
```
Then **load the extension in the browser with the `extension/` folder**.
After each modification, you need to click the [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) button and refresh the page to ensure the changes will be applied.
##### Build (Chrome or Edge)
To build the extension, run
```bash
pnpm build
```
And then pack files under the `extension`
</details>
### Firefox browser
<details>
<summary>Firefox browser</summary>
#### Development (Firefox)
```bash
pnpm dev-firefox
```
Then **load the extension in the browser with the `extension-firefox/` folder**.
After each modification, you need to click the [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) button and refresh the page to ensure the changes will be applied.
#### Build (Firefox)
To build the extension, run
```bash
pnpm build-firefox
```
And then pack files under the `extension-firefox`
</details>
## 🤝 Contribution
### About Branches
See [CONTRIBUTION.md](docs/CONTRIBUTING.md)
- **Main**: This branch is designed for changes that are restricted to documentation files like READMEs, without altering the code or its functionality.
- **Dev**: Use this branch for new features, performance improvements or modifications to i18n files.
- **Bugfixes**: This branch should be used exclusively for fixing bugs that appear in the main branch.
### Contributors
### I18n
- When doing translations, if you have a language you are not familiar with, you can use another language that you have translated and point out what language you cannot translate in the pull request.
- **Please MANUALLY MAINTAIN the i18n files!!!** Do not use `i18n Ally` or other extensions to maintain them. I know you might be confused or might not like this, but using `i18n Ally` for the maintenance will make it uncertain where to place the translations afterward or delete the code comments.
![Contributors](https://contrib.rocks/image?repo=hakadao/BewlyBewly)
## ❤️ Credits
@@ -138,3 +76,9 @@ And then pack files under the `extension-firefox`
- [UserScripts/bilibiliHome](https://github.com/indefined/UserScripts/tree/master/bilibiliHome), [bilibili-app-recommend](https://github.com/magicdawn/bilibili-app-recommend) - Reference source for obtaining the access key
- [Bilibili-Evolved](https://github.com/the1812/Bilibili-Evolved) - Partial implementation of functionalities
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect)
## Donate
If you like this project, you can consider donating to support me. I'm not in financial difficulty, so support as you see fit.
![image](https://github.com/hakadao/BewlyBewly/assets/33394391/41711f39-8c6c-4dea-964e-5ae7f0d5b8ad)

109
docs/CONTRIBUTING-cmn_CN.md Normal file
View File

@@ -0,0 +1,109 @@
# 贡献指南
[English](CONTRIBUTING.md) | [官话 - 简体中文](CONTRIBUTING-cmn_CN.md) | [官話 - 正體中文](CONTRIBUTING-cmn_TW.md) | [廣東話](CONTRIBUTING-jyut.md)
## 💻 设置开发环境
此项目是基于 [Vite](https://vitejs.dev/) 构建的,请确保本地安装了 [Node.js](https://nodejs.org/) 和 [pnpm](https://pnpm.io/)
同时建议你用 [Visual Studio Code](https://code.visualstudio.com/) 进行开发。
## 🔧 开发和构建项目
### 开发 (Chrome or Edge)
1. 运行 pnpm 命令
```bash
# 安装依赖
pnpm install
# 运行项目
pnpm dev
```
2. 在地址栏输入 `chrome://extensions/` (Chrome), `edge://extensions/` (Edge) 并按回车
3. 打开 `开发者模式` 并点击 `加载已解压的拓展程序`
<br/>
<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">
4. 在浏览器中加载生成的 `extension/` 文件夹
每次修改后,您需要单击 [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
#### 构建 (Chrome or Edge)
要构建拓展程序,运行
```bash
pnpm build
```
然后打包到 `extension` 文件夹
### 开发 (Firefox)
1. 运行 pnpm 命令
```bash
# 安装依赖
pnpm install
# 运行项目
pnpm dev
```
2. 在浏览器输入 `about:addons` 之后点击 `Extensions` 然后 `Debug Add-ons`
<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">
3. 在浏览器中加载生成的 `extension-firefox/` 文件夹
#### 构建 (Firefox)
要构建拓展程序,运行
```bash
pnpm build-firefox
```
然后打包到 `extension-firefox` 文件夹
## 🤝 贡献
### 关于分支
#### 常驻分支
- **Main**: 主分支代表稳定可发布的版本对于已发布版本的错误修复hotfix在此分支开发。
- **Dev**: 用此分支进行新功能的开发、性能改进或对国际化i18n文件的修改。
#### 其他临时分支
- **feat/**: 此分支用于提交新的功能
- **doc/**: 此分支专门用于修复文档, 不涉及功能改动。
- **bugfix/**: 此分支专门用于修复 dev 分支中出现的错误。
- **hotfix/**: 从 main 分支切出, 用于修复线上问题。
### commit 规范
- `feat`:新功能
- `fix`:修复 Bug
- `docs`:文档更新
- `style`:样式调整
- `refactor`:重构代码
- `test`:添加或更新测试
- `chore`:构建过程或工具链的变更
- `perf`:性能改进
- `ci`:持续集成/交付的变更
也欢迎增加 scope 和 footer
例如:
`fix(dock): xxx`
`变更描述`
`相关 PR: url`
### I18n
- 在进行翻译时,如果你遇到一种你不熟悉的语言,可以使用另一种你已经翻译过的语言,并在 PR 中指出你无法翻译的语言。
- **请手动维护 i18n 国际化文件!!!** 不要使用 `i18n Ally` 或其他扩展来维护它们。我知道你可能会感到困惑或不喜欢这样做,但使用 `i18n Ally` 进行维护会不确定翻译放在哪里或删除代码注释。

106
docs/CONTRIBUTING-cmn_TW.md Normal file
View File

@@ -0,0 +1,106 @@
# 貢獻指南
[English](CONTRIBUTING.md) | [官话 - 简体中文](CONTRIBUTING-cmn_CN.md) | [官話 - 正體中文](CONTRIBUTING-cmn_TW.md) | [廣東話](CONTRIBUTING-jyut.md)
## 💻 設定開發環境
此專案使用 [Vite](https://vitejs.dev/) 構建,請確保你離線安裝了 [Node.js](https://nodejs.org/) 和 [pnpm](https://pnpm.io/),並推薦使用 [Visual Studio Code](https://code.visualstudio.com/) 進行開發。
## 🔧 開發與建置專案
### 開發Chrome 或 Edge
1. 執行 pnpm 指令
```bash
# 安裝依賴
pnpm install
# 運行專案
pnpm dev
```
2. 在地址欄輸入 `chrome://extensions/`Chrome`edge://extensions/`Edge並按 Enter 鍵
3. 啟用 `開發者模式` 並點擊 `載入解壓縮`
<br/>
<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">
4. 在瀏覽器中載入生成的 `extension/` 資料夾
每次修改後,您需要點選 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按鈕,然後重新整理頁面,以確保更改生效。
#### 建置Chrome 或 Edge
建置此擴充功能,需要執行以下指令
```bash
pnpm build
```
然後打包 `extension` 下的檔案
### 開發Firefox
1. 執行 pnpm 命令
```bash
# 安裝依賴
pnpm install
# 運行專案
pnpm dev
```
2. 在瀏覽器中輸入 `about:addons`,點擊 `Extensions` 然後 `Debug Add-ons`
<br/>
<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">
3. 然後在瀏覽器中使用 `extension-firefox/` 資料夾載入此擴充功能。
#### 構建Firefox
要構建擴展,運行
```bash
pnpm build-firefox
```
然後打包 `extension-firefox` 下的檔案
## 🤝 貢獻
### 關於分支
#### 永久分支
- **Main**:主分支,代表穩定且可發布的版本,已發布版本的熱修復在此分支上開發。
- **Dev**用於開發新功能、性能改進或修改國際化i18n文件的分支。
#### 其他臨時分支
- **feat/**:用於提交新功能的分支
- **doc/**:專門用於修正文檔,無功能更改的分支。
- **bugfix/**:專門用於修正 dev 分支中的錯誤的分支。
- **hotfix/**:從 main 分支切出,用於修復線上問題的分支。
### 提交規範
- `feat`:新功能
- `fix`:錯誤修復
- `docs`:文檔更新
- `style`:樣式調整
- `refactor`:重構程式碼
- `test`:添加或更新測試
- `chore`:對構建過程或工具鏈進行更改
- `perf`:效能改進
- `ci`:持續集成/交付更改
也歡迎添加範圍和腳註
例如:
`fix(dock)xxx`
`變更描述`
`相關 PRurl`
### I18n
- 在進行翻譯時,如果你遇到一種你不熟悉的語言,你可以使用另一種你已經翻譯過的語言來翻譯,並在 PR 中指出你無法翻譯的那個語言。
- **請手動維護 i18n 國際化語系檔!!!** 請勿使用 `i18n Ally` 或其他擴充套件來進行維護。 我知道你可能會感到困惑,或者可能不喜歡這樣做,但使用 `i18n Ally` 進行維護後,將不確定翻譯放在哪裏,或刪除程式碼註解。

105
docs/CONTRIBUTING-jyut.md Normal file
View File

@@ -0,0 +1,105 @@
# 貢獻指南
[English](CONTRIBUTING.md) | [官话 - 简体中文](CONTRIBUTING-cmn_CN.md) | [官話 - 正體中文](CONTRIBUTING-cmn_TW.md) | [廣東話](CONTRIBUTING-jyut.md)
## 💻 設定開發環境
呢份專案係用咗 [Vite](https://vitejs.dev/) 建立,請確保你已經單咗 [Node.js](https://nodejs.org/) 同 [pnpm](https://pnpm.io/),建議用 [Visual Studio Code](https://code.visualstudio.com/) 進行開發。
## 🔧 開發同建置專案
### 開發Chrome 或 Edge
1. 執行 pnpm 指令
```bash
# 安裝依賴
pnpm install
# 運行專案
pnpm dev
```
2. 喺 Chrome 入邊打開 `chrome://extensions` 頁面抑或喺 Edge 度打開 `edge://extensions` 頁面
3. 打開`開發者模式`,撳`載入解壓縮`
<br/>
<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">
4. 喺瀏覽器度載入產生嘅 `extension/` 資料夾
每一次執過 code 之後,你都要撳 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 粒掣,然之後 refresh 個 page確保係有效果。
#### 建立Chrome 或 Edge
建置延新功能,要執行下底嘅指令
```bash
pnpm build
```
然之後打包 `extension` 下嘅檔案
### 開發Firefox
1. 執行 pnpm 指令
```bash
# 安裝依賴
pnpm install
# 運行專案
pnpm dev
```
2. 喺瀏覽器度輸入 `about:addons`,撳 `Extensions` 然之後 `Debug Add-ons`
<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">
3. 喺瀏覽器度載入產生嘅 `extension-firefox/` 資料夾
#### 建立Firefox
建置延新功能,要執行下底嘅指令
```bash
pnpm build-firefox
```
然之後打包 `extension-firefox` 下嘅檔案
## 🤝 貢獻
### 關於分支
#### 永久分支
- **Main**:主分支,代表穩定同可以發布嘅版本,已發布版本嘅 Hotfix 會喺呢個分支上開發。
- **Dev**用呢個分支進行新功能嘅開發、改進效能抑或執語系檔i18n
#### 其他臨時分支
- **feat/**:提交新功能嘅分支
- **doc/**:專門愛嚟執文檔,無功能變動嘅分支。
- **bugfix/**:專門愛嚟執 dev 分支上嘅 bug。
- **hotfix/**:由 main 分支分裂,係攞嚟執線上問題嘅分支。
### 提交慣例
- `feat`:新功能
- `fix`:執 bugs
- `docs`:文檔更新
- `style`:執樣式
- `refactor`:代碼重構
- `test`:新增或更新測試
- `chore`:對建設過程或工具鏈進行更改
- `perf`:效能改進
- `ci`:持續集成/交付更改
歡迎添加範疇同腳註
例如:
`fix(dock)xxx`
`變更描述`
`相關 PRurl`
### i18n
- 喺翻譯嗰陣,若然你遇到一種你唔熟嘅語言,你可以用第種識翻譯嘅語言來翻譯,兼且喺 PR 講明你唔識譯邊種語言。
- **請手動維護 i18n 國際化語系檔!!!** 請勿使用 `i18n Ally` 抑或其他擴充套件維護。 我知你可能唔係幾明,抑或可能唔鍾意咁樣,但係用 `i18n Ally` 進行維護之後,你唔之你翻譯咗嘅內容擺喺邊處,或剷咗程式碼註解。

107
docs/CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,107 @@
# Contribution Guide
[English](CONTRIBUTING.md) | [官话 - 简体中文](CONTRIBUTING-cmn_CN.md) | [官話 - 正體中文](CONTRIBUTING-cmn_TW.md) | [廣東話](CONTRIBUTING-jyut.md)
## 💻 Setting up the Development Environment
This project is built using [Vite](https://vitejs.dev/), please make sure you have [Node.js](https://nodejs.org/) and [pnpm](https://pnpm.io/) installed locally, and it is recommended to use [Visual Studio Code](https://code.visualstudio.com/) for development.
## 🔧 Developing and Building the Project
### Development (Chrome or Edge)
1. Run the pnpm command
```bash
# Install dependencies
pnpm install
# Run the project
pnpm dev
```
2. Enter `chrome://extensions/` (Chrome), `edge://extensions/` (Edge) in the address bar and press Enter
3. Enable `Developer Mode` and click `Load unpacked`
<br/>
<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">
4. Load the generated `extension/` folder in the browser
After each modification, you need to click the [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) button and refresh the page to apply the changes.
#### Building (Chrome or Edge)
To build the extension, run
```bash
pnpm build
```
Then package it to the `extension` folder
### Development (Firefox)
1. Run the pnpm command
```bash
# Install dependencies
pnpm install
# Run the project
pnpm dev
```
2. In the browser, enter `about:addons`, click on `Extensions` and then `Debug Add-ons`
<br/>
<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">
3. Load the generated `extension-firefox/` folder in the browser
#### Building (Firefox)
To build the extension, run
```bash
pnpm build-firefox
```
Then package it to the `extension-firefox` folder
## 🤝 Contribution
### About Branches
#### Permanent Branches
- **Main**: Main branch, represents the stable and publishable version, hotfixes for released versions are developed on this branch.
- **Dev**: Use this branch for developing new features, performance improvements, or modifications to internationalization (i18n) files.
#### Other Temporary Branches
- **feat/**: This branch is used to submit new features
- **doc/**: This branch is specifically used for fixing documentation, no functional changes.
- **bugfix/**: This branch is specifically used for fixing errors in the dev branch.
- **hotfix/**: Cut from the main branch, used to fix online issues.
### Commit Convention
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation update
- `style`: Adjust styles
- `refactor`: Code refactoring
- `test`: Add or update tests
- `chore`: Changes to the build process or toolchain
- `perf`: Performance improvement
- `ci`: Changes to continuous integration/delivery
Also welcome to add scope and footer
For example:
`fix(dock): xxx`
`Change description`
`Related PR: url`
### I18n
- When doing translations, if you have a language you are not familiar with, you can use another language that you have translated and point out what language you cannot translate in the pull request.
- **Please MANUALLY MAINTAIN the i18n files!!!** Do not use `i18n Ally` or other extensions to maintain them. I know you might be confused or might not like this, but using `i18n Ally` for the maintenance will make it uncertain where to place the translations afterward or delete the code comments.

View File

@@ -48,7 +48,7 @@
"devDependencies": {
"@antfu/eslint-config": "^2.6.4",
"@ffflorian/jszip-cli": "^3.6.2",
"@iconify/json": "^2.2.183",
"@iconify/json": "^2.2.201",
"@iconify/vue": "^4.1.1",
"@intlify/unplugin-vue-i18n": "^0.8.2",
"@rollup/plugin-replace": "^5.0.5",

46
pnpm-lock.yaml generated
View File

@@ -47,8 +47,8 @@ devDependencies:
specifier: ^3.6.2
version: 3.6.2(typescript@4.9.5)
'@iconify/json':
specifier: ^2.2.183
version: 2.2.183
specifier: ^2.2.201
version: 2.2.201
'@iconify/vue':
specifier: ^4.1.1
version: 4.1.1(vue@3.4.19)
@@ -135,13 +135,13 @@ devDependencies:
version: 5.27.1
tsup:
specifier: ^6.7.0
version: 6.7.0(postcss@8.4.33)(typescript@4.9.5)
version: 6.7.0(postcss@8.4.38)(typescript@4.9.5)
typescript:
specifier: ^4.9.5
version: 4.9.5
unocss:
specifier: ^0.54.3
version: 0.54.3(postcss@8.4.33)(vite@3.2.8)
version: 0.54.3(postcss@8.4.38)(vite@3.2.8)
unplugin-auto-import:
specifier: ^0.11.5
version: 0.11.5(@vueuse/core@10.7.2)
@@ -881,8 +881,8 @@ packages:
resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==}
dev: true
/@iconify/json@2.2.183:
resolution: {integrity: sha512-LvlU0SWHlDGEmX9XZpK5lVVANRQNdToF2Vd0CgV+q6ntEYtza2QEvKHY318m+9sCEMm5CH6RkaSOtWTguAENjQ==}
/@iconify/json@2.2.201:
resolution: {integrity: sha512-5jM9TAa55YSEfx2WX1/GsHL9FSSH1PsA38V3p26SDmnOSmfb3V7r5yBgO8oIFkXdFQFk59MgESEOziapNtTGkw==}
dependencies:
'@iconify/types': 2.0.0
pathe: 1.1.2
@@ -946,7 +946,7 @@ packages:
engines: {node: '>= 16'}
dependencies:
'@intlify/shared': 9.4.1
source-map-js: 1.0.2
source-map-js: 1.2.0
dev: true
/@intlify/message-compiler@9.9.1:
@@ -1705,7 +1705,7 @@ packages:
sirv: 2.0.4
dev: true
/@unocss/postcss@0.54.3(postcss@8.4.33):
/@unocss/postcss@0.54.3(postcss@8.4.38):
resolution: {integrity: sha512-LPVSa+euzeh9Nzsb/IJI2ZeW0SUeifn0dRmPtB3bTOHkVeVba8IFWPzU3grC+m2tU9ysiTLs/9U2tLObljfC3g==}
engines: {node: '>=14'}
peerDependencies:
@@ -1716,7 +1716,7 @@ packages:
css-tree: 2.3.1
fast-glob: 3.3.2
magic-string: 0.30.5
postcss: 8.4.33
postcss: 8.4.38
dev: true
/@unocss/preset-attributify@0.54.3:
@@ -6392,7 +6392,7 @@ packages:
engines: {node: '>=4'}
dev: true
/postcss-load-config@3.1.4(postcss@8.4.33):
/postcss-load-config@3.1.4(postcss@8.4.38):
resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==}
engines: {node: '>= 10'}
peerDependencies:
@@ -6405,7 +6405,7 @@ packages:
optional: true
dependencies:
lilconfig: 2.1.0
postcss: 8.4.33
postcss: 8.4.38
yaml: 1.10.2
dev: true
@@ -6425,6 +6425,15 @@ packages:
picocolors: 1.0.0
source-map-js: 1.0.2
/postcss@8.4.38:
resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.7
picocolors: 1.0.0
source-map-js: 1.2.0
dev: true
/prelude-ls@1.2.1:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
@@ -7065,6 +7074,11 @@ packages:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
/source-map-js@1.2.0:
resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==}
engines: {node: '>=0.10.0'}
dev: true
/source-map-support@0.5.21:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
dependencies:
@@ -7532,7 +7546,7 @@ packages:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true
/tsup@6.7.0(postcss@8.4.33)(typescript@4.9.5):
/tsup@6.7.0(postcss@8.4.38)(typescript@4.9.5):
resolution: {integrity: sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==}
engines: {node: '>=14.18'}
hasBin: true
@@ -7556,8 +7570,8 @@ packages:
execa: 5.1.1
globby: 11.1.0
joycon: 3.1.1
postcss: 8.4.33
postcss-load-config: 3.1.4(postcss@8.4.33)
postcss: 8.4.38
postcss-load-config: 3.1.4(postcss@8.4.38)
resolve-from: 5.0.0
rollup: 3.29.4
source-map: 0.8.0-beta.0
@@ -7767,7 +7781,7 @@ packages:
engines: {node: '>= 10.0.0'}
dev: true
/unocss@0.54.3(postcss@8.4.33)(vite@3.2.8):
/unocss@0.54.3(postcss@8.4.38)(vite@3.2.8):
resolution: {integrity: sha512-uaoCKFigRkqceLmBrtWhLqQR6D6NyBAtSFVUnM1m57BSqA0EwAFmBsgoynzAmZRTQQFsPrBzKQjEmaCUTyUd9Q==}
engines: {node: '>=14'}
peerDependencies:
@@ -7780,7 +7794,7 @@ packages:
'@unocss/cli': 0.54.3
'@unocss/core': 0.54.3
'@unocss/extractor-arbitrary-variants': 0.54.3
'@unocss/postcss': 0.54.3(postcss@8.4.33)
'@unocss/postcss': 0.54.3(postcss@8.4.38)
'@unocss/preset-attributify': 0.54.3
'@unocss/preset-icons': 0.54.3
'@unocss/preset-mini': 0.54.3

View File

@@ -5,23 +5,23 @@ import { getUserID, isHomePage } from '~/utils/main'
const { t } = useI18n()
const list = [
{ name: t('topbar.notifications'), url: '//message.bilibili.com' },
{ name: t('topbar.moments'), url: '//t.bilibili.com/' },
{ name: t('topbar.favorites'), url: `//space.bilibili.com/${getUserID() ?? ''}/favlist` },
{ name: t('topbar.history'), url: '//www.bilibili.com/account/history' },
{ name: t('topbar.watch_later'), url: '//www.bilibili.com/watchlater/#/list' },
{ name: t('topbar.creative_center'), url: '//member.bilibili.com/platform/home' },
{ name: t('topbar.notifications'), url: '//message.bilibili.com', icon: 'i-mingcute:notification-line' },
{ name: t('topbar.moments'), url: '//t.bilibili.com/', icon: 'i-tabler:windmill' },
{ name: t('topbar.favorites'), url: `//space.bilibili.com/${getUserID() ?? ''}/favlist`, icon: 'i-mingcute:star-line' },
{ name: t('topbar.history'), url: '//www.bilibili.com/account/history', icon: 'i-mingcute:time-line' },
{ name: t('topbar.watch_later'), url: '//www.bilibili.com/watchlater/#/list', icon: 'i-mingcute:carplay-line' },
{ name: t('topbar.creative_center'), url: '//member.bilibili.com/platform/home', icon: 'i-mingcute:bulb-line' },
]
</script>
<template>
<div
style="box-shadow: var(--bew-shadow-3)"
bg="$bew-elevated-solid-1"
w="170px"
w="180px"
p="4"
rounded="$bew-radius"
flex="~ col"
style="box-shadow: var(--bew-shadow-3)"
>
<a
v-for="item in list"
@@ -35,11 +35,10 @@ const list = [
transition="all duration-300"
m="b-1 last:b-0"
flex="~"
justify="between"
items="center"
h="35px"
>
{{ item.name }}
<i :class="item.icon" class="mr-4" />
<span class="flex-1">{{ item.name }}</span>
</a>
</div>
</template>

View File

@@ -10,26 +10,31 @@ const list = reactive([
name: t('topbar.noti_dropdown.replys'),
url: 'https://message.bilibili.com/#/reply',
unreadCount: 0,
icon: 'i-mingcute:share-forward-line',
},
{
name: t('topbar.noti_dropdown.mentions'),
url: 'https://message.bilibili.com/#/at',
unreadCount: 0,
icon: 'i-mingcute:at-line',
},
{
name: t('topbar.noti_dropdown.likes'),
url: 'https://message.bilibili.com/#/love',
unreadCount: 0,
icon: 'i-mingcute:thumb-up-2-line',
},
{
name: t('topbar.noti_dropdown.messages'),
url: 'https://message.bilibili.com/#/system',
unreadCount: 0,
icon: 'i-mingcute:mail-line',
},
{
name: t('topbar.noti_dropdown.chats'),
url: 'https://message.bilibili.com/#/whisper',
unreadCount: 0,
icon: 'i-mingcute:message-3-line',
},
],
)
@@ -92,14 +97,12 @@ function getUnreadMessageCount() {
transition="all duration-300"
m="b-1 last:b-0"
flex="~"
justify="between"
items="center"
h="35px"
>
{{ item.name }}
<template
v-if="item.unreadCount > 0"
>
<i :class="item.icon" />
<span class="flex-1 ml-2 mr-1">{{ item.name }}</span>
<template v-if="item.unreadCount > 0">
<div
bg="$bew-theme-color"
rounded="full"
@@ -108,7 +111,7 @@ function getUnreadMessageCount() {
min-w="21px"
min-h="21px"
>
{{ item.unreadCount > 999 ? '999+' : item.unreadCount }}
{{ item.unreadCount > 99 ? '99+' : item.unreadCount }}
</div>
</template>
</a>

View File

@@ -5,7 +5,14 @@ export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons(),
presetIcons({
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
'width': '1.2em',
'height': '1.2em',
},
}),
presetTypography(),
],
transformers: [