Skip to content

Commit a8366b4

Browse files
committed
fix: remove new tab links
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent 2249282 commit a8366b4

3 files changed

Lines changed: 0 additions & 18 deletions

File tree

core/src/components/AppItem.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
'app-item--outlined': outlined,
1212
}"
1313
:href="app.href"
14-
:target="newTab ? '_blank' : undefined"
15-
:rel="newTab ? 'noopener noreferrer' : undefined"
1614
:aria-current="app.active ? 'page' : undefined"
1715
:tabindex="tabindex"
1816
:title="app.name"
@@ -43,8 +41,6 @@ import { computed } from 'vue'
4341
4442
const props = withDefaults(defineProps<{
4543
app: INavigationEntry
46-
/** When true, the link opens in a new tab. Launcher uses true; Dashboard reuse will use false. */
47-
newTab?: boolean
4844
/** When true, render the circle as an outline only (used for "More apps" / utility entries). */
4945
outlined?: boolean
5046
/**
@@ -54,7 +50,6 @@ const props = withDefaults(defineProps<{
5450
*/
5551
tabindex?: number
5652
}>(), {
57-
newTab: false,
5853
outlined: false,
5954
tabindex: -1,
6055
})

core/src/components/AppMenu.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
:key="item.id"
4040
ref="items"
4141
:app="item"
42-
:newTab="openInNewTab"
4342
:outlined="item.id === 'more-apps'"
4443
:tabindex="i === focusedIndex ? 0 : -1" />
4544
</div>
@@ -134,10 +133,6 @@ export default defineComponent({
134133
return this.appList.find((app) => app.active)
135134
},
136135
137-
openInNewTab(): boolean {
138-
return this.currentApp?.id !== 'dashboard'
139-
},
140-
141136
// Stable-ordered list that focusedIndex indexes into; adds "More apps" for admins.
142137
gridItems(): INavigationEntry[] {
143138
return this.isAdmin ? [...this.appList, this.moreAppsEntry] : [...this.appList]

core/src/tests/components/AppItem.spec.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,4 @@ describe('core: AppItem', () => {
4343
const wrapper = mount(AppItem, { propsData: { app: makeApp({ active: true }) } })
4444
expect(wrapper.attributes('aria-current')).toBe('page')
4545
})
46-
47-
it('newTab prop renders target="_blank" rel="noopener noreferrer"', () => {
48-
const wrapper = mount(AppItem, {
49-
propsData: { app: makeApp(), newTab: true },
50-
})
51-
expect(wrapper.attributes('target')).toBe('_blank')
52-
expect(wrapper.attributes('rel')).toBe('noopener noreferrer')
53-
})
5446
})

0 commit comments

Comments
 (0)