diff --git a/src/components/modals/monobank-set-token.vue b/src/components/dialogs/monobank-set-token.vue similarity index 59% rename from src/components/modals/monobank-set-token.vue rename to src/components/dialogs/monobank-set-token.vue index fc80cb51..0abecbd2 100644 --- a/src/components/modals/monobank-set-token.vue +++ b/src/components/dialogs/monobank-set-token.vue @@ -1,43 +1,7 @@ - - + + diff --git a/src/components/modal-center/index.ts b/src/components/modal-center/index.ts index 3d3549db..ecb6a036 100644 --- a/src/components/modal-center/index.ts +++ b/src/components/modal-center/index.ts @@ -22,19 +22,12 @@ interface CreateRecordModal extends CommonModalDataProps { interface MonobankTxFormModal extends CommonModalDataProps { type: MODAL_TYPES.monobankTxForm; } -interface MonobankSetTokenModal extends CommonModalDataProps { - type: MODAL_TYPES.monobankSetToken; -} interface RecordListModal extends CommonModalDataProps { type: MODAL_TYPES.recordList; data: RecordListModalProps; } -export type ModalDataProp = - | RecordListModal - | CreateRecordModal - | MonobankTxFormModal - | MonobankSetTokenModal; +export type ModalDataProp = RecordListModal | CreateRecordModal | MonobankTxFormModal; let idCounter = 0; const activeModals = ref([]); diff --git a/src/components/modal-center/ui-modal.vue b/src/components/modal-center/ui-modal.vue index d3d49dc8..cfafd24f 100644 --- a/src/components/modal-center/ui-modal.vue +++ b/src/components/modal-center/ui-modal.vue @@ -29,9 +29,6 @@ const MODAL_COMPONENTS = Object.freeze({ [MODAL_TYPES.recordList]: defineAsyncComponent( () => import("@/components/modals/modify-record/record-list.vue"), ), - [MODAL_TYPES.monobankSetToken]: defineAsyncComponent( - () => import("@/components/modals/monobank-set-token.vue"), - ), }); export enum EVENTS { diff --git a/src/components/notification-center/index.ts b/src/components/notification-center/index.ts index 40ae2f04..265ba432 100644 --- a/src/components/notification-center/index.ts +++ b/src/components/notification-center/index.ts @@ -51,7 +51,7 @@ export const useNotificationCenter = (): { removeNotification(id); delete notificationIds[id]; - }, notification.visibilityTime ?? 4000); + }, notification.visibilityTime ?? 400000); return id; }; diff --git a/src/pages/accounts/accounts.vue b/src/pages/accounts/accounts.vue index d4405a60..2dbda137 100644 --- a/src/pages/accounts/accounts.vue +++ b/src/pages/accounts/accounts.vue @@ -9,14 +9,11 @@ @@ -78,17 +77,16 @@ import { AccountModel } from "shared-types"; import { ROUTES_NAMES } from "@/routes/constants"; import { useFormatCurrency } from "@/composable"; import { useBanksMonobankStore, useAccountsStore } from "@/stores"; -import { MODAL_TYPES, useModalCenter } from "@/components/modal-center/index"; import UiButton from "@/components/lib/ui/button/Button.vue"; import { Card, CardContent, CardHeader } from "@/components/lib/ui/card"; import { cn } from "@/lib/utils"; +import MonobankSetToken from "@/components/dialogs/monobank-set-token.vue"; const monobankStore = useBanksMonobankStore(); const { accounts } = storeToRefs(useAccountsStore()); const { isMonoAccountPaired: isPaired, isTokenPresent } = storeToRefs(monobankStore); const { formatAmountByCurrencyId } = useFormatCurrency(); -const { addModal } = useModalCenter(); const refreshMonoAccounts = () => { monobankStore.refreshAccounts(); @@ -98,15 +96,6 @@ const formattedAccounts = computed(() => [...accounts.value].sort((a, b) => +b.isEnabled - +a.isEnabled), ); -const setMonobankToken = ({ isUpdate = false } = {}) => { - addModal({ - type: MODAL_TYPES.monobankSetToken, - data: { - isUpdate, - }, - }); -}; - const formatBalance = (account: AccountModel) => formatAmountByCurrencyId(account.currentBalance - account.creditLimit, account.currencyId); diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 14d25bd4..f4bb7834 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -109,5 +109,5 @@ body { --z-select-field: 1; --z-category-select-field: 1; --z-modal: 10; - --z-notifications: 20; + --z-notifications: 51; }