2 lines
689 B
JavaScript
2 lines
689 B
JavaScript
"use strict";const e=require("../common/vendor.js"),s=require("../composables/useCommon.js"),t=e.defineStore("app",{state:()=>({showExecuting:!1,workflows_all:[],home_tagActiveIndex:0,home_tagsList:[],tabbarIndex:0,user:{},localTasks:[],showPay:!1}),actions:{init(){this.getUser()},toggleShowExecuting(){this.showExecuting=!this.showExecuting},async initWorkFlows_All(){this.workflows_all=await s.getApps()},setUser(s){this.user={...this.user,...s},e.index.setStorageSync("user",JSON.stringify(this.user))},clearUser(){this.user={},e.index.removeStorageSync("user")},getUser(){const s=e.index.getStorageSync("user");return s&&(this.user=JSON.parse(s)),this.user}}});exports.useAppStore=t;
|