File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
4442const 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})
Original file line number Diff line number Diff line change 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 ]
Original file line number Diff line number Diff 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} )
You can’t perform that action at this time.
0 commit comments