|
@@ -2,11 +2,13 @@ import { AppState } from '@/types'
|
|
|
// import { ls } from '@/utils'
|
|
|
import { defineStore } from 'pinia'
|
|
|
import { getLanguage } from '@/lang'
|
|
|
+import { isMaxM } from '@/utils'
|
|
|
|
|
|
const useAppStore = defineStore({
|
|
|
id: 'app',
|
|
|
state: (): AppState => ({
|
|
|
device: 'desktop',
|
|
|
+ isMaxM: false,
|
|
|
// sidebar: {
|
|
|
// opened: true,
|
|
|
// withoutAnimation: false
|
|
@@ -16,6 +18,9 @@ const useAppStore = defineStore({
|
|
|
// size: 'small'
|
|
|
}),
|
|
|
actions: {
|
|
|
+ updateDevice() {
|
|
|
+ this.isMaxM = isMaxM()
|
|
|
+ },
|
|
|
// toggleSidebar() {
|
|
|
// this.sidebar.opened = !this.sidebar.opened
|
|
|
// this.sidebar.withoutAnimation = false
|