Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: daidr/paimon-webext
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: MiSheep/paimon-webext
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
Showing with 2,136 additions and 556 deletions.
  1. +9 −2 .eslintrc
  2. +3 −0 .github/FUNDING.yml
  3. +36 −9 README.md
  4. +206 −0 extension/_locales/en/messages.json
  5. +206 −0 extension/_locales/ru/messages.json
  6. +206 −0 extension/_locales/zh_CN/messages.json
  7. +4 −4 package.json
  8. +256 −82 src/background/main.ts
  9. +3 −6 src/logic/storage.ts
  10. +3 −2 src/manifest.ts
  11. +365 −93 src/options/Options.vue
  12. +288 −139 src/popup/Popup.vue
  13. +104 −0 src/types.ts
  14. +0 −219 src/utils.js
  15. +434 −0 src/utils.ts
  16. +1 −0 tsconfig.json
  17. +12 −0 windi.config.ts
11 changes: 9 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"extends": "@antfu"
}
"extends": "@antfu",
"rules": {
"vue/max-attributes-per-line": 0,
"arrow-parens": 0,
"space-before-function-paren": 0,
"brace-style": 0,
"no-console": 0
}
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
patreon: daidr
liberapay: daidr
custom: ['https://afdian.net/@daidr']
45 changes: 36 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,33 +3,60 @@

# 派蒙 Paimon

