From 3a574cf4e28a8e788e85d6bd88b0582d4016e210 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 19:21:25 +0000 Subject: [PATCH 01/16] Update locale --- locales/en-US.yml | 2 ++ locales/ja-JP.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/locales/en-US.yml b/locales/en-US.yml index c6c442df7..10a9fca3b 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1114,6 +1114,8 @@ isPatron: "Calckey Patron" reactionPickerSkinTone: "Preferred emoji skin tone" enableServerMachineStats: "Enable server hardware statistics" enableIdenticonGeneration: "Enable Identicon generation" +showPopup: "Notify users about this announcement with a popup" +isGoodNews: "This is a good news" _sensitiveMediaDetection: description: "Reduces the effort of server moderation through automatically recognizing diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 9f2f825e5..e12804428 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -980,6 +980,8 @@ preventAiLearningDescription: "投稿したノート、添付した画像など noGraze: "ブラウザの拡張機能「Graze for Mastodon」は、Calckeyの動作を妨げるため、無効にしてください。" enableServerMachineStats: "サーバーのマシン情報を公開する" enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする" +showPopup: "ポップアップを表示してユーザーに知らせる" +isGoodNews: "これは良いニュースです" _sensitiveMediaDetection: description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てられます。サーバーの負荷が少し増えます。" From 75b352b7213d23ba5fd1b1e65ea74f7150a8fbf9 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 19:48:20 +0000 Subject: [PATCH 02/16] Add showPopup, isGoodNews & Update API --- .../1688845537045-announcement-popup.js | 21 +++++++++++++++++++ .../src/models/entities/announcement.ts | 10 +++++++++ .../endpoints/admin/announcements/create.ts | 14 +++++++++++++ .../api/endpoints/admin/announcements/list.ts | 12 +++++++++++ .../endpoints/admin/announcements/update.ts | 4 ++++ .../src/server/api/endpoints/announcements.ts | 10 +++++++++ 6 files changed, 71 insertions(+) create mode 100644 packages/backend/migration/1688845537045-announcement-popup.js diff --git a/packages/backend/migration/1688845537045-announcement-popup.js b/packages/backend/migration/1688845537045-announcement-popup.js new file mode 100644 index 000000000..196590d3e --- /dev/null +++ b/packages/backend/migration/1688845537045-announcement-popup.js @@ -0,0 +1,21 @@ +export class AnnouncementPopup1688845537045 { + name = "AnnouncementPopup1688845537045"; + + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement" ADD "showPopup" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" ADD "isGoodNews" boolean NOT NULL DEFAULT false`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement" DROP COLUMN "isGoodNews"`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" DROP COLUMN "showPopup"`, + ); + } +} diff --git a/packages/backend/src/models/entities/announcement.ts b/packages/backend/src/models/entities/announcement.ts index 1939604b9..7872c0fe1 100644 --- a/packages/backend/src/models/entities/announcement.ts +++ b/packages/backend/src/models/entities/announcement.ts @@ -36,6 +36,16 @@ export class Announcement { }) public imageUrl: string | null; + @Column("boolean", { + default: false, + }) + public showPopup: boolean; + + @Column("boolean", { + default: false, + }) + public isGoodNews: boolean; + constructor(data: Partial) { if (data == null) return; diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index a532b6677..754cc6c89 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -47,6 +47,16 @@ export const meta = { optional: false, nullable: true, }, + showPopup: { + type: "boolean", + optional: true, + nullable: false, + }, + isGoodNews: { + type: "boolean", + optional: true, + nullable: false, + }, }, }, } as const; @@ -57,6 +67,8 @@ export const paramDef = { title: { type: "string", minLength: 1 }, text: { type: "string", minLength: 1 }, imageUrl: { type: "string", nullable: true, minLength: 1 }, + showPopup: { type: "boolean" }, + isGoodNews: { type: "boolean" }, }, required: ["title", "text", "imageUrl"], } as const; @@ -69,6 +81,8 @@ export default define(meta, paramDef, async (ps) => { title: ps.title, text: ps.text, imageUrl: ps.imageUrl, + showPopup: ps.showPopup ?? false, + isGoodNews: ps.isGoodNews ?? false, }).then((x) => Announcements.findOneByOrFail(x.identifiers[0])); return Object.assign({}, announcement, { diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index fc5b02070..e96517c68 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -57,6 +57,16 @@ export const meta = { optional: false, nullable: false, }, + showPopup: { + type: "boolean", + optional: true, + nullable: false, + }, + isGoodNews: { + type: "boolean", + optional: true, + nullable: false, + }, }, }, }, @@ -100,5 +110,7 @@ export default define(meta, paramDef, async (ps) => { text: announcement.text, imageUrl: announcement.imageUrl, reads: reads.get(announcement)!, + showPopup: announcement.showPopup, + isGoodNews: announcement.isGoodNews, })); }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index 35e64f281..616b94d69 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -24,6 +24,8 @@ export const paramDef = { title: { type: "string", minLength: 1 }, text: { type: "string", minLength: 1 }, imageUrl: { type: "string", nullable: true, minLength: 1 }, + showPopup: { type: "boolean" }, + isGoodNews: { type: "boolean" }, }, required: ["id", "title", "text", "imageUrl"], } as const; @@ -38,5 +40,7 @@ export default define(meta, paramDef, async (ps, me) => { title: ps.title, text: ps.text, imageUrl: ps.imageUrl, + showPopup: ps.showPopup ?? false, + isGoodNews: ps.isGoodNews ?? false, }); }); diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index 00634cc42..1bab61ba2 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -56,6 +56,16 @@ export const meta = { optional: true, nullable: false, }, + showPopup: { + type: "boolean", + optional: false, + nullable: false, + }, + isGoodNews: { + type: "boolean", + optional: false, + nullable: false, + }, }, }, }, From 478be7a3aed5e4f9d31686ea3332e2f2b9fe88ea Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 19:55:38 +0000 Subject: [PATCH 03/16] Create MkAnnouncement component --- .../client/src/components/MkAnnouncement.vue | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 packages/client/src/components/MkAnnouncement.vue diff --git a/packages/client/src/components/MkAnnouncement.vue b/packages/client/src/components/MkAnnouncement.vue new file mode 100644 index 000000000..f95479a7f --- /dev/null +++ b/packages/client/src/components/MkAnnouncement.vue @@ -0,0 +1,83 @@ + + + + + From aeb1f9c99362b8c269a54513dea6222a9e8222fb Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 19:57:26 +0000 Subject: [PATCH 04/16] chore: Use css module --- packages/client/src/pages/admin/announcements.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/pages/admin/announcements.vue b/packages/client/src/pages/admin/announcements.vue index 9853158de..726e521ab 100644 --- a/packages/client/src/pages/admin/announcements.vue +++ b/packages/client/src/pages/admin/announcements.vue @@ -7,7 +7,7 @@ :display-back-button="true" /> -
+
- From c47ec377c7a1a17f7914babcb44474e3028e9dc0 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 20:01:16 +0000 Subject: [PATCH 05/16] Add showPopup, isGoodNews to announcement setting UI --- packages/client/src/pages/admin/announcements.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/client/src/pages/admin/announcements.vue b/packages/client/src/pages/admin/announcements.vue index 726e521ab..95ad5a8a2 100644 --- a/packages/client/src/pages/admin/announcements.vue +++ b/packages/client/src/pages/admin/announcements.vue @@ -22,6 +22,17 @@ + {{ i18n.ts.showPopup }} + {{ i18n.ts.isGoodNews }}

{{ i18n.t("nUsersRead", { n: announcement.reads }) @@ -57,6 +68,7 @@ import {} from "vue"; import MkButton from "@/components/MkButton.vue"; import MkInput from "@/components/form/input.vue"; +import MkSwitch from "@/components/form/switch.vue"; import MkTextarea from "@/components/form/textarea.vue"; import * as os from "@/os"; import { i18n } from "@/i18n"; @@ -74,6 +86,8 @@ function add() { title: "", text: "", imageUrl: null, + showPopup: false, + isGoodNews: false, }); } From f7062a03fe53ccd8a86f5ef596b69fddb5421574 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 20:09:40 +0000 Subject: [PATCH 06/16] Show popups at client init --- packages/client/src/init.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index 1c68b87c9..1b85ef9c6 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -36,7 +36,7 @@ import { version, ui, lang, host } from "@/config"; import { applyTheme } from "@/scripts/theme"; import { isDeviceDarkmode } from "@/scripts/is-device-darkmode"; import { i18n } from "@/i18n"; -import { confirm, alert, post, popup, toast } from "@/os"; +import { confirm, alert, post, popup, toast, api } from "@/os"; import { stream } from "@/stream"; import * as sound from "@/scripts/sound"; import { $i, refreshAccount, login, updateAccount, signout } from "@/account"; @@ -272,6 +272,25 @@ function checkForSplash() { } } + if ($i) { + api("announcements", { withUnreads: true }) + .then((announcements) => { + console.log(announcements); + announcements.forEach((announcement) => { + if (announcement.showPopup && announcement.isRead === false) + popup( + defineAsyncComponent( + () => import("@/components/MkAnnouncement.vue"), + ), + { announcement: announcement }, + {}, + "closed", + ); + }); + }) + .catch((err) => console.log(err)); + } + // NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため) watch( defaultStore.reactiveState.darkMode, From e7ccbb030defc3a476181ef97941e0fec21cdff6 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 20:15:08 +0000 Subject: [PATCH 07/16] Fix isRead not being saved on closing popups --- packages/client/src/components/MkAnnouncement.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/MkAnnouncement.vue b/packages/client/src/components/MkAnnouncement.vue index f95479a7f..205709d98 100644 --- a/packages/client/src/components/MkAnnouncement.vue +++ b/packages/client/src/components/MkAnnouncement.vue @@ -17,7 +17,10 @@ :class="$style.gotIt" primary full - @click="$refs.modal.close() && markAsRead()" + @click=" + $refs.modal.close(); + markAsRead(); + " >{{ i18n.ts.gotIt }}

