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