migrate root store to composition API and typescript

This commit is contained in:
MaysWind
2025-01-20 00:33:22 +08:00
parent 929d3febb0
commit 559e8259be
22 changed files with 618 additions and 556 deletions
+1 -2
View File
@@ -2,8 +2,7 @@ import { ref, computed } from 'vue';
import { useI18n } from '@/locales/helpers.ts';
// @ts-expect-error the above file is migrating to ts
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
+1 -2
View File
@@ -2,8 +2,7 @@ import { ref, computed } from 'vue';
import { useI18n } from '@/locales/helpers.ts';
// @ts-expect-error the above file is migrating to ts
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
+1 -2
View File
@@ -2,8 +2,7 @@ import { ref, computed } from 'vue';
import { useI18n } from '@/locales/helpers.ts';
// @ts-expect-error the above file is migrating to ts
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useTokensStore } from '@/stores/token.ts';
+1 -1
View File
@@ -115,7 +115,7 @@ import { useTheme } from 'vuetify';
import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
+1 -1
View File
@@ -179,7 +179,7 @@ import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useLoginPageBase } from '@/views/base/LoginPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
import { KnownErrorCode } from '@/consts/api.ts';
+1 -1
View File
@@ -201,7 +201,7 @@ import { useRoute, useRouter } from 'vue-router';
import { useI18n } from '@/locales/helpers.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
+1 -1
View File
@@ -142,7 +142,7 @@ import { useTheme } from 'vuetify';
import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
+1 -1
View File
@@ -246,7 +246,7 @@ import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useSignupPageBase } from '@/views/base/SignupPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import type { PartialRecord, TypeAndDisplayName } from '@/core/base.ts';
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
+1 -1
View File
@@ -120,7 +120,7 @@ import { useTheme } from 'vuetify';
import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
@@ -331,7 +331,7 @@
<script>
import { mapStores } from 'pinia';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useAccountsStore } from '@/stores/account.ts';
@@ -164,7 +164,7 @@ import { ref, useTemplateRef } from 'vue';
import { useI18n } from '@/locales/helpers.ts';
import { useDataManagementPageBase } from '@/views/base/users/DataManagementPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useUserStore } from '@/stores/user.ts';
import { isEquals } from '@/lib/common.ts';
@@ -130,7 +130,7 @@
<script>
import { mapStores } from 'pinia';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useTokensStore } from '@/stores/token.ts';
+1 -1
View File
@@ -189,7 +189,7 @@ import type { LanguageOption } from '@/locales/index.ts';
import { useI18n } from '@/locales/helpers.ts';
import { useLoginPageBase } from '@/views/base/LoginPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
import { KnownErrorCode } from '@/consts/api.ts';
+1 -1
View File
@@ -78,7 +78,7 @@ import { useI18n } from '@/locales/helpers.ts';
import { useI18nUIComponents, showLoading, hideLoading } from '@/lib/ui/mobile.ts';
import { useAppSettingPageBase } from '@/views/base/settings/AppSettingsPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useExchangeRatesStore } from '@/stores/exchangeRates.ts';
+1 -1
View File
@@ -183,7 +183,7 @@ import { useI18n } from '@/locales/helpers.ts';
import { useI18nUIComponents, showLoading, hideLoading } from '@/lib/ui/mobile.ts';
import { useSignupPageBase } from '@/views/base/SignupPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import type { PartialRecord, TypeAndDisplayName } from '@/core/base.ts';
import type { LocalizedCurrencyInfo } from '@/core/currency.ts';
@@ -81,7 +81,7 @@ import { useI18n } from '@/locales/helpers.ts';
import { useI18nUIComponents, showLoading, hideLoading } from '@/lib/ui/mobile.ts';
import { useDataManagementPageBase } from '@/views/base/users/DataManagementPageBase.ts';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useUserStore } from '@/stores/user.ts';
import { isDataExportingEnabled } from '@/lib/server_settings.ts';
+1 -1
View File
@@ -333,7 +333,7 @@
<script>
import { mapStores } from 'pinia';
import { useRootStore } from '@/stores/index.js';
import { useRootStore } from '@/stores/index.ts';
import { useSettingsStore } from '@/stores/setting.ts';
import { useUserStore } from '@/stores/user.ts';
import { useAccountsStore } from '@/stores/account.ts';