2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
2024-02-13 15:59:27 +00:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 14:31:52 +09:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
-->
|
|
|
|
|
|
2020-07-11 10:13:11 +09:00
|
|
|
<template>
|
2023-11-10 17:49:09 +09:00
|
|
|
<XColumn :column="column" :isStacked="isStacked" :menu="menu" :refresher="() => notificationsComponent.reload()">
|
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-11-10 17:49:09 +09:00
|
|
|
<XNotifications ref="notificationsComponent" :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>
|
2023-12-07 14:42:09 +09:00
|
|
|
import { defineAsyncComponent, shallowRef } 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
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
const notificationsComponent = shallowRef<InstanceType<typeof XNotifications>>();
|
2023-11-10 17:49:09 +09:00
|
|
|
|
2022-03-21 03:11:14 +09:00
|
|
|
function func() {
|
2024-07-04 13:14:49 +09:00
|
|
|
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
2023-09-29 11:29:54 +09:00
|
|
|
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
|
|
|
});
|
|
|
|
|
},
|
2024-07-04 13:14:49 +09:00
|
|
|
closed: () => dispose(),
|
|
|
|
|
});
|
2022-03-21 03:11:14 +09:00
|
|
|
}
|
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>
|