Skip to content

Commit

Permalink
chore: Update open wallet way
Browse files Browse the repository at this point in the history
  • Loading branch information
AricRedemption committed Mar 14, 2024
1 parent e380281 commit ac8cdfc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
}

Expand Down

0 comments on commit ac8cdfc

Please sign in to comment.