feat: 通知の受信設定を強化
This commit is contained in:
@@ -65,9 +65,7 @@ const dev = _DEV_;
|
||||
|
||||
let notifications = $ref<Misskey.entities.Notification[]>([]);
|
||||
|
||||
function onNotification(notification: Misskey.entities.Notification, isClient: boolean = false) {
|
||||
if ($i.mutingNotificationTypes.includes(notification.type)) return;
|
||||
|
||||
function onNotification(notification: Misskey.entities.Notification, isClient = false) {
|
||||
if (document.visibilityState === 'visible') {
|
||||
if (!isClient) {
|
||||
useStream().send('readNotification');
|
||||
|
@@ -28,7 +28,7 @@ export type Column = {
|
||||
listId?: string;
|
||||
channelId?: string;
|
||||
roleId?: string;
|
||||
includingTypes?: typeof notificationTypes[number][];
|
||||
excludeTypes?: typeof notificationTypes[number][];
|
||||
tl?: 'home' | 'local' | 'social' | 'global';
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
|
@@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<XColumn :column="column" :isStacked="isStacked" :menu="menu">
|
||||
<template #header><i class="ti ti-bell" style="margin-right: 8px;"></i>{{ column.name }}</template>
|
||||
|
||||
<XNotifications :includeTypes="column.includingTypes"/>
|
||||
<XNotifications :excludeTypes="props.column.excludeTypes"/>
|
||||
</XColumn>
|
||||
</template>
|
||||
|
||||
@@ -25,13 +25,13 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
function func() {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSettingWindow.vue')), {
|
||||
includingTypes: props.column.includingTypes,
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
||||
excludeTypes: props.column.excludeTypes,
|
||||
}, {
|
||||
done: async (res) => {
|
||||
const { includingTypes } = res;
|
||||
const { excludeTypes } = res;
|
||||
updateColumn(props.column.id, {
|
||||
includingTypes: includingTypes,
|
||||
excludeTypes: excludeTypes,
|
||||
});
|
||||
},
|
||||
}, 'closed');
|
||||
|
Reference in New Issue
Block a user