diff --git a/src/_locales/dict.setup-page.ts b/src/_locales/dict.setup-page.ts index 02a19f3a..3527fc39 100644 --- a/src/_locales/dict.setup-page.ts +++ b/src/_locales/dict.setup-page.ts @@ -2008,6 +2008,13 @@ Beispiele: "*", "ctrl+$", "ctrl+alt+g"`, zh_CN: '如果父标签页已折叠,则在下一级打开新标签页', zh_TW: '如果父分頁已折疊,則在下一層開啟新分頁', }, + 'settings.show_new_group_conf': { + en: 'Show config popup when creating a group', + ru: 'Показывать всплывающее окно конфигурации при создании группы', + de: 'Konfigurations-Popup anzeigen, wenn eine Gruppe erstellt wird', + zh_CN: '创建组时显示配置弹出窗口', + zh_TW: '建立群組時顯示配置彈出視窗', + }, 'settings.move_new_tab': { en: 'Place new tab (general rule)', ru: 'Общее правило', diff --git a/src/_locales/dict.sidebar.ts b/src/_locales/dict.sidebar.ts index 45cff9df..265734da 100644 --- a/src/_locales/dict.sidebar.ts +++ b/src/_locales/dict.sidebar.ts @@ -273,6 +273,13 @@ export const sidebarTranslations: Translations = { zh_CN: '组标题', zh_TW: '組標題', }, + 'popup.group_config.do_not_show_again': { + en: "Don't show again", + ru: 'Больше не показывать', + de: 'Nicht mehr anzeigen', + zh_CN: '不再显示', + zh_TW: '不再顯示', + }, // --- // -- Sub-panels diff --git a/src/defaults/settings.ts b/src/defaults/settings.ts index 52641ef5..d81e32ce 100644 --- a/src/defaults/settings.ts +++ b/src/defaults/settings.ts @@ -122,6 +122,7 @@ export const DEFAULT_SETTINGS: SettingsState = { autoGroupOnClose0Lvl: false, autoGroupOnCloseMouseOnly: false, ignoreFoldedParent: false, + showNewGroupConf: true, // Tabs colorization colorizeTabs: false, diff --git a/src/page.setup/components/settings.tabs.vue b/src/page.setup/components/settings.tabs.vue index bd3e1de0..01501e2a 100644 --- a/src/page.setup/components/settings.tabs.vue +++ b/src/page.setup/components/settings.tabs.vue @@ -289,6 +289,11 @@ section(ref="el") :inactive="!Settings.state.tabsTree" v-model:value="Settings.state.ignoreFoldedParent" @update:value="Settings.saveDebounced(150)") + ToggleField( + label="settings.show_new_group_conf" + :inactive="!Settings.state.tabsTree" + v-model:value="Settings.state.showNewGroupConf" + @update:value="Settings.saveDebounced(150)") .wrapper .sub-title: .text {{translate('settings.tabs_colorization_title')}} diff --git a/src/services/tabs.fg.groups.ts b/src/services/tabs.fg.groups.ts index 147fe42c..82392155 100644 --- a/src/services/tabs.fg.groups.ts +++ b/src/services/tabs.fg.groups.ts @@ -96,7 +96,7 @@ export async function groupTabs(tabIds: ID[], conf?: GroupConfig): Promise } // Show config popup - if (noConfig) { + if (noConfig && Settings.state.showNewGroupConf) { const result = await Tabs.openGroupConfigPopup(conf) if (result === GroupConfigResult.Cancel) return } diff --git a/src/sidebar/components/popup.group-config.vue b/src/sidebar/components/popup.group-config.vue index d5b23ee2..fb84a17f 100644 --- a/src/sidebar/components/popup.group-config.vue +++ b/src/sidebar/components/popup.group-config.vue @@ -11,7 +11,9 @@ :tabindex="'-1'" :line="true" @keydown="onTitleKD") - + ToggleField.-no-separator( + label="popup.group_config.do_not_show_again" + v-model:value="doNotShowAgain") .ctrls .btn(@click="onOk") {{translate('btn.create')}} .btn.-warn(@click="onCancel") {{translate('btn.cancel')}} @@ -23,9 +25,12 @@ import { translate } from 'src/dict' import { GroupConfigResult } from 'src/services/sidebar' import * as Popups from 'src/services/popups' import TextInput from 'src/components/text-input.vue' +import ToggleField from 'src/components/toggle-field.vue' import { TextInputComponent } from 'src/types' +import { Settings } from 'src/services/settings' const titleInput = ref(null) +const doNotShowAgain = ref(!Settings.state.showNewGroupConf) onMounted(() => { titleInput.value?.focus() @@ -42,6 +47,12 @@ function onTitleKD(e: KeyboardEvent): void { function onOk(): void { if (!Popups.reactive.groupConfigPopup) return + // Save settings + if (doNotShowAgain.value !== !Settings.state.showNewGroupConf) { + Settings.state.showNewGroupConf = !doNotShowAgain.value + Settings.saveDebounced(150) + } + Popups.reactive.groupConfigPopup.done(GroupConfigResult.Ok) Popups.reactive.groupConfigPopup = null } diff --git a/src/types/settings.ts b/src/types/settings.ts index 893e85ec..6f23b192 100644 --- a/src/types/settings.ts +++ b/src/types/settings.ts @@ -121,6 +121,7 @@ export interface SettingsState { autoGroupOnClose0Lvl: boolean autoGroupOnCloseMouseOnly: boolean ignoreFoldedParent: boolean + showNewGroupConf: boolean // Tabs colorization colorizeTabs: boolean