diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index 191556c408..7d274f7d28 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -37,10 +37,11 @@ export const serverLogger = new Logger("server", "gray", false); const app = new Koa(); app.proxy = true; -// Replace trailing slashes +// Replace trailing slashes app.use(async (ctx, next) => { - if (ctx.request.path !== "/" && ctx.request.path.endsWith('/')) return ctx.redirect(ctx.request.path.replace(/\/$/, "")) - else await next() + if (ctx.request.path !== "/" && ctx.request.path.endsWith("/")) + return ctx.redirect(ctx.request.path.replace(/\/$/, "")); + else await next(); }); if (!["production", "test"].includes(process.env.NODE_ENV || "")) { diff --git a/packages/client/src/pages/settings/reaction.vue b/packages/client/src/pages/settings/reaction.vue index dbe909e98c..e32f6516ea 100644 --- a/packages/client/src/pages/settings/reaction.vue +++ b/packages/client/src/pages/settings/reaction.vue @@ -2,7 +2,6 @@
{{ i18n.ts.enableEmojiReactions }} -
@@ -104,6 +103,17 @@ import { defaultStore } from "@/store"; import { i18n } from "@/i18n"; import { definePageMetadata } from "@/scripts/page-metadata"; import { deepClone } from "@/scripts/clone"; +import { unisonReload } from "@/scripts/unison-reload"; + +async function reloadAsk() { + const { canceled } = await os.confirm({ + type: "info", + text: i18n.ts.reloadToApplySetting, + }); + if (canceled) return; + + unisonReload(); +} let reactions = $ref(deepClone(defaultStore.state.reactions)); @@ -185,6 +195,10 @@ watch( } ); +watch(enableEmojiReactions, async () => { + await reloadAsk(); +}); + const headerActions = $computed(() => []); const headerTabs = $computed(() => []);