import { StorageSerializers } from '@vueuse/core'; import { MP_ORIGIN_TIMESTAMP } from '~/config'; import type { Preferences } from '~/types/preferences'; const defaultOptions: Partial = { hideDeleted: true, privateProxyList: [], privateProxyAuthorization: '', exportConfig: { dirname: '${title}', maxlength: 0, exportExcelIncludeContent: true, exportJsonIncludeComments: true, exportJsonIncludeContent: true, exportHtmlIncludeComments: true, }, downloadConfig: { forceDownloadContent: false, metadataOverrideContent: false, }, accountSyncSeconds: 3, syncDateRange: 'all', syncDatePoint: MP_ORIGIN_TIMESTAMP, }; export default () => { //@ts-ignore return useLocalStorage('preferences', defaultOptions, { serializer: StorageSerializers.object, mergeDefaults: true, }); };