mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
feat(settings): link opening behavior
This commit is contained in:
@@ -65,6 +65,7 @@ settings:
|
||||
|
||||
# Settings group
|
||||
group_common: 通用
|
||||
group_link_opening_behavior: 链接打开行为
|
||||
group_video_card: 视频卡片
|
||||
group_performance: 毛玻璃和性能
|
||||
group_topbar: 顶栏
|
||||
|
||||
@@ -65,6 +65,7 @@ settings:
|
||||
|
||||
# Settings group
|
||||
group_common: 常用
|
||||
group_link_opening_behavior: 連結開啟行為
|
||||
group_video_card: 影片卡片
|
||||
group_performance: 毛玻璃與效能
|
||||
group_topbar: 頂欄
|
||||
|
||||
@@ -65,6 +65,7 @@ settings:
|
||||
|
||||
# Settings group
|
||||
group_common: Common
|
||||
group_link_opening_behavior: Link opening behavior
|
||||
group_video_card: Video Card
|
||||
group_performance: Frosted Glass & Performance
|
||||
group_topbar: Top Bar
|
||||
|
||||
@@ -65,6 +65,7 @@ settings:
|
||||
|
||||
# Settings group
|
||||
group_common: 通用
|
||||
group_link_opening_behavior: 連結開啓行爲
|
||||
group_video_card: 影片卡片
|
||||
group_performance: 毛玻璃同效能
|
||||
group_topbar: 頂部欄
|
||||
|
||||
@@ -45,23 +45,6 @@ const dockPositions = computed(() => {
|
||||
]
|
||||
})
|
||||
|
||||
const topBarLinkOpenModeOptions = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.current_tab'),
|
||||
value: 'currentTab',
|
||||
},
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.current_tab_if_not_homepage'),
|
||||
value: 'currentTabIfNotHomepage',
|
||||
},
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.new_tab'),
|
||||
value: 'newTab',
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
const pageOptions = computed((): { label: string, icon: string, value: string }[] => {
|
||||
return mainStore.dockItems.map((e: any) => {
|
||||
return {
|
||||
@@ -109,9 +92,6 @@ function handleToggleDockItem(dockItem: any) {
|
||||
<SettingsItem :title="$t('settings.use_old_top_bar')">
|
||||
<Radio v-model="settings.useOldTopBar" />
|
||||
</SettingsItem>
|
||||
<SettingsItem :title="$t('settings.top_bar_link_opening_behavior')">
|
||||
<Select v-model="settings.topBarLinkOpenMode" :options="topBarLinkOpenModeOptions" w="full" />
|
||||
</SettingsItem>
|
||||
<SettingsItem :title="$t('settings.auto_hide_top_bar')">
|
||||
<Radio v-model="settings.autoHideTopBar" />
|
||||
</SettingsItem>
|
||||
|
||||
@@ -29,6 +29,23 @@ const langOptions = computed(() => {
|
||||
]
|
||||
})
|
||||
|
||||
const topBarLinkOpenModeOptions = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.current_tab'),
|
||||
value: 'currentTab',
|
||||
},
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.current_tab_if_not_homepage'),
|
||||
value: 'currentTabIfNotHomepage',
|
||||
},
|
||||
{
|
||||
label: t('settings.top_bar_link_opening_behavior_opt.new_tab'),
|
||||
value: 'newTab',
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
const videoCardOpenModeOptions = computed(() => {
|
||||
return [
|
||||
{
|
||||
@@ -83,13 +100,10 @@ watch(() => settings.value.language, (newValue) => {
|
||||
</SettingsItem>
|
||||
</SettingsItemGroup>
|
||||
|
||||
<SettingsItemGroup>
|
||||
<SettingsItem :title="$t('settings.block_ads')">
|
||||
<Radio v-model="settings.blockAds" />
|
||||
<SettingsItemGroup :title="$t('settings.group_link_opening_behavior')">
|
||||
<SettingsItem :title="$t('settings.top_bar_link_opening_behavior')">
|
||||
<Select v-model="settings.topBarLinkOpenMode" :options="topBarLinkOpenModeOptions" w="full" />
|
||||
</SettingsItem>
|
||||
</SettingsItemGroup>
|
||||
|
||||
<SettingsItemGroup :title="$t('settings.group_video_card')">
|
||||
<SettingsItem :title="$t('settings.video_card_link_opening_behavior')">
|
||||
<Select
|
||||
v-model="settings.videoCardLinkOpenMode"
|
||||
@@ -97,6 +111,15 @@ watch(() => settings.value.language, (newValue) => {
|
||||
w="full"
|
||||
/>
|
||||
</SettingsItem>
|
||||
</SettingsItemGroup>
|
||||
|
||||
<SettingsItemGroup>
|
||||
<SettingsItem :title="$t('settings.block_ads')">
|
||||
<Radio v-model="settings.blockAds" />
|
||||
</SettingsItem>
|
||||
</SettingsItemGroup>
|
||||
|
||||
<SettingsItemGroup :title="$t('settings.group_video_card')">
|
||||
<SettingsItem :title="$t('settings.enable_video_preview')">
|
||||
<Radio v-model="settings.enableVideoPreview" />
|
||||
</SettingsItem>
|
||||
|
||||
Reference in New Issue
Block a user