Skip to content

Commit 4661b9b

Browse files
committed
file extensions: open file in cernbox when embed
if in embed mode, the top logo will redirect to the original link without any other query param
1 parent 65a276c commit 4661b9b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • packages/web-runtime/src/components/Topbar

packages/web-runtime/src/components/Topbar/TopBar.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
v-if="appMenuExtensions.length && !isEmbedModeEnabled && !hideAppSwitcher"
1010
:menu-items="appMenuExtensions"
1111
/>
12-
<router-link v-if="!hideLogo" :to="homeLink" class="oc-width-1-1 oc-logo-href">
12+
<router-link v-if="!hideLogo" :to="homeLink" :target="isEmbedModeEnabled ? '_blank' : null" class="oc-width-1-1 oc-logo-href">
1313
<oc-img :src="currentTheme.logo.topbar" :alt="sidebarLogoAlt" class="oc-logo-image" />
1414
</router-link>
1515
</div>
@@ -112,6 +112,14 @@ export default {
112112
}
113113
}
114114
115+
if (isEmbedModeEnabled) {
116+
const currentRoute = unref(router.currentRoute)
117+
return {
118+
name: currentRoute.name,
119+
params: currentRoute.params
120+
}
121+
}
122+
115123
return '/'
116124
})
117125

0 commit comments

Comments
 (0)