@@ -42,7 +45,7 @@ const { id, text, title, imageUrl, isGoodNews } = props.announcement; const modal = shallowRef>(); function markAsRead() { - os.api("i/read-announcement", { announcementId: props.announcement.id }); + os.api("i/read-announcement", { announcementId: id }); } From d8a94fc70790dba68e17cbf5ec35a682be258d13 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 20:22:04 +0000 Subject: [PATCH 08/16] oops (remove debug logs) --- packages/client/src/init.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index 1b85ef9c6..a0e99b9dc 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -275,7 +275,6 @@ function checkForSplash() { if ($i) { api("announcements", { withUnreads: true }) .then((announcements) => { - console.log(announcements); announcements.forEach((announcement) => { if (announcement.showPopup && announcement.isRead === false) popup( From 20fbb4f57e2dce25d96cef9564874edd80d29a54 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 20:31:18 +0000 Subject: [PATCH 09/16] Don't show more then three announcement popups (because it can be annoying for new users) --- packages/client/src/init.ts | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index a0e99b9dc..ff4dee309 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -273,19 +273,26 @@ function checkForSplash() { } if ($i) { - api("announcements", { withUnreads: true }) + api("announcements", { withUnreads: true, limit: 10 }) .then((announcements) => { - announcements.forEach((announcement) => { - if (announcement.showPopup && announcement.isRead === false) - popup( - defineAsyncComponent( - () => import("@/components/MkAnnouncement.vue"), - ), - { announcement: announcement }, - {}, - "closed", - ); + const unreadAnnouncements = announcements.filter((item) => { + return !item.isRead; }); + if (unreadAnnouncements.length > 3) { + // TODO: navigate to the announcements page when there are too many unreads + } else { + unreadAnnouncements.forEach((item) => { + if (item.showPopup) + popup( + defineAsyncComponent( + () => import("@/components/MkAnnouncement.vue"), + ), + { announcement: item }, + {}, + "closed", + ); + }); + } }) .catch((err) => console.log(err)); } From 8b79f59d8de4d28d9af1d79131451ac0bd7c201b Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 21:02:11 +0000 Subject: [PATCH 10/16] Navigate to /announcements if there are more than three unreads --- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + .../src/components/MkManyAnnouncements.vue | 67 +++++++++++++++++++ packages/client/src/init.ts | 14 +++- 4 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 packages/client/src/components/MkManyAnnouncements.vue diff --git a/locales/en-US.yml b/locales/en-US.yml index 10a9fca3b..8844cf9be 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1116,6 +1116,7 @@ enableServerMachineStats: "Enable server hardware statistics" enableIdenticonGeneration: "Enable Identicon generation" showPopup: "Notify users about this announcement with a popup" isGoodNews: "This is a good news" +youHaveUnreadAnnouncements: "You have unread announcements" _sensitiveMediaDetection: description: "Reduces the effort of server moderation through automatically recognizing diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1d23fc8cf..873eed1cf 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -982,6 +982,7 @@ enableServerMachineStats: "サーバーのマシン情報を公開する" enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする" showPopup: "ポップアップを表示してユーザーに知らせる" isGoodNews: "これは良いニュースです" +youHaveUnreadAnnouncements: "未読のお知らせがあります" _sensitiveMediaDetection: description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てられます。サーバーの負荷が少し増えます。" diff --git a/packages/client/src/components/MkManyAnnouncements.vue b/packages/client/src/components/MkManyAnnouncements.vue new file mode 100644 index 000000000..30cdcf99e --- /dev/null +++ b/packages/client/src/components/MkManyAnnouncements.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index ff4dee309..2b99dd4d5 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -272,14 +272,24 @@ function checkForSplash() { } } - if ($i) { + if ( + $i && + !["/announcements", "/announcements/"].includes(window.location.pathname) + ) { api("announcements", { withUnreads: true, limit: 10 }) .then((announcements) => { const unreadAnnouncements = announcements.filter((item) => { return !item.isRead; }); if (unreadAnnouncements.length > 3) { - // TODO: navigate to the announcements page when there are too many unreads + popup( + defineAsyncComponent( + () => import("@/components/MkManyAnnouncements.vue"), + ), + {}, + {}, + "closed", + ); } else { unreadAnnouncements.forEach((item) => { if (item.showPopup) From ac9774c1e625818f842889eebae6cf20b41abcc2 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 21:17:13 +0000 Subject: [PATCH 11/16] 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 205709d98..89bd734cd 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 }); -} +}; From 2f4f3a3e02b55e42f7b3756676a2b3c7e39ee346 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 21:21:16 +0000 Subject: [PATCH 12/16] Remove unnecessary imports --- .../src/components/MkManyAnnouncements.vue | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/client/src/components/MkManyAnnouncements.vue b/packages/client/src/components/MkManyAnnouncements.vue index 30cdcf99e..5c8b225de 100644 --- a/packages/client/src/components/MkManyAnnouncements.vue +++ b/packages/client/src/components/MkManyAnnouncements.vue @@ -19,7 +19,6 @@ import { shallowRef } from "vue"; import MkModal from "@/components/MkModal.vue"; import MkButton from "@/components/MkButton.vue"; -import { version } from "@/config"; import { i18n } from "@/i18n"; import * as os from "@/os"; @@ -45,23 +44,10 @@ const checkAnnouncements = () => { .title { font-weight: bold; -} - -.version { - margin: 1em 0; -} - -.image { - max-width: 500px; + margin: 0; } .gotIt { margin: 8px 0 0 0; } - -.releaseNotes { - > img { - border-radius: 10px; - } -} From cb6df7fe25a09c3b0b33327f4f05b47d50d7c671 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 21:47:06 +0000 Subject: [PATCH 13/16] Don't show announcement popups if the tutorial isn't completed --- packages/client/src/init.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index 2b99dd4d5..11b9a2eda 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -274,6 +274,7 @@ function checkForSplash() { if ( $i && + defaultStore.state.tutorial === -1 && !["/announcements", "/announcements/"].includes(window.location.pathname) ) { api("announcements", { withUnreads: true, limit: 10 }) From 12f6c57ed150612f567305f1f72282fc949bce41 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 22:16:40 +0000 Subject: [PATCH 14/16] Update locale --- locales/ja-JP.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 873eed1cf..c3cd7b462 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -981,7 +981,7 @@ noGraze: "ブラウザの拡張機能「Graze for Mastodon」は、Calckeyの動 enableServerMachineStats: "サーバーのマシン情報を公開する" enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする" showPopup: "ポップアップを表示してユーザーに知らせる" -isGoodNews: "これは良いニュースです" +isGoodNews: "これは良いお知らせです" youHaveUnreadAnnouncements: "未読のお知らせがあります" _sensitiveMediaDetection: From b5585c1e98cb26baba8d75c91ccacd9fa47e2b01 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 22:29:36 +0000 Subject: [PATCH 15/16] better locale & style --- locales/en-US.yml | 4 ++-- locales/ja-JP.yml | 2 +- packages/client/src/components/MkAnnouncement.vue | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 8844cf9be..b7248e033 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1114,8 +1114,8 @@ isPatron: "Calckey Patron" reactionPickerSkinTone: "Preferred emoji skin tone" enableServerMachineStats: "Enable server hardware statistics" enableIdenticonGeneration: "Enable Identicon generation" -showPopup: "Notify users about this announcement with a popup" -isGoodNews: "This is a good news" +showPopup: "Notify users with popup" +showWithSparkles: "Show with sparkles" youHaveUnreadAnnouncements: "You have unread announcements" _sensitiveMediaDetection: diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c3cd7b462..e0f142117 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -981,7 +981,7 @@ noGraze: "ブラウザの拡張機能「Graze for Mastodon」は、Calckeyの動 enableServerMachineStats: "サーバーのマシン情報を公開する" enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする" showPopup: "ポップアップを表示してユーザーに知らせる" -isGoodNews: "これは良いお知らせです" +showWithSparcles: "タイトルをキラキラさせる" youHaveUnreadAnnouncements: "未読のお知らせがあります" _sensitiveMediaDetection: diff --git a/packages/client/src/components/MkAnnouncement.vue b/packages/client/src/components/MkAnnouncement.vue index 89bd734cd..eff5ae3bb 100644 --- a/packages/client/src/components/MkAnnouncement.vue +++ b/packages/client/src/components/MkAnnouncement.vue @@ -2,7 +2,7 @@
- {{ title }} + {{ title }}

{{ title }}

@@ -54,6 +54,7 @@ const gotIt = () => { border-radius: var(--radius); > img { + border-radius: 10px; max-height: 100%; max-width: 100%; } From fb8c2b131031df32c8c794cbc56312da51448e28 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 8 Jul 2023 22:37:15 +0000 Subject: [PATCH 16/16] fix --- locales/ja-JP.yml | 2 +- packages/client/src/components/MkAnnouncement.vue | 2 +- packages/client/src/pages/admin/announcements.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e0f142117..95fb7bcf8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -981,7 +981,7 @@ noGraze: "ブラウザの拡張機能「Graze for Mastodon」は、Calckeyの動 enableServerMachineStats: "サーバーのマシン情報を公開する" enableIdenticonGeneration: "ユーザーごとのIdenticon生成を有効にする" showPopup: "ポップアップを表示してユーザーに知らせる" -showWithSparcles: "タイトルをキラキラさせる" +showWithSparkles: "タイトルをキラキラさせる" youHaveUnreadAnnouncements: "未読のお知らせがあります" _sensitiveMediaDetection: diff --git a/packages/client/src/components/MkAnnouncement.vue b/packages/client/src/components/MkAnnouncement.vue index eff5ae3bb..24bf886dd 100644 --- a/packages/client/src/components/MkAnnouncement.vue +++ b/packages/client/src/components/MkAnnouncement.vue @@ -2,7 +2,7 @@
- {{ title }} + {{ title }}

{{ title }}

diff --git a/packages/client/src/pages/admin/announcements.vue b/packages/client/src/pages/admin/announcements.vue index 95ad5a8a2..b2172b307 100644 --- a/packages/client/src/pages/admin/announcements.vue +++ b/packages/client/src/pages/admin/announcements.vue @@ -31,7 +31,7 @@ v-if="announcement.showPopup" v-model="announcement.isGoodNews" class="_formBlock" - >{{ i18n.ts.isGoodNews }}{{ i18n.ts.showWithSparkles }}

{{