From ac8cdfc447b55fe01dfcfa7f7cd7beb1766dbc4f Mon Sep 17 00:00:00 2001 From: AricRedemption Date: Thu, 14 Mar 2024 18:25:43 +0800 Subject: [PATCH] chore: Update open wallet way --- src/lib/utils.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 60da4ff..5b21721 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -3,13 +3,21 @@ import { IS_DEV } from '@/data/config' import { twMerge } from 'tailwind-merge' import { type ClassValue, clsx } from 'clsx' import { camelize, getCurrentInstance, toHandlerKey } from 'vue' +import { NOTIFICATION_HEIGHT, NOTIFICATION_WIDTH } from '@/data/config' export const gotoWelcome = (path: string) => { if (IS_DEV) { router.push('/welcome') } else { - const { origin, pathname } = window.location - window.open(`${origin}${pathname}/#${path}`, '_blank') + const browser = window.browser + browser.windows.create({ + url: browser.runtime.getURL('popup.html#/welcome'), + type: 'popup', + width: NOTIFICATION_WIDTH, + height: NOTIFICATION_HEIGHT, + top: 0, + left: 0, + }) } }