feat: programmatically generate list of available views
This commit is contained in:
parent
5f678e2449
commit
26d02d5593
1 changed files with 7 additions and 11 deletions
|
@ -145,17 +145,11 @@
|
||||||
<td>
|
<td>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<select v-model="selectedView[s.id]">
|
<select v-model="selectedView[s.id]">
|
||||||
<option value="list">
|
<option
|
||||||
{{ $t('list.list.title') }}
|
v-for="v in availableViews"
|
||||||
</option>
|
:value="v"
|
||||||
<option value="gantt">
|
:key="v">
|
||||||
{{ $t('list.gantt.title') }}
|
{{ $t('list.' + v + '.title') }}
|
||||||
</option>
|
|
||||||
<option value="table">
|
|
||||||
{{ $t('list.table.title') }}
|
|
||||||
</option>
|
|
||||||
<option value="kanban">
|
|
||||||
{{ $t('list.kanban.title') }}
|
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -234,6 +228,8 @@ type SelectedViewMapper = Record<IList['id'], ListView>
|
||||||
|
|
||||||
const selectedView = ref<SelectedViewMapper>({})
|
const selectedView = ref<SelectedViewMapper>({})
|
||||||
|
|
||||||
|
const availableViews = computed(() => Object.values(LIST_VIEWS))
|
||||||
|
|
||||||
const copy = useCopyToClipboard()
|
const copy = useCopyToClipboard()
|
||||||
watch(
|
watch(
|
||||||
() => props.listId,
|
() => props.listId,
|
||||||
|
|
Loading…
Reference in a new issue