feat: 通知の受信設定を強化

This commit is contained in:
syuilo
2023-09-29 11:29:54 +09:00
parent 4216a67462
commit b9da1415a5
44 changed files with 676 additions and 503 deletions

View File

@@ -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');

View File

@@ -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;

View File

@@ -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');