mirror of
https://github.com/nextcloud/server.git
synced 2026-05-13 17:10:43 -04:00
fix: remove new tab links
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
This commit is contained in:
parent
78e98bba29
commit
7ec7eb86bf
3 changed files with 0 additions and 18 deletions
|
|
@ -11,8 +11,6 @@
|
|||
'app-item--outlined': outlined,
|
||||
}"
|
||||
:href="app.href"
|
||||
:target="newTab ? '_blank' : undefined"
|
||||
:rel="newTab ? 'noopener noreferrer' : undefined"
|
||||
:aria-current="app.active ? 'page' : undefined"
|
||||
:tabindex="tabindex"
|
||||
:title="app.name"
|
||||
|
|
@ -43,8 +41,6 @@ import { computed } from 'vue'
|
|||
|
||||
const props = withDefaults(defineProps<{
|
||||
app: INavigationEntry
|
||||
/** When true, the link opens in a new tab. Launcher uses true; Dashboard reuse will use false. */
|
||||
newTab?: boolean
|
||||
/** When true, render the circle as an outline only (used for "More apps" / utility entries). */
|
||||
outlined?: boolean
|
||||
/**
|
||||
|
|
@ -54,7 +50,6 @@ const props = withDefaults(defineProps<{
|
|||
*/
|
||||
tabindex?: number
|
||||
}>(), {
|
||||
newTab: false,
|
||||
outlined: false,
|
||||
tabindex: -1,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
:key="item.id"
|
||||
ref="items"
|
||||
:app="item"
|
||||
:newTab="openInNewTab"
|
||||
:outlined="item.id === 'more-apps'"
|
||||
:tabindex="i === focusedIndex ? 0 : -1" />
|
||||
</div>
|
||||
|
|
@ -134,10 +133,6 @@ export default defineComponent({
|
|||
return this.appList.find((app) => app.active)
|
||||
},
|
||||
|
||||
openInNewTab(): boolean {
|
||||
return this.currentApp?.id !== 'dashboard'
|
||||
},
|
||||
|
||||
// Stable-ordered list that focusedIndex indexes into; adds "More apps" for admins.
|
||||
gridItems(): INavigationEntry[] {
|
||||
return this.isAdmin ? [...this.appList, this.moreAppsEntry] : [...this.appList]
|
||||
|
|
|
|||
|
|
@ -43,12 +43,4 @@ describe('core: AppItem', () => {
|
|||
const wrapper = mount(AppItem, { propsData: { app: makeApp({ active: true }) } })
|
||||
expect(wrapper.attributes('aria-current')).toBe('page')
|
||||
})
|
||||
|
||||
it('newTab prop renders target="_blank" rel="noopener noreferrer"', () => {
|
||||
const wrapper = mount(AppItem, {
|
||||
propsData: { app: makeApp(), newTab: true },
|
||||
})
|
||||
expect(wrapper.attributes('target')).toBe('_blank')
|
||||
expect(wrapper.attributes('rel')).toBe('noopener noreferrer')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue