From 0e3f843a831331297093b4ae8ba6b727f094e7bf Mon Sep 17 00:00:00 2001 From: Hakadao Date: Mon, 14 Oct 2024 02:13:22 +0800 Subject: [PATCH] feat(video-card-context-menu): hide some unimportant options --- src/_locales/cmn-CN.yml | 3 ++- src/_locales/cmn-TW.yml | 3 ++- src/_locales/en.yml | 1 + src/_locales/jyut.yml | 3 ++- .../VideoCardContextMenu/VideoCardContextMenu.vue | 12 ++++++------ 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index f6db17fa..e0318c05 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -365,8 +365,9 @@ dock: video_card: operation: not_interested: 不感兴趣 + open_in_new_tab: 新标签页打开 open_in_background: 后台打开 - open_in_new_window: 新标签页打开 + open_in_new_window: 新窗口打开 open_in_current_tab: 当前标签页打开 open_in_drawer: 抽屉打开 diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index 28714727..38a749b4 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -366,8 +366,9 @@ dock: video_card: operation: not_interested: 不感興趣 + open_in_new_tab: 新標籤頁開啟 open_in_background: 後台開啟 - open_in_new_window: 新索引標籤開啟 + open_in_new_window: 新視窗開啟 open_in_current_tab: 目前索引標籤開啟 open_in_drawer: 抽屜開啟 diff --git a/src/_locales/en.yml b/src/_locales/en.yml index 24673ece..92cebebd 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -368,6 +368,7 @@ dock: video_card: operation: not_interested: Not Interested + open_in_new_tab: Open in New Tab open_in_background: Open In Background open_in_new_window: Open in New Window open_in_current_tab: Open in Current Tab diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index 5be21b38..28caf109 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -365,8 +365,9 @@ dock: video_card: operation: not_interested: 唔鍾意 + open_in_new_tab: 新分頁開啓 open_in_background: 後台開啓 - open_in_new_window: 新分頁開啓 + open_in_new_window: 新視窗開啓 open_in_current_tab: 目前分頁開啓 open_in_drawer: 櫃桶開啓 diff --git a/src/components/VideoCard/VideoCardContextMenu/VideoCardContextMenu.vue b/src/components/VideoCard/VideoCardContextMenu/VideoCardContextMenu.vue index e50e1036..db590760 100644 --- a/src/components/VideoCard/VideoCardContextMenu/VideoCardContextMenu.vue +++ b/src/components/VideoCard/VideoCardContextMenu/VideoCardContextMenu.vue @@ -33,7 +33,7 @@ const showPipWindow = ref(false) const { openIframeDrawer } = useBewlyApp() enum VideoOption { - // OpenInNewTab, + OpenInNewTab, OpenInBackground, OpenInCurrentTab, OpenInNewWindow, @@ -50,7 +50,7 @@ enum VideoOption { const commonOptions = computed((): { command: VideoOption, name: string, icon: string, color?: string }[][] => { let result = [ [ - // { command: VideoOption.OpenInNewTab, name: 'Open in New Tab', icon: 'i-solar:square-top-down-bold-duotone' }, + { command: VideoOption.OpenInNewTab, name: t('video_card.operation.open_in_new_tab'), icon: 'i-solar:square-top-down-bold-duotone' }, { command: VideoOption.OpenInBackground, name: t('video_card.operation.open_in_background'), icon: 'i-solar:square-top-down-bold-duotone' }, { command: VideoOption.OpenInNewWindow, name: t('video_card.operation.open_in_new_window'), icon: 'i-solar:maximize-square-3-bold-duotone' }, { command: VideoOption.OpenInCurrentTab, name: t('video_card.operation.open_in_current_tab'), icon: 'i-solar:square-top-down-bold-duotone' }, @@ -59,13 +59,13 @@ const commonOptions = computed((): { command: VideoOption, name: string, icon: s [ { command: VideoOption.CopyVideoLink, name: t('video_card.operation.copy_video_link'), icon: 'i-solar:copy-bold-duotone' }, - { command: VideoOption.CopyBVNumber, name: t('video_card.operation.copy_bv_number'), icon: 'i-solar:copy-bold-duotone' }, - { command: VideoOption.CopyAVNumber, name: t('video_card.operation.copy_av_number'), icon: 'i-solar:copy-bold-duotone' }, + // { command: VideoOption.CopyBVNumber, name: t('video_card.operation.copy_bv_number'), icon: 'i-solar:copy-bold-duotone' }, + // { command: VideoOption.CopyAVNumber, name: t('video_card.operation.copy_av_number'), icon: 'i-solar:copy-bold-duotone' }, ], [ { command: VideoOption.ViewTheOriginalCover, name: t('video_card.operation.view_the_original_cover'), icon: 'i-solar:gallery-minimalistic-bold-duotone' }, - { command: VideoOption.ViewThisUserChannel, name: t('video_card.operation.view_this_user_channel'), icon: 'i-solar:user-bold-duotone' }, + // { command: VideoOption.ViewThisUserChannel, name: t('video_card.operation.view_this_user_channel'), icon: 'i-solar:user-bold-duotone' }, ], ] if (getVideoType() === 'bangumi') { @@ -123,7 +123,7 @@ function handleCommonCommand(command: VideoOption) { handleClose() break case VideoOption.CopyAVNumber: - navigator.clipboard.writeText(props.video.id.toString()) + navigator.clipboard.writeText(`av${props.video.id.toString()}`) handleClose() break