50
50
<i-cy-chevron-right _x16 class =" icon-dark-gray-200" />
51
51
</li >
52
52
<li class =" inline-block" >
53
- <!-- context for use of aria role and disabled here: https://www.scottohara.me/blog/2021/05/28/disabled-links.html -->
54
- <!-- the `href` given here is a fake one provided for the sake of assistive technology. no actual routing is happening. -->
55
- <!-- the `key` is used to ensure the role/href attrs are added and removed appropriately from the element. -->
56
- <a
57
- :key =" canClearTestingType.toString()"
58
- class =" font-medium"
59
- :role =" canClearTestingType ? undefined : 'link'"
60
- :href =" canClearTestingType ? 'choose-testing-type' : undefined"
61
- :class =" canClearTestingType ? 'text-indigo-500 hocus-link-default' :
62
- 'text-gray-700'"
63
- :ariaDisabled =" !canClearTestingType"
64
- @click.prevent =" clearTestingType"
65
- >
53
+ <span class =" font-medium" >
66
54
{{ currentProject.title }}
67
- </a >
55
+ </span >
68
56
<!-- currentProject might not have a branch -->
69
57
<template v-if =" currentProject .branch " >
70
58
<!-- Using a margin here causes different overflow problems.
@@ -179,7 +167,7 @@ import { gql, useMutation, useSubscription } from '@urql/vue'
179
167
import { ref , computed } from ' vue'
180
168
import type { HeaderBar_HeaderBarContentFragment } from ' ../generated/graphql'
181
169
import {
182
- GlobalPageHeader_ClearCurrentProjectDocument , GlobalPageHeader_ClearCurrentTestingTypeDocument ,
170
+ GlobalPageHeader_ClearCurrentProjectDocument ,
183
171
HeaderBarContent_AuthChangeDocument ,
184
172
} from ' ../generated/graphql'
185
173
import TopNav from ' ./topnav/TopNav.vue'
@@ -235,24 +223,6 @@ mutation GlobalPageHeader_clearCurrentProject {
235
223
}
236
224
`
237
225
238
- gql `
239
- mutation GlobalPageHeader_ClearCurrentTestingType {
240
- clearCurrentTestingType {
241
- baseError {
242
- id
243
- ...BaseError
244
- }
245
- warnings {
246
- id
247
- }
248
- currentProject {
249
- id
250
- currentTestingType
251
- }
252
- }
253
- }
254
- `
255
-
256
226
gql `
257
227
fragment HeaderBar_HeaderBarContent on Query {
258
228
currentProject {
@@ -262,7 +232,6 @@ fragment HeaderBar_HeaderBarContent on Query {
262
232
savedState
263
233
currentTestingType
264
234
branch
265
- isLoadingNodeEvents
266
235
}
267
236
isGlobalMode
268
237
...TopNav
@@ -284,13 +253,8 @@ const cloudProjectId = computed(() => {
284
253
285
254
const currentProject = computed (() => props .gql .currentProject )
286
255
287
- const canClearTestingType = computed (() => {
288
- return Boolean (props .gql ?.currentProject ?.currentTestingType && ! props .gql ?.currentProject ?.isLoadingNodeEvents )
289
- })
290
-
291
256
const isLoginOpen = ref (false )
292
257
const clearCurrentProjectMutation = useMutation (GlobalPageHeader_ClearCurrentProjectDocument )
293
- const clearCurrentTestingTypeMutation = useMutation (GlobalPageHeader_ClearCurrentTestingTypeDocument )
294
258
295
259
const openLogin = () => {
296
260
isLoginOpen .value = true
@@ -302,12 +266,6 @@ const clearCurrentProject = () => {
302
266
}
303
267
}
304
268
305
- const clearTestingType = () => {
306
- if (canClearTestingType .value ) {
307
- clearCurrentTestingTypeMutation .executeMutation ({})
308
- }
309
- }
310
-
311
269
const props = defineProps <{
312
270
gql: HeaderBar_HeaderBarContentFragment
313
271
showBrowsers? : boolean
0 commit comments