mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
fix(ui): open all AppDrawer apps in new tab
All app clicks in the PillNav app drawer now open in a new tab via
window.open('_blank'). Previously internal URLs used window.location.href
(same tab navigation) which was confusing in the unified app context.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0d142efa3c
commit
794424d6ad
1 changed files with 2 additions and 18 deletions
|
|
@ -65,25 +65,9 @@
|
|||
|
||||
if (onAppClick) {
|
||||
onAppClick(app, event);
|
||||
} else if (
|
||||
event &&
|
||||
(event.ctrlKey || event.metaKey) &&
|
||||
onOpenInPanel &&
|
||||
app.url &&
|
||||
!app.isCurrent
|
||||
) {
|
||||
onOpenInPanel(app.id, app.url);
|
||||
} else if (app.isCurrent) {
|
||||
window.location.href = '/';
|
||||
} else if (app.url) {
|
||||
const isInternal =
|
||||
app.url.startsWith('/') ||
|
||||
new URL(app.url, window.location.origin).origin === window.location.origin;
|
||||
if (isInternal) {
|
||||
window.location.href = app.url;
|
||||
} else {
|
||||
window.open(app.url, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
// Always open in new tab
|
||||
window.open(app.url, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
|
||||
close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue