Files
Enterprise-Knowledge-Base/frontend/src/stores/ui.ts
T
wizardchen 602e8a3b88 refactor: Simplify UI styles and remove unused theme management
- Removed theme initialization and management from the UI store.
- Cleaned up CSS styles across multiple components, replacing CSS variables with fixed color values for consistency.
- Updated background colors and text colors to enhance UI clarity and responsiveness.
- Streamlined component styles to improve maintainability and readability.
2025-11-06 02:47:01 +08:00

41 lines
995 B
TypeScript

import { defineStore } from 'pinia'
export const useUIStore = defineStore('ui', {
state: () => ({
showSettingsModal: false,
showKBSettingsModal: false,
currentKBId: null as string | null,
settingsInitialSection: null as string | null,
settingsInitialSubSection: null as string | null
}),
actions: {
openSettings(section?: string, subSection?: string) {
this.settingsInitialSection = section || null
this.settingsInitialSubSection = subSection || null
this.showSettingsModal = true
},
closeSettings() {
this.showSettingsModal = false
this.settingsInitialSection = null
this.settingsInitialSubSection = null
},
toggleSettings() {
this.showSettingsModal = !this.showSettingsModal
},
openKBSettings(kbId: string) {
this.currentKBId = kbId
this.showKBSettingsModal = true
},
closeKBSettings() {
this.showKBSettingsModal = false
this.currentKBId = null
}
}
})