mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 08:14:25 +08:00
add service worker
This commit is contained in:
@@ -56,6 +56,10 @@ export default {
|
||||
pushStateAnimate: false,
|
||||
iosSwipeBackAnimateShadow: false,
|
||||
mdSwipeBackAnimateShadow: false
|
||||
},
|
||||
serviceWorker: {
|
||||
path: self.$settings.isProduction() ? './sw.js' : undefined,
|
||||
scope: '/',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ function clearSettings() {
|
||||
}
|
||||
|
||||
export default {
|
||||
isProduction: () => process.env.NODE_ENV === 'production',
|
||||
getLanguage: () => getOriginalOption('lang'),
|
||||
setLanguage: value => setOption('lang', value),
|
||||
isEnableDebug: () => getOption('debug'),
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import datetimeConstants from "../consts/datetime.js";
|
||||
import statisticsConstants from "../consts/statistics.js";
|
||||
import userState from "../lib/userstate.js";
|
||||
import settings from "../lib/settings.js";
|
||||
import utils from "../lib/utils.js";
|
||||
|
||||
import {
|
||||
@@ -150,7 +151,7 @@ import {
|
||||
} from './transactionTag.js';
|
||||
|
||||
const stores = {
|
||||
strict: process.env.NODE_ENV !== 'production',
|
||||
strict: !settings.isProduction(),
|
||||
state: {
|
||||
currentUserInfo: userState.getUserInfo(),
|
||||
latestExchangeRates: getExchangeRatesFromLocalStorage(),
|
||||
|
||||
Reference in New Issue
Block a user