diff --git a/src/stores/settingStore.ts b/src/stores/settingStore.ts index 1061a0dda..3e2067fef 100644 --- a/src/stores/settingStore.ts +++ b/src/stores/settingStore.ts @@ -30,9 +30,23 @@ export const useSettingStore = defineStore('setting', { }), getters: { settingTree(): SettingTreeNode { - return buildTree(Object.values(this.settings), (setting: SettingParams) => - setting.id.split('.') + const root = buildTree( + Object.values(this.settings), + (setting: SettingParams) => setting.id.split('.') ) + + const floatingSettings = root.children.filter((node) => node.leaf) + if (floatingSettings.length) { + root.children = root.children.filter((node) => !node.leaf) + root.children.push({ + key: 'Other', + label: 'Other', + leaf: false, + children: floatingSettings + }) + } + + return root } }, actions: {