2 lines
733 B
JavaScript
2 lines
733 B
JavaScript
|
"use strict";const e=require("../common/vendor.js"),a=require("../locale/index.js"),n={primary:"#3498db",secondary:"#2ecc71",success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8",light:"#f8f9fa",dark:"#343a40"},r={en:"English","zh-Hans":"中文",es:"Español",fr:"Français",de:"Deutsch"},g=e.defineStore("config",(()=>{const g=e.ref(e.index.getStorageSync("theme")||n.primary),c=e.ref(e.index.getStorageSync("language")||a.i18n.global.locale.value);return{themeColors:n,currentTheme:g,languages:r,currentLanguage:c,changeTheme:a=>{n[a]&&(g.value=n[a],e.index.setStorageSync("theme",n[a]))},changeLanguage:n=>{r[n]&&(c.value=n,a.i18n.global.locale=n,e.index.setStorageSync("language",n))}}}));exports.useConfigStore=g;
|