feat: programmatically generate list of available views
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2022-09-08 16:29:29 +02:00
parent 5f678e2449
commit 26d02d5593
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 7 additions and 11 deletions

View File

@ -145,17 +145,11 @@
<td>
<div class="select">
<select v-model="selectedView[s.id]">
<option value="list">
{{ $t('list.list.title') }}
</option>
<option value="gantt">
{{ $t('list.gantt.title') }}
</option>
<option value="table">
{{ $t('list.table.title') }}
</option>
<option value="kanban">
{{ $t('list.kanban.title') }}
<option
v-for="v in availableViews"
:value="v"
:key="v">
{{ $t('list.' + v + '.title') }}
</option>
</select>
</div>
@ -234,6 +228,8 @@ type SelectedViewMapper = Record<IList['id'], ListView>
const selectedView = ref<SelectedViewMapper>({})
const availableViews = computed(() => Object.values(LIST_VIEWS))
const copy = useCopyToClipboard()
watch(
() => props.listId,