2020-07-11 01:13:11 +00:00
|
|
|
<template>
|
2022-07-16 20:33:21 +00:00
|
|
|
<XColumn :column="column" :is-stacked="isStacked" :menu="menu" @parent-focus="$event => emit('parent-focus', $event)">
|
2021-04-20 14:22:59 +00:00
|
|
|
<template #header><i class="fas fa-bell" style="margin-right: 8px;"></i>{{ column.name }}</template>
|
2020-07-11 01:13:11 +00:00
|
|
|
|
2020-10-17 11:12:00 +00:00
|
|
|
<XNotifications :include-types="column.includingTypes"/>
|
|
|
|
</XColumn>
|
2020-07-11 01:13:11 +00:00
|
|
|
</template>
|
|
|
|
|
2022-03-20 18:11:14 +00:00
|
|
|
<script lang="ts" setup>
|
2022-05-01 13:51:07 +00:00
|
|
|
import { defineAsyncComponent } from 'vue';
|
2020-07-11 01:13:11 +00:00
|
|
|
import XColumn from './column.vue';
|
2022-07-16 20:33:21 +00:00
|
|
|
import { updateColumn , Column } from './deck-store';
|
2021-11-11 17:02:25 +00:00
|
|
|
import XNotifications from '@/components/notifications.vue';
|
|
|
|
import * as os from '@/os';
|
2022-07-16 20:33:21 +00:00
|
|
|
import { i18n } from '@/i18n';
|
2020-07-11 01:13:11 +00:00
|
|
|
|
2022-03-20 18:11:14 +00:00
|
|
|
const props = defineProps<{
|
|
|
|
column: Column;
|
|
|
|
isStacked: boolean;
|
|
|
|
}>();
|
2020-07-11 01:13:11 +00:00
|
|
|
|
2022-03-20 18:11:14 +00:00
|
|
|
const emit = defineEmits<{
|
2022-05-19 08:35:43 +00:00
|
|
|
(ev: 'parent-focus', direction: 'up' | 'down' | 'left' | 'right'): void;
|
2022-03-20 18:11:14 +00:00
|
|
|
}>();
|
2020-07-11 01:13:11 +00:00
|
|
|
|
2022-03-20 18:11:14 +00:00
|
|
|
function func() {
|
2022-05-01 13:51:07 +00:00
|
|
|
os.popup(defineAsyncComponent(() => import('@/components/notification-setting-window.vue')), {
|
2022-03-20 18:11:14 +00:00
|
|
|
includingTypes: props.column.includingTypes,
|
|
|
|
}, {
|
|
|
|
done: async (res) => {
|
|
|
|
const { includingTypes } = res;
|
|
|
|
updateColumn(props.column.id, {
|
2022-07-16 20:33:21 +00:00
|
|
|
includingTypes: includingTypes,
|
2022-03-20 18:11:14 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
}, 'closed');
|
|
|
|
}
|
2022-07-16 20:33:21 +00:00
|
|
|
|
|
|
|
const menu = [{
|
|
|
|
icon: 'fas fa-pencil-alt',
|
|
|
|
text: i18n.ts.notificationSetting,
|
|
|
|
action: func,
|
|
|
|
}];
|
2020-07-11 01:13:11 +00:00
|
|
|
</script>
|