diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index b68d16be..a33d94ac 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.0 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/.vscode/settings.json b/.vscode/settings.json index 84ef2778..2fa133da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,8 @@ { "cSpell.words": [ + "bewly", "bilibili", + "unocss", "Vitesse", "webext" ], diff --git a/CHANGELOG.md b/CHANGELOG.md index e96f6985..b1541593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## [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/package.json b/package.json index b8261c74..706e51ad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bewly-bewly", "displayName": "BewlyBewly", - "version": "0.15.5", + "version": "0.16.0", "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 51d0d733..8b081b1f 100644 --- a/src/background/messageListeners/video.ts +++ b/src/background/messageListeners/video.ts @@ -1,58 +1,57 @@ import browser from 'webextension-polyfill' function handleMessage(message: any) { - // #region APP端api,遺棄 - /** Recommend Videos */ - // if (message.contentScriptQuery === 'getRecommendVideos') { - // // https://github.com/indefined/UserScripts/blob/master/bilibiliHome/bilibiliHome.API.md#%E8%8E%B7%E5%8F%96%E9%A6%96%E9%A1%B5%E5%86%85%E5%AE%B9 - // const url = `${APP_URL}/x/feed/index?build=1&idx=${message.idx}&appkey=27eb53fc9058f8c3&access_key=${message.accessKey}` - // return fetch(url) - // .then(response => response.json()) - // .then(data => data) - // .catch(error => console.error(error)) - // } - // /** Submit a video that is not of interest */ - // else if (message.contentScriptQuery === 'submitDislike') { - // // 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 - // let url = `https://app.bilibili.com/x/feed/dislike?access_key=${message.accessKey} - // &goto=${message.goto} - // &id=${message.id} - // &mid=${message.mid} - // &reason_id=${message.reasonID} - // &rid=${message.rid} - // &tag_id=${message.tagID} - // &build=5000000` + /** Submit a video that is not of interest */ + if (message.contentScriptQuery === 'dislikeVideo') { + // 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 + const url = `https://app.bilibili.com/x/feed/dislike?access_key=${message.access_key}` + + `&goto=${message.goto}` + + `&id=${message.id}` + + `&idx=${message.idx}` + // + `&mid=${message.mid}` + + `&reason_id=${message.reason_id}` + // + `&rid=${message.rid}` + // + `&tag_id=${message.tagId}` + + `&device=${message.device}` + + `&mobi_app=${message.mobi_app}` + + `&build=${message.build}` + + `&sign=${message.sign}` + + `&appkey=${message.appkey}` - // // remove url empty spaces - // url = url.replace(/\s+/g, '') + // // remove url empty spaces + // url = url.replace(/\s+/g, '') - // return fetch(url) - // .then(response => response.json()) - // .then(data => data) - // .catch(error => console.error(error)) - // } + return fetch(url) + .then(response => response.json()) + .then(data => data) + .catch(error => console.error(error)) + } - // /** Undo a video that is not of interest */ - // else if (message.contentScriptQuery === 'undoDislike') { - // // 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 - // let url = `https://app.bilibili.com/x/feed/dislike/cancel?access_key=${message.accessKey} - // &goto=${message.goto} - // &id=${message.id} - // &mid=${message.mid} - // &reason_id=${message.reasonID} - // &rid=${message.rid} - // &tag_id=${message.tagID} - // &build=5000000` + /** Undo a video that is not of interest */ + else if (message.contentScriptQuery === 'undoDislikeVideo') { + // 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 + const url = `https://app.bilibili.com/x/feed/dislike/cancel?access_key=${message.access_key}` + + `&goto=${message.goto}` + + `&id=${message.id}` + + `&idx=${message.idx}` + // + `&mid=${message.mid}` + + `&reason_id=${message.reason_id}` + // + `&rid=${message.rid}` + // + `&tag_id=${message.tagId}` + + `&device=${message.device}` + + `&mobi_app=${message.mobi_app}` + + `&build=${message.build}` + + `&sign=${message.sign}` + + `&appkey=${message.appkey}` - // // remove url empty spaces - // url = url.replace(/\s+/g, '') + // // remove url empty spaces + // url = url.replace(/\s+/g, '') - // return fetch(url) - // .then(response => response.json()) - // .then(data => data) - // .catch(error => console.error(error)) - // } - // #endregion + return fetch(url) + .then(response => response.json()) + .then(data => data) + .catch(error => console.error(error)) + } if (message.contentScriptQuery === 'getRecommendVideos') { const url = `https://api.bilibili.com/x/web-interface/index/top/feed/rcmd?fresh_idx=${message.refreshIdx}&feed_version=V2&fresh_type=4&ps=30&plat=1` diff --git a/src/components/Button.vue b/src/components/Button.vue index bc4f5ff4..9bb2cbdc 100644 --- a/src/components/Button.vue +++ b/src/components/Button.vue @@ -113,7 +113,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..95cc7b4e --- /dev/null +++ b/src/components/Dialog.vue @@ -0,0 +1,172 @@ + + + + + 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/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({