[New Feature] sub directories support (#135)
* feat: add close all dialog * feat: add new ui toggle setting * feat: add tree display ui * feat: add search and sort * feat: change model data structure * pref: Optimize model data structure * feat: set sub folder by choose
This commit is contained in:
@@ -24,6 +24,8 @@ export const useConfig = defineStore('config', (store) => {
|
||||
window.removeEventListener('resize', checkDeviceType)
|
||||
})
|
||||
|
||||
const flatLayout = ref(false)
|
||||
|
||||
const defaultCardSizeMap = readonly({
|
||||
'size.extraLarge': '240x320',
|
||||
'size.large': '180x240',
|
||||
@@ -64,6 +66,7 @@ export const useConfig = defineStore('config', (store) => {
|
||||
})
|
||||
},
|
||||
},
|
||||
flat: flatLayout,
|
||||
}
|
||||
|
||||
watch(cardSizeFlag, (val) => {
|
||||
@@ -172,6 +175,18 @@ function useAddConfigSettings(store: import('hooks/store').StoreProvider) {
|
||||
},
|
||||
})
|
||||
|
||||
app.ui?.settings.addSetting({
|
||||
id: 'ModelManager.UI.Flat',
|
||||
category: [t('modelManager'), t('setting.ui'), 'Flat'],
|
||||
name: t('setting.useFlatUI'),
|
||||
type: 'boolean',
|
||||
defaultValue: false,
|
||||
onChange(value) {
|
||||
store.dialog.closeAll()
|
||||
store.config.flat.value = value
|
||||
},
|
||||
})
|
||||
|
||||
// Scan information
|
||||
app.ui?.settings.addSetting({
|
||||
id: 'ModelManager.ScanFiles.Full',
|
||||
|
||||
Reference in New Issue
Block a user