diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20b4b951..d4085e03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,14 @@ on: # 项目源代码所在的分支 - main - dev + paths-ignore: + # Changes involving the following path files will not trigger the workflow + # 涉及以下路径文件的更改不会触发工作流 + - LICENSE + - README-cmn_CN.md + - README-cmn_TW.md + - README-jyut.md + - '.github/**' jobs: lint: @@ -46,3 +54,12 @@ jobs: with: name: BewlyBewly Zip path: extension + + - name: Build Extension + run: pnpm build-firefox + + - name: Upload Zip + uses: actions/upload-artifact@v3 + with: + name: BewlyBewly Zip + path: extension-firefox diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index b68d16be..d0584e26 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -19,6 +19,6 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} release-type: node package-name: release-please-action - release-as: 0.15.5 + release-as: 0.16.1 signoff: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>' changelog-types: '[{"type":"types","section":"Types","hidden":false},{"type":"revert","section":"Reverts","hidden":false},{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"improvement","section":"Feature Improvements","hidden":false},{"type":"docs","section":"Docs","hidden":false},{"type":"i18n","section":"I18n","hidden":true},{"type":"style","section":"Style Changes","hidden":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa5fed69..ede790ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,15 +36,21 @@ jobs: run: pnpm install - name: Build - run: pnpm build + run: | + pnpm build + pnpm build-firefox - name: Build Extension - run: pnpm pack:zip + run: | + pnpm pack:zip + pnpm pack:zip-firefox - name: Upload assets to a Release uses: meeDamian/github-release@v2.0.3 with: - files: extension.zip + files: | + extension.zip + extension-firefox.zip token: ${{ secrets.RELEASE_TOKEN }} allow_override: true gzip: false diff --git a/.github/workflows/sync-dev-firefox.yml b/.github/workflows/sync-dev-firefox.yml deleted file mode 100644 index a79a1680..00000000 --- a/.github/workflows/sync-dev-firefox.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Sync Back to Dev Firefox -on: - push: - branches: - - dev - -jobs: - sync-branches: - if: github.repository == 'hakadao/BewlyBewly' - runs-on: ubuntu-latest - name: Syncing branches - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Node - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Opening pull request - id: pull - uses: tretuna/sync-branches@1.4.0 - with: - GITHUB_TOKEN: ${{secrets.SYNC_TOKEN}} - FROM_BRANCH: dev - TO_BRANCH: dev-firefox diff --git a/.vscode/settings.json b/.vscode/settings.json index 6dbb6575..f6e7dd54 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,11 @@ { "cSpell.words": [ + "WATCHLATER", + "bewly", + "bilibili", + "unocss", "Vitesse", - "WATCHLATER" + "webext" ], "typescript.tsdk": "node_modules/typescript/lib", "vite.autoStart": false, diff --git a/CHANGELOG.md b/CHANGELOG.md index e96f6985..5d1fc753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,59 @@ # Changelog +## [0.16.1](https://github.com/hakadao/BewlyBewly/compare/v0.16.0...v0.16.1) (2024-04-08) + + +### Features + +* adjust dialog styles && add tertiary type to button ([020889f](https://github.com/hakadao/BewlyBewly/commit/020889f8474c812392194210684a8603066b6a6d)) + + +### Bug Fixes + +* **ForYou:** Fix issue with dislike functionality in ForYou.vue component ([1074834](https://github.com/hakadao/BewlyBewly/commit/10748340672dc12cc18e646410fbac2cd27e031b)) +* **MorePop:** add missing watch later entry ([b657fed](https://github.com/hakadao/BewlyBewly/commit/b657fedc74f571c4bfc2a6b07eb0fdb3ae4bdc1f)) +* **VideoCard:** correct styling distortion when in horizontal mode ([f9be380](https://github.com/hakadao/BewlyBewly/commit/f9be38047194b91f7d2c1be8565cf6f987adef44)) + + +### Style Changes + +* **Dialog:** adjust dialog styles ([b39e876](https://github.com/hakadao/BewlyBewly/commit/b39e876148cfd8d8eba7e4bfaf64b9e5ae5d1af6)) + +## [0.16.0](https://github.com/hakadao/BewlyBewly/compare/v0.15.5...v0.16.0) (2024-04-07) + + +### Features + +* add delay hover for topbar ([4a1f0a2](https://github.com/hakadao/BewlyBewly/commit/4a1f0a278ce413eeb54a7d50d49618afd7bc841e)) +* add play all button to FavoritesPop & WatchLaterPop ([dd75b9d](https://github.com/hakadao/BewlyBewly/commit/dd75b9d038eae2468286df62fc56f2ea2f3e57f3)) +* add some details for dock ([0cb2142](https://github.com/hakadao/BewlyBewly/commit/0cb21427c519bbe85552cba492c8c3c1ac4b8da7)) +* adjust two bilibili evolved's buttons to match the BewlyBewly theme ([#423](https://github.com/hakadao/BewlyBewly/issues/423)) ([c55e86f](https://github.com/hakadao/BewlyBewly/commit/c55e86fdc32cd1520cae88f54d3ed3dfce2bc2ca)) +* **Appearance:** add wallpaper change watcher ([ec7ffaa](https://github.com/hakadao/BewlyBewly/commit/ec7ffaa9c467e77e8c508bf0c79ea72d5878e359)) +* **Home:** clicking the tab will back to top and refresh data on homepage ([#419](https://github.com/hakadao/BewlyBewly/issues/419)) ([aae391d](https://github.com/hakadao/BewlyBewly/commit/aae391d9f49eef3a8e3df98874207baedb0af0b8)) +* **VideoCard:** improve not interested feature ([ba783ff](https://github.com/hakadao/BewlyBewly/commit/ba783ff0763ae758aa8d2ff7fc49873ca83a89bb)) + + +### Bug Fixes + +* attempt to resolve "EBUSY error from 'C:\DumpStack.log.tmp'" ([8009d8b](https://github.com/hakadao/BewlyBewly/commit/8009d8b93a7e62faefc85a55c3855876eed8ca6c)) +* attempt to resolve "EBUSY error from 'C:\DumpStack.log.tmp'" ([60c2740](https://github.com/hakadao/BewlyBewly/commit/60c274076f49ee22006d29086ae9c12fa59cde83)) +* cleanup fn ([#482](https://github.com/hakadao/BewlyBewly/issues/482)) ([b00d9b2](https://github.com/hakadao/BewlyBewly/commit/b00d9b271015a10798b5475ee9451234a8656f61)) +* **Following:** resolve the "no more content" & "need to login first" occurring together ([69b6d86](https://github.com/hakadao/BewlyBewly/commit/69b6d865ad2548c82d8d7a233ce26ff9334d71cf)) +* **Trending:** resolve the infinite data retrieval issus ([#445](https://github.com/hakadao/BewlyBewly/issues/445)) ([80b72c4](https://github.com/hakadao/BewlyBewly/commit/80b72c43b615d6b7a7f12246eb677fa3b7fa148b)) +* **VideoCard:** author avatar display issue in horizontal mode ([efacf5b](https://github.com/hakadao/BewlyBewly/commit/efacf5bd281afbcf63c72e6652a6160128f64e81)) + + +### Docs + +* add introduction section to readme ([2ce9926](https://github.com/hakadao/BewlyBewly/commit/2ce9926cec0625783687aee9f7c2871abfa8057b)) + + +### Style Changes + +* adjust style of frosted glasses ([b6b7ed7](https://github.com/hakadao/BewlyBewly/commit/b6b7ed7c5abbc098f081b845982048ff5ba17ae9)) +* **MomentsPop:** adjust styles ([#483](https://github.com/hakadao/BewlyBewly/issues/483)) ([f99086d](https://github.com/hakadao/BewlyBewly/commit/f99086dde9561f5f463672f74ccea9744f3bf4b3)) +* **VideoCard:** adjust removed status style ([cfe6fd5](https://github.com/hakadao/BewlyBewly/commit/cfe6fd5601ab4ea33890bbbc28ae43a692184ff0)) + ## [0.15.5](https://github.com/hakadao/BewlyBewly/compare/v0.15.4...v0.15.5) (2024-03-30) diff --git a/README-cmn_CN.md b/README-cmn_CN.md index b13318e2..431e0f54 100644 --- a/README-cmn_CN.md +++ b/README-cmn_CN.md @@ -20,6 +20,12 @@ ![Snipaste_2023-11-21_00-32-22](https://github.com/hakadao/BewlyBewly/assets/33394391/2533a1f9-3cb1-402e-96bb-3755404ddf02) ![Snipaste_2023-11-21_00-32-51](https://github.com/hakadao/BewlyBewly/assets/33394391/a439ea59-cc80-48aa-9c6a-ec5d4da98441) +## 👋 介绍 + +BewlyBewly 是一个用于 BiliBili 的浏览器扩展,旨在通过重新设计 BiliBili 用户界面来提升用户体验。设计灵感来自于 YouTube、Vision OS 和 iOS,从而实现了更具视觉吸引力和用户友好性的界面。 + +该项目使用 [vitesse-webext](https://github.com/antfu/vitesse-webext) 模板进行开发。如果没有这个模板,可能无法开发出这个项目。 + ## ⬇️ 安装 ### 在线安装 diff --git a/README-cmn_TW.md b/README-cmn_TW.md index ed5e2252..33026be9 100644 --- a/README-cmn_TW.md +++ b/README-cmn_TW.md @@ -20,6 +20,12 @@ ![Snipaste_2023-11-21_00-32-22](https://github.com/hakadao/BewlyBewly/assets/33394391/2533a1f9-3cb1-402e-96bb-3755404ddf02) ![Snipaste_2023-11-21_00-32-51](https://github.com/hakadao/BewlyBewly/assets/33394391/a439ea59-cc80-48aa-9c6a-ec5d4da98441) +## 👋 介紹 + +BewlyBewly 是一個針對 BiliBili 的瀏覽器擴充功能,旨在透過重新設計 BiliBili 的介面來提升用戶體驗。設計靈感來自於 YouTube、Vision OS 和 iOS,使介面更具視覺吸引力和用戶友好性。 + +該專案使用 [vitesse-webext](https://github.com/antfu/vitesse-webext) 範例進行開發。如果沒有此範例,可能無法開發出此專案。 + ## ⬇️ 安裝 ### 線上安裝 diff --git a/README-jyut.md b/README-jyut.md index 815761de..cc906f4f 100644 --- a/README-jyut.md +++ b/README-jyut.md @@ -20,6 +20,12 @@ ![Snipaste_2023-11-21_00-32-22](https://github.com/hakadao/BewlyBewly/assets/33394391/2533a1f9-3cb1-402e-96bb-3755404ddf02) ![Snipaste_2023-11-21_00-32-51](https://github.com/hakadao/BewlyBewly/assets/33394391/a439ea59-cc80-48aa-9c6a-ec5d4da98441) +## 👋 介紹 + +BewlyBewly 係一個用於 BiliBili 嘅瀏覽器延伸功能,目的係透過重新設計 BiliBili 嘅 UI 令到用戶體驗提升。設計靈感源於 YouTube、Vision OS 同 iOS,從而實現更具視覺吸引力同用戶友好嘅介面。 + +呢個專案係用咗 [vitesse-webext](https://github.com/antfu/vitesse-webext) 範例進行開發。若果冇咗呢個範例,BewlyBewly 得個吉。 + ## ⬇️ 單撈 ### 線上單嘢 diff --git a/README.md b/README.md index 1f2c2f75..fb825480 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ English | [简体中文](README-cmn_CN.md) | [正體中文](README-cmn_TW.md) | ![Snipaste_2023-11-21_00-32-22](https://github.com/hakadao/BewlyBewly/assets/33394391/2533a1f9-3cb1-402e-96bb-3755404ddf02) ![Snipaste_2023-11-21_00-32-51](https://github.com/hakadao/BewlyBewly/assets/33394391/a439ea59-cc80-48aa-9c6a-ec5d4da98441) +## 👋 Introduction + +BewlyBewly is a browser extension for BiliBili that aims to enhance the user experience by redesigning the BiliBili UI. The design is inspired by YouTube, Vision OS, and iOS, resulting in a more visually appealing and user-friendly interface. + +This project uses the [vitesse-webext](https://github.com/antfu/vitesse-webext) template for development. Without this template, it may not be possible to develop this project. + ## ⬇️ Installation ### Online Installation @@ -32,9 +38,9 @@ Even in the Edge browser, we strongly recommend you install it in the Chrome web ### Local Installation -[CI](https://github.com/hakadao/BewlyBewly/actions):Automatically build with the latest code +[CI](https://github.com/hakadao/BewlyBewly/actions): Automatically build with the latest code -[Releases](https://github.com/hakadao/BewlyBewly/releases):Stable version +[Releases](https://github.com/hakadao/BewlyBewly/releases): Stable version #### Edge & Chrome (RECOMMENDED) @@ -50,7 +56,7 @@ Opening the `edge://extensions` page in the Edge or `chrome://extensions` page i > Ensure you installed [extension.zip](https://github.com/hakadao/BewlyBewly/releases) and decompress this file. 1. Type in `edge://extensions/` in the address bar and press Enter -2. Turn on `Developer mode` then press `Load unpacked`
image +2. Turn on `Developer mode` then press `Load Unpacked`
image 3. Load the decompressed extension folder in your browser #### Chrome @@ -58,7 +64,7 @@ Opening the `edge://extensions` page in the Edge or `chrome://extensions` page i > Ensure you installed [extension.zip](https://github.com/hakadao/BewlyBewly/releases) and decompress this file. 1. Type in `chrome://extensions/` in the address bar and press Enter -2. Turn on `Developer mode` then press `Load unpacked`
Snipaste_2022-03-27_18-17-04 +2. Turn on `Developer mode` then press `Load Unpacked`
Snipaste_2022-03-27_18-17-04 3. Load the decompressed extension folder in your browser diff --git a/assets/rules.json b/assets/rules.json index ca397ae6..9c30657d 100644 --- a/assets/rules.json +++ b/assets/rules.json @@ -20,7 +20,8 @@ "condition": { "domainType": "thirdParty", "urlFilter": "||api.bilibili.com", - "resourceTypes": ["xmlhttprequest"] + "resourceTypes": ["xmlhttprequest"], + "requestMethods": ["post"] } }, { @@ -44,7 +45,8 @@ "condition": { "domainType": "thirdParty", "urlFilter": "||passport.bilibili.com", - "resourceTypes": ["xmlhttprequest"] + "resourceTypes": ["xmlhttprequest"], + "requestMethods": ["post"] } } ] diff --git a/package.json b/package.json index b8261c74..be4cccb2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bewly-bewly", "displayName": "BewlyBewly", - "version": "0.15.5", + "version": "0.16.1", "private": true, "packageManager": "pnpm@8.15.3", "description": "Just make a few small changes to your Bilibili homepage.", diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index 67c91608..9da32ea0 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -1,5 +1,6 @@ common: view_all: 查看更多 + play_all: 播放全部 loading: 加载中... undo: 还原 view: '{count}次' @@ -24,6 +25,8 @@ common: refresh: 刷新 reset: 重置 no_more_content: 没有更多内容了 + confirm: 确定 + cancel: 取消 settings: title: 设置 @@ -248,7 +251,8 @@ dock: light_mode: 亮色模式 settings: 设置 home: - not_interested_in: 对哪方面不感兴趣? + not_interested: 不感兴趣 + tell_us_why: 为什么这么做... video_removed: 视频已移除 for_you: 个性推荐 following: 正在关注 @@ -297,7 +301,6 @@ favorites: unfavorite: 取消收藏 watch_later: title: 稍后再看 - play_all: 播放全部 clear_all: 清空稍后再看 clear_all_confirm: |- 要清空稍后再看吗? diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index 5461bb32..dbb94088 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -1,5 +1,6 @@ common: view_all: 檢視所有 + play_all: 全部播放 loading: 載入中... undo: 復原 view: '{count}次' @@ -24,6 +25,8 @@ common: refresh: 重新整理 reset: 重置 no_more_content: 沒有更多內容了 + confirm: 確定 + cancel: 取消 settings: title: 設定 @@ -251,7 +254,8 @@ dock: light_mode: 淺色模式 settings: 設定 home: - not_interested_in: 對哪方面不感興趣? + not_interested: 不感興趣 + tell_us_why: 為什麼這樣做... video_removed: 影片已移除 for_you: 爲你推薦 following: 正在跟隨 @@ -300,7 +304,6 @@ favorites: unfavorite: 取消收藏 watch_later: title: 稍後觀看 - play_all: 全部播放 clear_all: 清空稍後觀看 clear_all_confirm: |- 要清空稍後觀看的影片嗎? diff --git a/src/_locales/en.yml b/src/_locales/en.yml index 155ededd..803e58f0 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -1,5 +1,6 @@ common: view_all: View ALL + play_all: Play ALL loading: Loading... undo: UNDO view: no view | {count} view | {count} views @@ -24,6 +25,8 @@ common: refresh: Refresh reset: Reset no_more_content: No more content now, owari da + confirm: Confirm + cancel: Cancel settings: title: Settings @@ -249,7 +252,8 @@ dock: light_mode: Light Mode settings: Settings home: - not_interested_in: Not interested in... + not_interested: Not interested + tell_us_why: Choose a reason why video_removed: Video removed for_you: For you following: Following @@ -296,7 +300,6 @@ favorites: unfavorite: Unfavorite watch_later: title: Watch Later - play_all: Play all clear_all: Clear all watch later clear_all_confirm: |- Clear all watch later? diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index 5b1a4319..076ab197 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -1,7 +1,8 @@ common: view_all: 睇晒佢哋 + play_all: 播晒佢哋 loading: 撈緊... - undo: 整返 + undo: 整返返去 view: '{count}次' viewWithoutNum: 次 danmaku: '{count} 彈幕' @@ -24,6 +25,8 @@ common: refresh: 重新整理 reset: 重置 no_more_content: 唔使睇喇,冇嘢喇 + confirm: 確定 + cancel: 取消 settings: title: 設定 @@ -251,8 +254,9 @@ dock: light_mode: 淺色模式 settings: 設定 home: - not_interested_in: 對邊方面冇癮? - video_removed: 經已鏟咗條片 + not_interested: 唔鍾意 + tell_us_why: 點解噉做... + video_removed: 已經鏟咗條片 for_you: 估你心水 following: Follow 緊 trending: 時下至 Hit @@ -300,7 +304,6 @@ favorites: unfavorite: 唔再愛喇 watch_later: title: 陣間至睇 - play_all: 播晒佢哋 clear_all: 剷曬陣間至睇啲片 clear_all_confirm: |- 係咪要剷曬陣間至睇啲片呀? diff --git a/src/background/messageListeners/video.ts b/src/background/messageListeners/video.ts index dc319b29..d1a52416 100644 --- a/src/background/messageListeners/video.ts +++ b/src/background/messageListeners/video.ts @@ -33,16 +33,43 @@ const API_VIDEO: APIMAP = { }, afterHandle: AHS.J_D, }, + // https://github.com/indefined/UserScripts/blob/master/bilibiliHome/bilibiliHome.API.md#%E6%8F%90%E4%BA%A4%E4%B8%8D%E5%96%9C%E6%AC%A2 dislikeVideo: { - url: 'https://api.bilibili.com/x/feed/dislike', + url: 'https://app.bilibili.com/x/feed/dislike', _fetch: { - method: 'post', + method: 'get', }, params: { access_key: '', - appkey: '27eb53fc9058f8c3', - feedback_id: '', + goto: '', + id: 0, + idx: 0, reason_id: 1, + device: '', + mobi_app: '', + build: 0, + appkey: '', + sign: '', + }, + afterHandle: AHS.J_D, + }, + // https://github.com/indefined/UserScripts/blob/master/bilibiliHome/bilibiliHome.API.md#%E6%92%A4%E9%94%80%E4%B8%8D%E5%96%9C%E6%AC%A2 + undoDislikeVideo: { + url: 'https://app.bilibili.com/x/feed/dislike/cancel', + _fetch: { + method: 'get', + }, + params: { + access_key: '', + goto: '', + id: 0, + idx: 0, + reason_id: 1, + device: '', + mobi_app: '', + build: 0, + sign: '', + appkey: '', }, afterHandle: AHS.J_D, }, diff --git a/src/background/msg.define.ts b/src/background/msg.define.ts index e4a06817..d697cbd8 100644 --- a/src/background/msg.define.ts +++ b/src/background/msg.define.ts @@ -52,6 +52,7 @@ enum VIDEO { GET_RECOMMEND_VIDEOS = 'getRecommendVideos', GET_APP_RECOMMEND_VIDEOS = 'getAppRecommendVideos', DISLIKE_VIDEO = 'dislikeVideo', + UNDO_DISLIKE_VIDEO = 'undoDislikeVideo', GET_VIDEO_INFO = 'getVideoInfo', GET_VIDEO_COMMENTS = 'getVideoComments', GET_POPULAR_VIDEOS = 'getPopularVideos', diff --git a/src/components/Button.vue b/src/components/Button.vue index bc4f5ff4..337254fc 100644 --- a/src/components/Button.vue +++ b/src/components/Button.vue @@ -3,6 +3,7 @@ interface Props { type?: | 'default' | 'primary' | 'secondary' + | 'tertiary' | 'info' | 'success' | 'warning' @@ -92,6 +93,12 @@ function handleClick(evt: MouseEvent) { --b-button-text-color: var(--bew-text-1); } + &--type-tertiary { + --b-button-color: transparent; + --b-button-color-hover: var(--bew-fill-2); + --b-button-text-color: var(--bew-text-1); + } + &--type-error { --b-button-color: var(--bew-error-color); --b-button-color-hover: var(--bew-error-color) @@ -113,7 +120,7 @@ function handleClick(evt: MouseEvent) { } &--custom-color { - --at-apply: hover:opacity-80; + --at-apply: hover:opacity-70; } &--strong { diff --git a/src/components/Dialog.vue b/src/components/Dialog.vue new file mode 100644 index 00000000..88bd6a2f --- /dev/null +++ b/src/components/Dialog.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/components/Settings/Settings.vue b/src/components/Settings/Settings.vue index 487d7770..d51ee761 100644 --- a/src/components/Settings/Settings.vue +++ b/src/components/Settings/Settings.vue @@ -16,6 +16,7 @@ const settingsMenu = { [MenuType.SearchPage]: defineAsyncComponent(() => import('./components/SearchPage.vue')), [MenuType.Home]: defineAsyncComponent(() => import('./components/Home.vue')), [MenuType.Compatibility]: defineAsyncComponent(() => import('./components/Compatibility.vue')), + // [MenuType.BilibiliSettings]: defineAsyncComponent(() => import('./components/BilibiliSettings.vue')), [MenuType.About]: defineAsyncComponent(() => import('./components/About.vue')), } const activatedMenuItem = ref(MenuType.General) @@ -65,6 +66,12 @@ const settingsMenuItems = computed((): MenuItem[] => { iconActivated: 'mingcute:polygon-fill', title: t('settings.menu_compatibility'), }, + // { + // value: MenuType.BilibiliSettings, + // icon: 'ant-design:bilibili-outlined', + // iconActivated: 'ant-design:bilibili-outlined', + // title: 'Bilibili', + // }, { value: MenuType.About, icon: 'mingcute:information-line', diff --git a/src/components/Settings/components/Appearance.vue b/src/components/Settings/components/Appearance.vue index bc55ff29..6899ffea 100644 --- a/src/components/Settings/components/Appearance.vue +++ b/src/components/Settings/components/Appearance.vue @@ -66,6 +66,10 @@ const themeOptions = computed>(() => { ] }) +watch(() => settings.value.wallpaper, (newValue) => { + changeWallpaper(newValue) +}) + function changeThemeColor(color: string) { settings.value.themeColor = color } diff --git a/src/components/Settings/components/BilibiliSettings.vue b/src/components/Settings/components/BilibiliSettings.vue new file mode 100644 index 00000000..5ac6e84e --- /dev/null +++ b/src/components/Settings/components/BilibiliSettings.vue @@ -0,0 +1,20 @@ + diff --git a/src/components/Settings/types.ts b/src/components/Settings/types.ts index 4e77af4c..a4852b01 100644 --- a/src/components/Settings/types.ts +++ b/src/components/Settings/types.ts @@ -4,6 +4,7 @@ export enum MenuType { SearchPage = 'SearchPage', Home = 'Home', Compatibility = 'Compatibility', + BilibiliSettings = 'BilibiliSettings', About = 'About', } diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index 43f1e622..be662f34 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -69,6 +69,47 @@ const favoritesPopRef = ref() const scrollTop = ref(0) const oldScrollTop = ref(0) +// Avatar +const avatar = useDelayedHover({ + enter: () => openUserPanel(), + leave: () => closeUserPanel(), +}) +// Notifications +const notifications = useDelayedHover({ + enter: () => showNotificationsPop.value = true, + leave: () => showNotificationsPop.value = false, +}) +// Moments +const moments = useDelayedHover({ + enter: () => showMomentsPop.value = true, + leave: () => showMomentsPop.value = false, +}) +// Favorites +const favorites = useDelayedHover({ + enter: () => showFavoritesPop.value = true, + leave: () => showFavoritesPop.value = false, +}) +// Upload +const upload = useDelayedHover({ + enter: () => showUploadPop.value = true, + leave: () => showUploadPop.value = false, +}) +// History +const history = useDelayedHover({ + enter: () => showHistoryPop.value = true, + leave: () => showHistoryPop.value = false, +}) +// Watch Later +const watchLater = useDelayedHover({ + enter: () => showWatchLaterPop.value = true, + leave: () => showWatchLaterPop.value = false, +}) +// More +const more = useDelayedHover({ + enter: () => showMorePop.value = true, + leave: () => showMorePop.value = false, +}) + watch(() => settings.value.autoHideTopBar, (newVal) => { if (!newVal) toggleTopBarVisible(true) @@ -379,9 +420,8 @@ defineExpose({