Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
dashboard
Commits
7fc88404
Commit
7fc88404
authored
1 year ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
fix: don’t show inaccessible shows in show selector
refs
#247
parent
901ad724
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#7417
passed
1 year ago
Stage: test
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/shows/ShowSelector.vue
+18
-8
18 additions, 8 deletions
src/components/shows/ShowSelector.vue
with
18 additions
and
8 deletions
src/components/shows/ShowSelector.vue
+
18
−
8
View file @
7fc88404
...
...
@@ -80,7 +80,7 @@ import { useMagicKeys } from '@vueuse/core'
import
{
useI18n
}
from
'
@/i18n
'
import
{
sanitizeHTML
}
from
'
@/util
'
import
{
useShowStore
}
from
'
@/stores
'
import
{
useAuthStore
,
useShowStore
}
from
'
@/stores
'
import
SwitchButton
from
'
@/components/SwitchButton.vue
'
import
ComboBox
from
'
@/components/ComboBox.vue
'
import
AddShowButton
from
'
@/components/shows/AddShowButton.vue
'
...
...
@@ -92,6 +92,7 @@ defineOptions({ compatConfig: { MODE: 3 } })
const
keys
=
useMagicKeys
()
const
{
t
}
=
useI18n
()
const
showStore
=
useShowStore
()
const
authStore
=
useAuthStore
()
const
selectedShow
=
computed
<
Show
|
null
>
(()
=>
showStore
.
selectedShow
)
const
showSearchQuery
=
ref
(
''
)
...
...
@@ -105,13 +106,22 @@ const sortedShows = computed(() => {
])
})
const
filteredShows
=
computed
(()
=>
{
return
sortedShows
.
value
.
filter
((
show
)
=>
(
filterActive
.
value
!==
null
?
show
.
isActive
===
filterActive
.
value
:
true
))
.
filter
(
(
show
)
=>
sanitizeHTML
(
show
.
name
).
toLocaleLowerCase
().
includes
(
showSearchQuery
.
value
)
||
show
.
id
.
toString
()
===
showSearchQuery
.
value
,
)
return
(
sortedShows
.
value
.
filter
((
show
)
=>
(
filterActive
.
value
!==
null
?
show
.
isActive
===
filterActive
.
value
:
true
))
// FIXME: Re-implementation of the ?isWritable=1 filter on the show API endpoint.
// If we’re keeping the show selector it should be refactored to use the API.
.
filter
(
(
show
)
=>
authStore
.
steeringUser
?.
isPrivileged
||
(
authStore
.
steeringUser
&&
show
.
ownerIds
.
includes
(
authStore
.
steeringUser
.
id
)),
)
.
filter
(
(
show
)
=>
sanitizeHTML
(
show
.
name
).
toLocaleLowerCase
().
includes
(
showSearchQuery
.
value
)
||
show
.
id
.
toString
()
===
showSearchQuery
.
value
,
)
)
})
function
toggleFilterActive
(
toggleState
:
boolean
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment