From ac9774c1e625818f842889eebae6cf20b41abcc2 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 21:17:13 +0000 Subject: [PATCH] Refactor MkAnnouncement --- .../client/src/components/MkAnnouncement.vue | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/packages/client/src/components/MkAnnouncement.vue b/packages/client/src/components/MkAnnouncement.vue index 205709d985..89bd734cd5 100644 --- a/packages/client/src/components/MkAnnouncement.vue +++ b/packages/client/src/components/MkAnnouncement.vue @@ -8,21 +8,13 @@ attached image - {{ i18n.ts.gotIt }} + {{ + i18n.ts.gotIt + }} @@ -32,7 +24,6 @@ import { shallowRef } from "vue"; import MkModal from "@/components/MkModal.vue"; import MkSparkle from "@/components/MkSparkle.vue"; import MkButton from "@/components/MkButton.vue"; -import { version } from "@/config"; import { i18n } from "@/i18n"; import * as os from "@/os"; @@ -44,9 +35,10 @@ const { id, text, title, imageUrl, isGoodNews } = props.announcement; const modal = shallowRef>(); -function markAsRead() { +const gotIt = () => { + modal.value.close(); os.api("i/read-announcement", { announcementId: id }); -} +};