feat: 通知の受信設定を強化
This commit is contained in:
parent
4216a67462
commit
b9da1415a5
44 changed files with 676 additions and 503 deletions
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #func="{ buttonStyleClass }"><button class="_button" :class="buttonStyleClass" @click="configureNotification()"><i class="ti ti-settings"></i></button></template>
|
||||
|
||||
<div>
|
||||
<XNotifications :includeTypes="widgetProps.includingTypes"/>
|
||||
<XNotifications :excludeTypes="widgetProps.excludeTypes"/>
|
||||
</div>
|
||||
</MkContainer>
|
||||
</template>
|
||||
|
@ -35,10 +35,10 @@ const widgetPropsDef = {
|
|||
type: 'number' as const,
|
||||
default: 300,
|
||||
},
|
||||
includingTypes: {
|
||||
excludeTypes: {
|
||||
type: 'array' as const,
|
||||
hidden: true,
|
||||
default: null,
|
||||
default: [],
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -54,12 +54,12 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
|
|||
);
|
||||
|
||||
const configureNotification = () => {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSettingWindow.vue')), {
|
||||
includingTypes: widgetProps.includingTypes,
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkNotificationSelectWindow.vue')), {
|
||||
excludeTypes: widgetProps.excludeTypes,
|
||||
}, {
|
||||
done: async (res) => {
|
||||
const { includingTypes } = res;
|
||||
widgetProps.includingTypes = includingTypes;
|
||||
const { excludeTypes } = res;
|
||||
widgetProps.excludeTypes = excludeTypes;
|
||||
save();
|
||||
},
|
||||
}, 'closed');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue