code refactor

This commit is contained in:
MaysWind
2023-06-24 17:02:57 +08:00
parent a9338ed822
commit fb7790ba4a
36 changed files with 644 additions and 354 deletions
+16 -13
View File
@@ -1,15 +1,18 @@
export default {
getVersion: () => {
let version = __EZBOOKKEEPING_VERSION__ || 'unknown'; // eslint-disable-line
let commitHash = __EZBOOKKEEPING_BUILD_COMMIT_HASH__; // eslint-disable-line
export function isProduction() {
return process.env.NODE_ENV === 'production';
}
if (commitHash) {
return `${version} (${commitHash.substring(0, Math.min(7, commitHash.length))})`
} else {
return version;
}
},
getBuildTime: () => {
return __EZBOOKKEEPING_BUILD_UNIX_TIME__; // eslint-disable-line
export function getVersion() {
let version = __EZBOOKKEEPING_VERSION__ || 'unknown'; // eslint-disable-line
let commitHash = __EZBOOKKEEPING_BUILD_COMMIT_HASH__; // eslint-disable-line
if (commitHash) {
return `${version} (${commitHash.substring(0, Math.min(7, commitHash.length))})`
} else {
return version;
}
};
}
export function getBuildTime() {
return __EZBOOKKEEPING_BUILD_UNIX_TIME__; // eslint-disable-line
}