Skip to content

Commit

Permalink
Update extUtils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
huhuanming committed Oct 9, 2024
1 parent 121208c commit 8df0381
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/shared/src/utils/extUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,21 @@ async function openStandaloneWindow(routeInfo: IOpenUrlRouteInfo) {
});
}

async function openPassKeyWindow() {
const url = buildExtRouteUrl(EXT_HTML_FILES.uiPassKey, {});
export enum EPassKeyWindowType {
unlock = 'unlock',
create = 'create',
}
export enum EPassKeyWindowFrom {
popup = 'popup',
sidebar = 'sidebar',
}
async function openPassKeyWindow(type: EPassKeyWindowType) {
const url = buildExtRouteUrl(EXT_HTML_FILES.uiPassKey, {
params: {
type,
from: platformEnv.isExtensionUiPopup ? EPassKeyWindowFrom.popup : EPassKeyWindowFrom.sidebar,
},
});
const { top, left } = await getWindowPosition();
return chrome.windows.create({
focused: true,
Expand Down

0 comments on commit 8df0381

Please sign in to comment.