From 3a671e42d133edb52a6e880cf4d0d87223e26fbe Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 20 Sep 2023 20:46:48 -0700 Subject: [PATCH] feat: :sparkles: Show instance default reactions on welcome page instead of hardcoded --- .../client/src/pages/welcome.entrance.a.vue | 34 +++++++++---------- packages/client/src/store.ts | 28 ++++++++------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/client/src/pages/welcome.entrance.a.vue b/packages/client/src/pages/welcome.entrance.a.vue index c5f57d5808..49e560b4d6 100644 --- a/packages/client/src/pages/welcome.entrance.a.vue +++ b/packages/client/src/pages/welcome.entrance.a.vue @@ -7,17 +7,12 @@
- - - - - - - - - - - +
{ - window.open(instance.tosUrl, "_blank"); - }, - } : null, + instance.tosUrl + ? { + text: i18n.ts.tos, + icon: "ph-scroll ph-bold ph-lg", + action: () => { + window.open(instance.tosUrl, "_blank"); + }, + } + : null, ], ev.currentTarget ?? ev.target, ); diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index 9a545415e9..8d8e8b4ffb 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -17,6 +17,20 @@ const menuOptions = [ "search", ]; +export const defaultReactions = [ + "โญ", + "โค๏ธ", + "๐Ÿ˜†", + "๐Ÿค”", + "๐Ÿ˜ฎ", + "๐ŸŽ‰", + "๐Ÿ’ข", + "๐Ÿ˜ฅ", + "๐Ÿ˜‡", + "๐Ÿฅด", + "๐Ÿฎ", +]; + // TODO: ใใ‚Œใžใ‚Œใ„ใกใ„ใกwhereใจใ‹defaultใจใ„ใ†ใ‚ญใƒผใ‚’ไป˜ใ‘ใชใใ‚ƒใ„ใ‘ใชใ„ใฎๅ†—้•ทใชใฎใงใชใ‚“ใจใ‹ใ™ใ‚‹(ใŸใ ๅž‹ๅฎš็พฉใŒ้ขๅ€’ใซใชใ‚Šใใ†) // ใ‚ใจใ€็พ่กŒใฎๅฎš็พฉใฎไป•ๆ–นใชใ‚‰ใ€ŒwhereใŒไฝ•ใงใ‚ใ‚‹ใ‹ใซ้–ขใ‚ใ‚‰ใšใ‚ญใƒผๅใฎ้‡่ค‡ไธๅฏใ€ใจใ„ใ†ๅˆถ็ด„ใ‚’ไป˜ใ‘ใ‚‰ใ‚Œใ‚‹ใƒกใƒชใƒƒใƒˆใ‚‚ใ‚ใ‚‹ใ‹ใ‚‰ใใฎใƒกใƒชใƒƒใƒˆใ‚’ๅผ•ใ็ถ™ใๆ–นๆณ•ใ‚‚่€ƒใˆใชใ„ใจใ„ใ‘ใชใ„ export const defaultStore = markRaw( @@ -83,19 +97,7 @@ export const defaultStore = markRaw( }, reactions: { where: "account", - default: [ - "โญ", - "โค๏ธ", - "๐Ÿ˜†", - "๐Ÿค”", - "๐Ÿ˜ฎ", - "๐ŸŽ‰", - "๐Ÿ’ข", - "๐Ÿ˜ฅ", - "๐Ÿ˜‡", - "๐Ÿฅด", - "๐Ÿฎ", - ], + default: defaultReactions, }, mutedWords: { where: "account",