feat(ui): add hidden-files toggle and i18n updates (#214)

* feat(search): add multi-token regex and wildcard support

* feat(ui): add layout toggle button in Model Manager header

* feat(ui): add hidden-files toggle and i18n updates

- Added a new header button in the Model Manager to toggle display of
hidden files/folders (dot-prefixed). This updates the existing
`ModelManager.Scan.IncludeHiddenFiles` setting, persists it, and
refreshes the dialog so changes apply immediately.
- Button shows dynamic icon + tooltip:
  - 👁 "Show hidden files"
  - 👁‍🗨 "Hide hidden files"

- Updated i18n locale files:
  - en.json: added strings for both the layout toggle and hidden-files toggle
  - zh.json: added translations for the same strings

Note: normally these i18n keys would have been split between the layout
commit and this one, but they are grouped here for simplicity so all UI
strings for the new header buttons are introduced together.

---------

Co-authored-by: Hayden <48267247+hayden-fr@users.noreply.github.com>
This commit is contained in:
Ainaemaet
2026-02-26 15:09:26 +08:00
committed by GitHub
co-authored by Hayden
parent 0fdbc5d7be
commit dc1d12649a
4 changed files with 21 additions and 2 deletions
+10
View File
@@ -92,6 +92,16 @@ onMounted(() => {
const openManagerDialog = () => {
const { cardWidth, gutter, aspect, flat } = config
// choose icon depending on current layout
const layoutIcon = flat.value ? 'pi pi-folder-open' : 'pi pi-th-large'
// determine hidden files setting
const includeHidden =
app.ui?.settings.getSettingValue('ModelManager.Scan.IncludeHiddenFiles') ??
false
const hiddenIcon = includeHidden ? 'pi pi-eye' : 'pi pi-eye-slash'
const hiddenTooltip = includeHidden
? t('hideHiddenFiles')
: t('showHiddenFiles')
const layoutIcon = flat.value ? 'pi pi-th-large' : 'pi pi-folder-open'
+1
View File
@@ -278,6 +278,7 @@ const list = computed(() => {
})
})
const contentStyle = computed(() => ({
gridTemplateColumns: `repeat(auto-fit, ${cardSize.value.width}px)`,
gap: `${gutter}px`,
+5 -1
View File
@@ -74,5 +74,9 @@
"ui": "UI",
"cardSize": "Card Size",
"useFlatUI": "Flat Layout"
}
},
"switchToFolderView": "Switch to Folder View",
"switchToFlatView": "Switch to Flat View",
"hideHiddenFiles": "Hide hidden files",
"showHiddenFiles": "Show hidden files"
}
+5 -1
View File
@@ -74,5 +74,9 @@
"ui": "外观",
"cardSize": "卡片尺寸",
"useFlatUI": "展平布局"
}
},
"switchToFolderView": "切换到文件夹视图",
"switchToFlatView": "切换到平铺视图",
"hideHiddenFiles": "隐藏隐藏文件",
"showHiddenFiles": "显示隐藏文件"
}