2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-07-11 10:13:11 +09:00
|
|
|
<template>
|
2023-05-20 10:12:18 +09:00
|
|
|
<XColumn :column="column" :isStacked="isStacked" :menu="menu">
|
2022-12-19 19:01:30 +09:00
|
|
|
<template #header><i class="ti ti-bell" style="margin-right: 8px;"></i>{{ column.name }}</template>
|
2020-07-11 10:13:11 +09:00
|
|
|
|
2023-09-29 11:29:54 +09:00
|
|
|
<XNotifications :excludeTypes="props.column.excludeTypes"/>
|
2020-10-17 20:12:00 +09:00
|
|
|
</XColumn>
|
2020-07-11 10:13:11 +09:00
|
|
|
</template>
|
|
|
|
|
2022-03-21 03:11:14 +09:00
|
|
|
<script lang="ts" setup>
|
2022-05-01 22:51:07 +09:00
|
|
|
import { defineAsyncComponent } from 'vue';
|
2020-07-11 10:13:11 +09:00
|
|
|
import XColumn from './column.vue';
|
2023-09-19 16:37:43 +09:00
|
|
|
import { updateColumn, Column } from './deck-store.js';
|
2022-08-31 00:24:33 +09:00
|
|
|
import XNotifications from '@/components/MkNotifications.vue';
|
2023-09-19 16:37:43 +09:00
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { i18n } from '@/i18n.js';
|
2020-07-11 10:13:11 +09:00
|
|
|
|
2022-03-21 03:11:14 +09:00
|
|
|
const props = defineProps<{
|
|
|
|
column: Column;
|
|
|
|
isStacked: boolean;
|
|
|
|
}>();
|
2020-07-11 10:13:11 +09:00
|
|
|
|
2022-03-21 03:11:14 +09:00
|
|
|
function func() {
|
2023-09-29 11:29:54 +09:00
|
|
|
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
|
|
|
excludeTypes: props.column.excludeTypes,
|
2022-03-21 03:11:14 +09:00
|
|
|
}, {
|
|
|
|
done: async (res) => {
|
2023-09-29 11:29:54 +09:00
|
|
|
const { excludeTypes } = res;
|
2022-03-21 03:11:14 +09:00
|
|
|
updateColumn(props.column.id, {
|
2023-09-29 11:29:54 +09:00
|
|
|
excludeTypes: excludeTypes,
|
2022-03-21 03:11:14 +09:00
|
|
|
});
|
|
|
|
},
|
|
|
|
}, 'closed');
|
|
|
|
}
|
2022-07-17 05:33:21 +09:00
|
|
|
|
|
|
|
const menu = [{
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-pencil',
|
2022-07-17 05:33:21 +09:00
|
|
|
text: i18n.ts.notificationSetting,
|
|
|
|
action: func,
|
|
|
|
}];
|
2020-07-11 10:13:11 +09:00
|
|
|
</script>
|