> 在浏览器中查看原神账号情况(目前仅支持官服、B服)
> Check your Genshin Impact account status in your browser. (China Server Support Only)
![GitHub package.json version](https://img.shields.io/github/package-json/v/daidr/paimon-webext)
![GitHub commit activity](https://img.shields.io/github/commit-activity/y/daidr/paimon-webext?label=commits)
[![Mozilla Add-on](https://img.shields.io/amo/users/%E6%B4%BE%E8%92%99-paimon?label=firefox&color=green)](https://addons.mozilla.org/zh-CN/firefox/addon/%E6%B4%BE%E8%92%99-paimon/)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/users/ecafadojbjpamdlbhdgmfhihdojeekdd?label=chrome&color=green)](https://chrome.google.com/webstore/detail/%E6%B4%BE%E8%92%99-paimon/ecafadojbjpamdlbhdgmfhihdojeekdd)
[![Microsoft Edge Addons](https://img.shields.io/badge/dynamic/json?label=edge&query=%24.activeInstallCount&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Famlfaonbmcninlpijbjkblmfgcanjdih&color=green)](https://microsoftedge.microsoft.com/addons/detail/%E6%B4%BE%E8%92%99-paimon/amlfaonbmcninlpijbjkblmfgcanjdih)

Developing...
> 在浏览器中查看原神账号情况
> Check your Genshin Impact account status in your browser.
### 开发
[Firefox Addons 链接](https://addons.mozilla.org/zh-CN/firefox/addon/%E6%B4%BE%E8%92%99-paimon/)

chrome/edge:
[Chrome Webstore 链接](https://chrome.google.com/webstore/detail/%E6%B4%BE%E8%92%99-paimon/ecafadojbjpamdlbhdgmfhihdojeekdd)

[Edge Webstore 链接](https://microsoftedge.microsoft.com/addons/detail/amlfaonbmcninlpijbjkblmfgcanjdih)

## 开发 Development

```
pnpm dev
```

firefox:
## 调试 Debug

### firefox:

```
pnpm start:firefox
```

### 构建
### chromium:

```
pnpm start:chromium
```

## 构建 Build

```
pnpm build
```

### 截图
## 使用截图 Screenshot

![popup](./screenshots/popup.png)

![options](./screenshots/options.png)
## 相关 Related
- UI 参考: [spencerwooo/PaimonMenuBar](https://github.com/spencerwooo/PaimonMenuBar)
- [[心得交流] [工具分享] 在浏览器里直接查看自己树脂情况的小工具](https://bbs.nga.cn/read.php?tid=31590015)

# 翻译 Translation
- 简体中文 @daidr
- English @daidr
- Русский @133718

## 协议 License

![License](https://img.shields.io/badge/license-MIT-blue.svg)
206 changes: 206 additions & 0 deletions extension/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
{
"pluginDesc": {
"message": "Check your Genshin Impact account status in your browser."
},
"cn_gf01": {
"message": "天空岛(CN)"
},
"cn_qd01": {
"message": "世界树(CN)"
},
"os_usa": {
"message": "NA"
},
"os_euro": {
"message": "EU"
},
"os_asia": {
"message": "Asia"
},
"os_cht": {
"message": "SAR"
},
"popup_hour": {
"message": ":"
},
"popup_minute": {
"message": ""
},
"popup_today": {
"message": "Today"
},
"popup_tomorrow": {
"message": "Tomorrow"
},
"popup_recovery_day": {
"message": "d"
},
"popup_recovery_hour": {
"message": "h"
},
"popup_recovery_minute": {
"message": "m"
},
"popup_recovery_second": {
"message": "s"
},
"popup_CurrentTitle": {
"message": "Current: "
},
"popup_ServerTitle": {
"message": "Server: "
},
"popup_ResinTitle": {
"message": "Current Resin"
},
"popup_FullyReplenishedTitle": {
"message": "Fully Replenished"
},
"popup_ETATitle": {
"message": "ETA"
},
"popup_ExpeditionsTitle": {
"message": "Expeditions"
},
"popup_ExploringStatus": {
"message": "Exploring"
},
"popup_FinishedStatus": {
"message": "Finished"
},
"popup_DailyCommissionsTitle": {
"message": "Daily commissions"
},
"popup_ExtraTaskReceived": {
"message": "(Received)"
},
"popup_ExtraTaskNotReceived": {
"message": "(Unreceived)"
},
"popup_RealmCurrencyTitle": {
"message": "Realm currency"
},
"popup_WeeklyBossesTitle": {
"message": "Weekly boss"
},
"popup_ParametricTransformerTitle": {
"message": "Parametric Transformer"
},
"popup_Available": {
"message": "Available"
},
"popup_ConfigurationTitle": {
"message": "Configuration"
},
"popup_ConfigurationTips": {
"message": "You just need to complete a few simple configurations, and then you are ready to enjoy it!"
},
"popup_ConfigurationButtonText": {
"message": "Open Options"
},
"popup_UpdateTimeTitle": {
"message": "Update: "
},
"popup_ErrorTitle": {
"message": "Error"
},
"popup_ErrorTips_1": {
"message": "We are unable to access your game data, try going to the options page to check if the configuration below is correct."
},
"popup_ErrorTips_2": {
"message": "Is the network currently available?"
},
"popup_ErrorTips_3": {
"message": "Are there any roles that are currently enabled?"
},
"popup_ErrorTips_4": {
"message": "If you are in China Mainland, you need a proxy to access the data of the overseas service"
},
"popup_ErrorOpenConfigButtonText": {
"message": "Open Options"
},
"popup_ErrorRefreshButtonText": {
"message": "Refresh"
},
"options_Nav_AddNewRole": {
"message": "Add New Roles"
},
"options_Nav_RoleListSetting": {
"message": "Role List & Setting"
},
"options_Nav_About": {
"message": "About"
},
"options_SelectServer": {
"message": "I. Choose Region"
},
"options_ServerCN": {
"message": "China Mainland"
},
"options_ServerOS": {
"message": "Oversea"
},
"options_FetchUserCookie": {
"message": "II. Fetch Cookies"
},
"options_Tips_1": {
"message": "We need your HoYoLAB user credentials (cookies) in order to access the relevant data."
},
"options_Tips_2": {
"message": "Don't worry, all these data are stored locally and will not be submitted to any third party service."
},
"options_Tips_3": {
"message": "Please make sure you are logged into <a href='https://bbs.mihoyo.com/ys' target='_blank'>HoYoLAB(China)</a> in this browser before clicking on the button below <br>After successfully obtaining cookies, the Extension will restore HoYoLAB to a non-logged-in state to prevent cookies from being invalidated due to manual logout"
},
"options_Tips_4": {
"message": "Please make sure you are logged into <a href='https://www.hoyolab.com/home' target='_blank'>HoYoLAB</a> in this browser before clicking on the button below <br>After successfully obtaining cookies, the Extension will restore HoYoLAB to a non-logged-in state to prevent cookies from being invalidated due to manual logout <br>(HoYoLAB blocked access from China Mainland, users from China Mainland need a proxy to get the data of overseas service)"
},
"options_FetchBtnTitle": {
"message": "Fetch Cookies"
},
"options_FetchBtnAlert_1": {
"message": "Failed to fetch roles"
},
"options_FetchBtnAlert_2": {
"message": "Successfully added $1 role"
},
"options_FetchBtnAlert_3": {
"message": "No role binding"
},
"options_Role_NoRoleFound": {
"message": "No role found"
},
"options_Role_IsEnabledTitle": {
"message": "Enabled"
},
"options_Role_RoleNameTitle": {
"message": "Nickname(uid)"
},
"options_Role_RoleServerTitle": {
"message": "Server"
},
"options_Role_RoleActionTitle": {
"message": "Operation"
},
"options_About_VersionTitle": {
"message": "Version"
},
"options_About_AuthorTitle": {
"message": "Author"
},
"options_About_Author": {
"message": "<a class='reverse' href='https://daidr.me' target='_blank'>daidr</a>"
},
"options_About_OpenSourceTitle": {
"message": "Open Source"
},
"options_About_OpenSource": {
"message": "The extension is open source and hosted on <a class='reverse' href='https://github.com/daidr/paimon-webext' target='_blank'>Github</a>, obey the MIT license to use the source code please.\nYou can try to create <a class='reverse' href='https://github.com/daidr/paimon-webext/issues' target='_blank'>Issues</a> if you have any problems and I'll help you solve them as much as possible. It would be better if you could create PR👍"
},
"options_About_ThankTitle": {
"message": "Credits"
},
"options_About_Thank": {
"message": "Special thanks to all contributors of this extension\nUI Reference: <a class='reverse' href='https://github.com/spencerwooo/PaimonMenuBar' target='_blank'>spencerwooo/PaimonMenuBar</a>"
}
}
Loading