mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-05-23 17:58:22 +00:00
feat: add navigateToAuthentication method to navigation API (#6603)
Signed-off-by: Denis Golovin <dgolovin@users.noreply.github.com> Co-authored-by: Florent BENOIT <fbenoit@redhat.com>
This commit is contained in:
parent
6df4181208
commit
689b3f80eb
5 changed files with 18 additions and 0 deletions
|
|
@ -4157,6 +4157,11 @@ declare module '@podman-desktop/api' {
|
|||
* @see {@link window.createWebviewPanel createWebviewPanel} for creating a Webview
|
||||
*/
|
||||
export function navigateToWebview(webviewId: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Navigate to Authentication settings page
|
||||
*/
|
||||
export function navigateToAuthentication(): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1216,6 +1216,9 @@ export class ExtensionLoader {
|
|||
navigateToWebview: async (webviewId: string): Promise<void> => {
|
||||
await this.navigationManager.navigateToWebview(webviewId);
|
||||
},
|
||||
navigateToAuthentication: async (): Promise<void> => {
|
||||
await this.navigationManager.navigateToAuthentication();
|
||||
},
|
||||
};
|
||||
|
||||
const version = app.getVersion();
|
||||
|
|
|
|||
|
|
@ -207,4 +207,10 @@ export class NavigationManager {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
async navigateToAuthentication(): Promise<void> {
|
||||
this.navigateTo({
|
||||
page: NavigationPage.AUTHENTICATION,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,5 @@ export enum NavigationPage {
|
|||
TROUBLESHOOTING = 'troubleshooting',
|
||||
HELP = 'help',
|
||||
WEBVIEW = 'webview',
|
||||
AUTHENTICATION = 'authentication',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,5 +79,8 @@ export const handleNavigation = (page: NavigationPage, parameters?: { [key: stri
|
|||
case NavigationPage.WEBVIEW:
|
||||
router.goto(`/webviews/${parameters?.['id']}`);
|
||||
break;
|
||||
case NavigationPage.AUTHENTICATION:
|
||||
router.goto('/preferences/authentication-providers');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue