chore(client): tweak deck ui

This commit is contained in:
syuilo 2022-07-17 05:33:21 +09:00
parent 2dae56fc8f
commit 0331f3c61b
7 changed files with 62 additions and 41 deletions

View file

@ -1,5 +1,5 @@
<template>
<XColumn :func="{ handler: setList, title: $ts.selectList }" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<XColumn :menu="menu" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<template #header>
<i class="fas fa-list-ul"></i><span style="margin-left: 8px;">{{ column.name }}</span>
</template>
@ -11,9 +11,9 @@
<script lang="ts" setup>
import { } from 'vue';
import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store';
import XTimeline from '@/components/timeline.vue';
import * as os from '@/os';
import { updateColumn, Column } from './deck-store';
import { i18n } from '@/i18n';
const props = defineProps<{
@ -37,16 +37,22 @@ async function setList() {
const { canceled, result: list } = await os.select({
title: i18n.ts.selectList,
items: lists.map(x => ({
value: x, text: x.name
value: x, text: x.name,
})),
default: props.column.listId
default: props.column.listId,
});
if (canceled) return;
updateColumn(props.column.id, {
listId: list.id
listId: list.id,
});
}
const menu = [{
icon: 'fas fa-pencil-alt',
text: i18n.ts.selectList,
action: setList,
}];
/*
function focus() {
timeline.focus();