2020-07-11 03:13:11 +02:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<XColumn
|
|
|
|
:column="column"
|
|
|
|
:is-stacked="isStacked"
|
|
|
|
:menu="menu"
|
|
|
|
@parent-focus="($event) => emit('parent-focus', $event)"
|
|
|
|
>
|
|
|
|
<template #header
|
|
|
|
><i class="ph-bell ph-bold ph-lg" style="margin-right: 8px"></i
|
|
|
|
>{{ column.name }}</template
|
|
|
|
>
|
2020-07-11 03:13:11 +02:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
<XNotifications :include-types="column.includingTypes" />
|
|
|
|
</XColumn>
|
2020-07-11 03:13:11 +02:00
|
|
|
</template>
|
|
|
|
|
2022-03-20 19:11:14 +01:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import { defineAsyncComponent } from "vue";
|
|
|
|
import XColumn from "./column.vue";
|
|
|
|
import { updateColumn } from "./deck-store";
|
|
|
|
import type { Column } from "./deck-store";
|
|
|
|
import XNotifications from "@/components/MkNotifications.vue";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import { i18n } from "@/i18n";
|
2020-07-11 03:13:11 +02:00
|
|
|
|
2022-03-20 19:11:14 +01:00
|
|
|
const props = defineProps<{
|
|
|
|
column: Column;
|
|
|
|
isStacked: boolean;
|
|
|
|
}>();
|
2020-07-11 03:13:11 +02:00
|
|
|
|
2022-03-20 19:11:14 +01:00
|
|
|
const emit = defineEmits<{
|
2023-04-08 02:01:42 +02:00
|
|
|
(ev: "parent-focus", direction: "up" | "down" | "left" | "right"): void;
|
2022-03-20 19:11:14 +01:00
|
|
|
}>();
|
2020-07-11 03:13:11 +02:00
|
|
|
|
2022-12-06 07:50:59 +01:00
|
|
|
function func(): void {
|
2023-04-08 02:01:42 +02:00
|
|
|
os.popup(
|
|
|
|
defineAsyncComponent(
|
|
|
|
() => import("@/components/MkNotificationSettingWindow.vue")
|
|
|
|
),
|
|
|
|
{
|
|
|
|
includingTypes: props.column.includingTypes,
|
2022-03-20 19:11:14 +01:00
|
|
|
},
|
2023-04-08 02:01:42 +02:00
|
|
|
{
|
|
|
|
done: async (res) => {
|
|
|
|
const { includingTypes } = res;
|
|
|
|
updateColumn(props.column.id, {
|
|
|
|
includingTypes: includingTypes,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"closed"
|
|
|
|
);
|
2022-03-20 19:11:14 +01:00
|
|
|
}
|
2022-07-16 22:33:21 +02:00
|
|
|
|
2023-04-08 02:01:42 +02:00
|
|
|
const menu = [
|
|
|
|
{
|
|
|
|
icon: "ph-pencil ph-bold ph-lg",
|
|
|
|
text: i18n.ts.notificationSetting,
|
|
|
|
action: func,
|
|
|
|
},
|
|
|
|
];
|
2020-07-11 03:13:11 +02:00
|
|
|
</script>
|