big refactor
This commit is contained in:
@@ -1,8 +1,55 @@
|
||||
<script setup lang="ts">
|
||||
usePageTitle('Settings')
|
||||
|
||||
const { isSuperAdmin } = useSuperAdmin()
|
||||
const sidebarFeatures = useSidebarFeatures()
|
||||
const isSuperAdmin = computed(() => {
|
||||
if (import.meta.client) {
|
||||
const stored = localStorage.getItem('policy-ui.superadmin')
|
||||
return stored !== '0'
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
const sidebarFeatures = reactive({
|
||||
showWorkstations: computed({
|
||||
get: () => {
|
||||
if (import.meta.client) {
|
||||
return localStorage.getItem('policy-ui.sidebar.workstations') !== 'false'
|
||||
}
|
||||
return true
|
||||
},
|
||||
set: (value: boolean) => {
|
||||
if (import.meta.client) {
|
||||
localStorage.setItem('policy-ui.sidebar.workstations', String(value))
|
||||
}
|
||||
}
|
||||
}),
|
||||
showAiTools: computed({
|
||||
get: () => {
|
||||
if (import.meta.client) {
|
||||
return localStorage.getItem('policy-ui.sidebar.ai-tools') !== 'false'
|
||||
}
|
||||
return true
|
||||
},
|
||||
set: (value: boolean) => {
|
||||
if (import.meta.client) {
|
||||
localStorage.setItem('policy-ui.sidebar.ai-tools', String(value))
|
||||
}
|
||||
}
|
||||
}),
|
||||
showLeadsHub: computed({
|
||||
get: () => {
|
||||
if (import.meta.client) {
|
||||
return localStorage.getItem('policy-ui.sidebar.leads-hub') !== 'false'
|
||||
}
|
||||
return true
|
||||
},
|
||||
set: (value: boolean) => {
|
||||
if (import.meta.client) {
|
||||
localStorage.setItem('policy-ui.sidebar.leads-hub', String(value))
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const cards = computed(() => {
|
||||
const base: { to: string; title: string; description: string; icon: string }[] = []
|
||||
|
||||
Reference in New Issue
Block a user