Refactor MasterDetailMntC.vue for improved readability and consistency
This commit is contained in:
@@ -2,14 +2,14 @@ import { computed } from 'vue'
|
||||
import { useTheme } from 'vuetify'
|
||||
import { getNextThemeName } from '@/utils/theme'
|
||||
|
||||
export function useThemeToggle () {
|
||||
export function useThemeToggle() {
|
||||
const theme = useTheme()
|
||||
|
||||
const availableThemeNames = computed(() =>
|
||||
Object.keys(theme.themes.value ?? {}).filter((name) => name.startsWith('theme'))
|
||||
)
|
||||
|
||||
function toggleTheme () {
|
||||
function toggleTheme() {
|
||||
const names = availableThemeNames.value
|
||||
if (names.length === 0) return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user