mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
migrate to typescript
This commit is contained in:
@@ -338,12 +338,12 @@ import { useAccountsStore } from '@/stores/account.js';
|
||||
import { useOverviewStore } from '@/stores/overview.js';
|
||||
|
||||
import datetimeConstants from '@/consts/datetime.js';
|
||||
import fileConstants from '@/consts/file.js';
|
||||
import { getNameByKeyValue } from '@/lib/common.js';
|
||||
import { generateRandomUUID } from '@/lib/misc.js';
|
||||
import { SUPPORTED_IMAGE_EXTENSIONS } from '@/consts/file.ts';
|
||||
import { getNameByKeyValue } from '@/lib/common.ts';
|
||||
import { generateRandomUUID } from '@/lib/misc.ts';
|
||||
import { getCategorizedAccounts } from '@/lib/account.js';
|
||||
import { isUserVerifyEmailEnabled } from '@/lib/server_settings.js';
|
||||
import { setExpenseAndIncomeAmountColor } from '@/lib/ui.js';
|
||||
import { isUserVerifyEmailEnabled } from '@/lib/server_settings.ts';
|
||||
import { setExpenseAndIncomeAmountColor } from '@/lib/ui/common.ts';
|
||||
|
||||
import {
|
||||
mdiAccount,
|
||||
@@ -460,7 +460,7 @@ export default {
|
||||
return this.$locale.getAllTransactionEditScopeTypes();
|
||||
},
|
||||
supportedImageExtensions() {
|
||||
return fileConstants.supportedImageExtensions;
|
||||
return SUPPORTED_IMAGE_EXTENSIONS;
|
||||
},
|
||||
currentUserAvatar() {
|
||||
return this.userStore.getUserAvatarUrl(this.oldProfile, this.avatarNoCacheId);
|
||||
|
||||
@@ -162,9 +162,9 @@ import { useRootStore } from '@/stores/index.js';
|
||||
import { useSettingsStore } from '@/stores/setting.js';
|
||||
import { useUserStore } from '@/stores/user.js';
|
||||
|
||||
import { isEquals } from '@/lib/common.js';
|
||||
import { isDataExportingEnabled } from '@/lib/server_settings.js';
|
||||
import { startDownloadFile } from '@/lib/ui.js';
|
||||
import { isEquals } from '@/lib/common.ts';
|
||||
import { isDataExportingEnabled } from '@/lib/server_settings.ts';
|
||||
import { startDownloadFile } from '@/lib/ui/common.ts';
|
||||
|
||||
import {
|
||||
mdiRefresh,
|
||||
|
||||
@@ -135,8 +135,8 @@ import { useSettingsStore } from '@/stores/setting.js';
|
||||
import { useUserStore } from '@/stores/user.js';
|
||||
import { useTokensStore } from '@/stores/token.js';
|
||||
|
||||
import { isEquals } from '@/lib/common.js';
|
||||
import { parseSessionInfo } from '@/lib/misc.js';
|
||||
import { isEquals } from '@/lib/common.ts';
|
||||
import { parseSessionInfo } from '@/lib/session.ts';
|
||||
|
||||
import {
|
||||
mdiRefresh,
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
import { mapStores } from 'pinia';
|
||||
import { useTwoFactorAuthStore } from '@/stores/twoFactorAuth.js';
|
||||
|
||||
import { makeButtonCopyToClipboard, changeClipboardObjectText } from '@/lib/misc.js';
|
||||
import { ClipboardHolder } from '@/lib/clipboard.ts';
|
||||
|
||||
import {
|
||||
mdiContentCopy
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
watch: {
|
||||
'currentBackupCode': function (newValue) {
|
||||
if (this.clipboardHolder) {
|
||||
changeClipboardObjectText(this.clipboardHolder, newValue);
|
||||
this.clipboardHolder.setClipboardText(newValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -319,7 +319,7 @@ export default {
|
||||
}
|
||||
|
||||
if (self.$refs.copyToClipboardIcon) {
|
||||
self.clipboardHolder = makeButtonCopyToClipboard({
|
||||
self.clipboardHolder = ClipboardHolder.create({
|
||||
el: '#copy-to-clipboard-icon',
|
||||
text: self.currentBackupCode,
|
||||
successCallback: function () {
|
||||
|
||||
Reference in New Issue
Block a user