feat(forklift): route and router doesnt work properly on extensions

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
This commit is contained in:
Marcelo Fukumoto
2026-07-07 13:36:46 +02:00
parent 4480b2cd8f
commit bf01a9dc43
5 changed files with 36 additions and 31 deletions
+11
View File
@@ -0,0 +1,11 @@
// Mirrors Resource class methods from @shell/plugins/dashboard-store/resource-class.js
// useRouter()/useRoute() from vue-router don't work in extension mode,
// so we use the same global access pattern the shell uses internally.
export function currentRouter() {
return window.$globalApp.$router;
}
export function currentRoute() {
return window.$globalApp.$route;
}