From 4420d7b41fc8500c79473f932ae75ae480a1d719 Mon Sep 17 00:00:00 2001 From: MengNianxiaoyao <2589141604@qq.com> Date: Sun, 31 Dec 2023 07:40:31 +0800 Subject: [PATCH 1/6] feat: add eslint check --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80635f8f..1317f92f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,22 @@ on: - main jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: pnpm + + - name: Install + run: pnpm install + + - name: Lint + run: pnpm run lint + build: runs-on: ${{ matrix.os }} From 8203b1fb1acd6b3da6ed20ff074fd6af48a19a9e Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 31 Dec 2023 16:07:22 +0800 Subject: [PATCH 2/6] style: adjust shadow styles --- src/styles/variables.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 461d6354..cb91cd93 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -12,8 +12,8 @@ 0 4px 6px -4px rgb(0 0 0 / 0.1); --bew-shadow-3: 0 20px 25px -5px rgb(0 0 0 / 0.14), 0 8px 10px -6px rgb(0 0 0 / 0.12); - --bew-shadow-4: 0 34px 60px -20px rgb(0 0 0 / 0.34), - 0 25px 50px -12px rgb(0 0 0 / 0.2), 0 12px 14px -8px rgb(0 0 0 / 0.14); + --bew-shadow-4: 0 34px 50px -20px rgb(0 0 0 / 0.16), + 0 32px 45px -12px rgb(0 0 0 / 0.14), 0 30px 40px -8px rgb(0 0 0 / 0.12); // #endregion --bew-logo-color: var(--bew-theme-color); @@ -135,8 +135,8 @@ 0 4px 6px -4px rgb(0 0 0 / 0.16); --bew-shadow-3: 0 20px 25px -5px rgb(0 0 0 / 0.22), 0 8px 10px -6px rgb(0 0 0 / 0.16); - --bew-shadow-4: 0 34px 60px -20px rgb(0 0 0 / 0.44), - 0 25px 50px -12px rgb(0 0 0 / 0.3), 0 12px 14px -8px rgb(0 0 0 / 0.18); + --bew-shadow-4: 0 34px 50px -20px rgb(0 0 0 / 0.44), + 0 32px 45px -12px rgb(0 0 0 / 0.3), 0 30px 40px -8px rgb(0 0 0 / 0.18); // #endregion --bew-logo-color: var(--bew-text-1); From fbf09733da3b87cc2703b7aaeca831338be1770a Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 31 Dec 2023 16:22:35 +0800 Subject: [PATCH 3/6] refactor: remove duplicate items from settings * style: remove settings panel overlay effect * i18n: add missing transitions to compatibility page in settings panel --- src/_locales/cmn-CN.yml | 27 +++++++----- src/_locales/cmn-TW.yml | 25 ++++++----- src/_locales/en.yml | 28 ++++++------ src/_locales/jyut.yml | 25 ++++++----- src/components/Settings/Settings.vue | 6 +-- .../Settings/components/Appearance.vue | 14 +++--- .../Settings/components/Compatibility.vue | 44 ++++++++----------- .../Settings/components/General.vue | 4 +- 8 files changed, 91 insertions(+), 82 deletions(-) diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index c6a4c102..be58c395 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -31,6 +31,7 @@ settings: menu_appearance: 外观 menu_search_page: 搜索页 menu_home: 首页 + menu_compatibility: 兼容性 menu_about: 关于 # Settings group @@ -50,7 +51,7 @@ settings: revoke: 取消授权 open_settings: 打开设置... - # General settings + # General select_language: 界面语言 select_language_opt: english: 英文 @@ -63,8 +64,6 @@ settings: enable_horizontal_scrolling: 启用横向滚动 enable_horizontal_scrolling_desc: 启用后,鼠标滚动时将直接滚动横向滚动列表 enable_video_ctrl_bar_on_video_card: 在视频卡片上显示视频控制栏 - topbar_visibility: 顶栏可见性 - topbar_visibility_desc: 用于兼容 Bilibili Evolved 自定义顶栏 auto_hide_topbar: 自动隐藏顶栏 dock_position: Dock 栏位置 dock_position_desc: 在屏幕中摆放位置 @@ -76,17 +75,13 @@ settings: dock_content_adjustment: Dock 内容调整 dock_content_adjustment_desc: 第一个激活的 Dock 项的页面将会是启动页面 - # Appearance settings + # Appearance theme: 主题 theme_opt: light: 亮色 dark: 暗色 auto: 自动 theme_color: 主题色 - follow_bilibili_evolved_color: 使用 Bilibili Evolved 主题色 - follow_bilibili_evolved_color_desc: 每次选完 Bilibili Evolved 主题色时,记得重新选中这一选项以更新配置 - adapt_to_other_page_styles: 适应其他页面样式 - adapt_to_other_page_styles_desc: 适应一些常见页面,以与 BewlyBewly 主题相匹配 wallpaper_mode: 背景图片模式 wallpaper_mode_desc: '使用 URL: 直接用网上图片的 URL 来设置背景图片。' wallpaper_mode_opt: @@ -101,7 +96,7 @@ settings: wallpaper_mask_opacity: 背景遮罩透明度调整 wallpaper_blur_intensity: 背景模糊强度调整 - # Search page settings + # Search page logo_color: Logo 颜色 logo_color_opt: white: 白 @@ -113,12 +108,10 @@ settings: choose_search_bar_focused_character: 选择搜索栏聚焦时出现的人物 individually_set_search_page_wallpaper: 单独设置搜索页背景 - # Home settings + # Home recommendation_mode: 推荐模式 recommendation_mode_desc: | 如果您想使用 app 端的推荐算法,请先授权 BewlyBewly 使用 access key。 - recommendation_mode_desc2: | - 因为B站对以前的API施加了限制,请求 access key 的方法不再适用。我们建议使用 Web 模式 🫠 authorize_app: 授权 BewlyBewly 使用 access key authorize_app_desc: | 授权使用后能在首页推送 bilibili App 端算法的推荐视频,授权 key 有效期约为一个月,过后记得重新授权获取 access key。 @@ -129,6 +122,16 @@ settings: settings_shared_with_the_search_page_desc: 这些设置都与搜索页共用 search_page_mode_wallpaper_fixed: 将搜索页模式的壁纸固定 + # Compatibility + # Common + adapt_to_other_page_styles: 适应其他页面样式 + adapt_to_other_page_styles_desc: 适应一些常见页面,以与 BewlyBewly 主题相匹配 + # Bilibili Evolved + follow_bilibili_evolved_color: 使用 Bilibili Evolved 主题色 + follow_bilibili_evolved_color_desc: 每次选完 Bilibili Evolved 主题色时,记得重新选中这一选项以更新配置 + topbar_visibility: 顶栏可见性 + topbar_visibility_desc: 用于兼容 Bilibili Evolved 自定义顶栏 + # About import_settings: 导入设置 export_settings: 导出设置 diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index 6efe7f80..825cb260 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -32,6 +32,7 @@ settings: menu_home: 首頁 menu_search_page: 搜尋頁 menu_about: 關於 + menu_compatibility: 相容性 # Settings group group_common: 通用 @@ -50,7 +51,7 @@ settings: revoke: 解除授權 open_settings: 打開設定... - # General settings + # General select_language: 介面語言 select_language_opt: english: 英文 @@ -63,8 +64,6 @@ settings: enable_horizontal_scrolling: 啟用橫向捲動 enable_horizontal_scrolling_desc: 啟用後,滑鼠捲動時將直接捲動橫向捲軸列表 enable_video_ctrl_bar_on_video_card: 在影片卡片上顯示影片控制欄 - topbar_visibility: 頂欄可視性 - topbar_visibility_desc: 用於相容 Bilibili Evolved 自訂頂欄 auto_hide_topbar: 自動隱藏頂欄 dock_position: Dock 位置 dock_position_desc: 螢幕上的位置 @@ -76,17 +75,13 @@ settings: dock_content_adjustment: Dock 內容調整 dock_content_adjustment_desc: 第一個啓用的 Dock 項目的頁面將是起始頁面 - # Appearance settings + # Appearance theme: 主題 theme_opt: light: 淺色 dark: 深色 auto: 自動 theme_color: 主題色 - follow_bilibili_evolved_color: 使用 Bilibili Evolved 主題色 - follow_bilibili_evolved_color_desc: 每次變更 Bilibili Evolved 主題色後,記得重新選取此選項以更新配置 - adapt_to_other_page_styles: 適應其他頁面風格 - adapt_to_other_page_styles_desc: 適應一些常見頁面,以配合 BewlyBewly 主題 wallpaper_mode: 背景圖片模式 wallpaper_mode_desc: '使用 URL: 直接用網上圖片的 URL 來設定背景圖片。' wallpaper_mode_opt: @@ -101,7 +96,7 @@ settings: wallpaper_mask_opacity: 背景遮蔽透明度調節 wallpaper_blur_intensity: 背景模糊強度調節 - # Search page settings + # Search page logo_color: Logo 顏色 logo_color_opt: white: 白 @@ -113,7 +108,7 @@ settings: choose_search_bar_focused_character: 選擇搜尋欄聚焦時出現的人物 individually_set_search_page_wallpaper: 單獨設定搜尋頁背景 - # Home settings + # Home recommendation_mode: 推薦模式 recommendation_mode_desc: | 如果您想要使用手機端的推薦演算法,請先授權 BewlyBewly 使用 access key。 @@ -130,6 +125,16 @@ settings: settings_shared_with_the_search_page_desc: 這些設定都與搜尋頁共用 search_page_mode_wallpaper_fixed: 將搜尋頁模式的背景固定 + # Compatibility + # Common + adapt_to_other_page_styles: 適應其他頁面風格 + adapt_to_other_page_styles_desc: 適應一些常見頁面,以配合 BewlyBewly 主題 + # Bilibili Evolved + topbar_visibility: 頂欄可視性 + topbar_visibility_desc: 用於與 Bilibili Evolved 客製化頂欄相容 + follow_bilibili_evolved_color: 使用 Bilibili Evolved 主題色 + follow_bilibili_evolved_color_desc: 每次變更 Bilibili Evolved 主題色後,記得重新選取此選項以更新配置 + # About import_settings: 匯入設定 export_settings: 匯出設定 diff --git a/src/_locales/en.yml b/src/_locales/en.yml index 1147f012..b3a860b8 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -31,6 +31,7 @@ settings: menu_appearance: Appearance menu_search_page: Search Page menu_home: Home + menu_compatibility: Compatibility menu_about: About # Settings group @@ -50,7 +51,7 @@ settings: revoke: Revoke open_settings: Open Settings... - # General settings + # General select_language: Language select_language_opt: english: English @@ -63,8 +64,6 @@ settings: enable_horizontal_scrolling: Enable horizontal scrolling enable_horizontal_scrolling_desc: After enabling, mouse scrolling will directly scroll the horizontal scroll list enable_video_ctrl_bar_on_video_card: Display the video control bar on the video card - topbar_visibility: Top bar visibility - topbar_visibility_desc: Compatible with Bilibili Evolved customize top bar auto_hide_topbar: Automatically hide the top bar dock_position: Dock position dock_position_desc: Position on screen @@ -76,17 +75,13 @@ settings: dock_content_adjustment: Dock content adjustment dock_content_adjustment_desc: The page of the first activated dock item will be the startup page - # Appearance settings + # Appearance theme: Theme theme_opt: light: Light dark: Dark auto: Auto theme_color: Theme color - follow_bilibili_evolved_color: Follow the Bilibili Evolved theme color - follow_bilibili_evolved_color_desc: After changing the theme color in Bilibili Evolved, you will need to re-select this option in order to update the theme color. - adapt_to_other_page_styles: Adapt to other page styles - adapt_to_other_page_styles_desc: Adapt to some common pages to match with the BewlyBewly theme wallpaper_mode: Wallpaper mode wallpaper_mode_desc: 'By URL: Choose an image from the Internet and use its URL to set it as the wallpaper.' wallpaper_mode_opt: @@ -101,7 +96,7 @@ settings: wallpaper_mask_opacity: Wallpaper masking opacity wallpaper_blur_intensity: Wallpaper blur intensity - # Search page settings + # Search page logo_color: Logo color logo_color_opt: white: White @@ -113,13 +108,10 @@ settings: choose_search_bar_focused_character: Choose the character that appears when the search bar is focused individually_set_search_page_wallpaper: Individually set search page wallpaper - # Home settings + # Home recommendation_mode: Recommendation mode recommendation_mode_desc: > If you want to use the recommendation algorithm on the app, please ensure that you authorize the BewlyBewly to use the access key first. - recommendation_mode_desc2: > - The methods to request the access key is no longer functioning, since Bilibili has imposed restrictions on the previous API. - We recommend using the web-based mode 🫠 authorize_app: Authorize the BewlyBewly to use the access key authorize_app_desc: > After authentication, you will receive the video recommendations based on the bilibili app recommendation algorithm. @@ -131,6 +123,16 @@ settings: settings_shared_with_the_search_page_desc: Those settings are used in common with the search page search_page_mode_wallpaper_fixed: Make the wallpaper of the search page mode fixed + # Compatibility + # Common + adapt_to_other_page_styles: Adapt to other page styles + adapt_to_other_page_styles_desc: Adapt to some common pages to match with the BewlyBewly theme + # Bilibili Evolved + follow_bilibili_evolved_color: Follow the Bilibili Evolved theme color + follow_bilibili_evolved_color_desc: After changing the theme color in Bilibili Evolved, you will need to re-select this option in order to update the theme color. + topbar_visibility: Top bar visibility + topbar_visibility_desc: Compatible with Bilibili Evolved customize top bar + # About import_settings: Import Settings export_settings: Export Settings diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index 63eb07e8..b06c1ea2 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -31,6 +31,7 @@ settings: menu_appearance: 版面 menu_home: 主頁 menu_search_page: 搵嘢頁 + menu_compatibility: 相容性 menu_about: 關於 # Settings group @@ -50,7 +51,7 @@ settings: revoke: 解除授權 open_settings: 打開設定... - # General settings + # General select_language: 介面語言 select_language_opt: english: 英文 @@ -63,8 +64,6 @@ settings: enable_horizontal_scrolling: 使用橫向捲動 enable_horizontal_scrolling_desc: 用咗之後,轆緊滑鼠就可以直接打橫掃水平捲軸列表 enable_video_ctrl_bar_on_video_card: 喺影片卡片上顯示影片控制欄 - topbar_visibility: 頂欄可視性 - topbar_visibility_desc: 用於兼容 Bilibili Evolved 客製化頂欄 auto_hide_topbar: 自動收埋頂欄 dock_position: Dock 放位 dock_position_desc: 放喺螢幕邊度 @@ -76,17 +75,13 @@ settings: dock_content_adjustment: Dock 內容調整 dock_content_adjustment_desc: 第一個啓用嘅 Dock 項個頁面會係開始頁面 - # Appearance settings + # Appearance theme: 色系 theme_opt: light: 淺色 dark: 深色 auto: 自動 theme_color: 佈景色 - follow_bilibili_evolved_color: 跟返 Bilibili Evolved 佈景色 - follow_bilibili_evolved_color_desc: 每次換完 Bilibili Evolved 佈景色嗰陣,記得揀多一次呢個選項愛嚟更新佈置 - adapt_to_other_page_styles: 適應其他版面風格 - adapt_to_other_page_styles_desc: 執執啲常用嘅版面,襯返 BewlyBewly 主題風格 wallpaper_mode: 背景圖片模式 wallpaper_mode_desc: '使用 URL: 直接用網上圖片嘅 URL 嚟到設定背景圖片。' wallpaper_mode_opt: @@ -101,7 +96,7 @@ settings: wallpaper_mask_opacity: 背景遮蔽透明度調節 wallpaper_blur_intensity: 背景模糊強度調節 - # Search page settings + # Search page logo_color: Logo 顏色 logo_color_opt: white: 白 @@ -113,7 +108,7 @@ settings: choose_search_bar_focused_character: 揀個喺搜尋欄聚焦嗰陣出現嘅人物 individually_set_search_page_wallpaper: 單獨設定搵嘢頁背景 - # Home settings + # Home recommendation_mode: 推介模式 recommendation_mode_desc: | 若然你想用手機版嘅推介演算法,就要俾 BewlyBewly 批准使用存取 access key。 @@ -130,6 +125,16 @@ settings: settings_shared_with_the_search_page_desc: 呢啲設定都同搵嘢頁共用 search_page_mode_wallpaper_fixed: 定住搵嘢頁模式嘅背景 + # Compatibility + # Common + adapt_to_other_page_styles: 適應其他版面風格 + adapt_to_other_page_styles_desc: 執執啲常用嘅版面,襯返 BewlyBewly 主題風格 + # Bilibili Evolved + follow_bilibili_evolved_color: 跟返 Bilibili Evolved 佈景色 + follow_bilibili_evolved_color_desc: 每次換完 Bilibili Evolved 佈景色嗰陣,記得揀多一次呢個選項愛嚟更新佈置 + topbar_visibility: 頂欄可視性 + topbar_visibility_desc: 用於兼容 Bilibili Evolved 客製化頂欄 + # About import_settings: 匯入設定 export_settings: 匯出設定 diff --git a/src/components/Settings/Settings.vue b/src/components/Settings/Settings.vue index 3bcd3cec..477f1e21 100644 --- a/src/components/Settings/Settings.vue +++ b/src/components/Settings/Settings.vue @@ -61,7 +61,7 @@ const settingsMenuItems = computed((): MenuItem[] => { value: MenuType.Compatibility, icon: 'mingcute:polygon-line', iconActivated: 'mingcute:polygon-fill', - title: 'Compatibility', + title: t('settings.menu_compatibility'), }, { value: MenuType.About, @@ -105,13 +105,13 @@ function setCurrentTitle() {