feat: ✨ Show instance default reactions on welcome page instead of hardcoded
This commit is contained in:
parent
7acb5ebde9
commit
3a671e42d1
@ -7,17 +7,12 @@
|
||||
<div class="shape2"></div>
|
||||
<img src="/client-assets/misskey.svg" class="misskey" />
|
||||
<div class="emojis">
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="⭐" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="❤️" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="😆" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="🤔" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="😮" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="🎉" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="💢" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="😥" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="😇" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="🥴" />
|
||||
<MkEmoji :normal="true" :no-style="true" emoji="🍮" />
|
||||
<MkEmoji
|
||||
v-for="reaction in defaultReactions"
|
||||
:normal="true"
|
||||
:no-style="true"
|
||||
:emoji="reaction"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<img
|
||||
@ -112,6 +107,7 @@ import { instanceName } from "@/config";
|
||||
import * as os from "@/os";
|
||||
import { instance } from "@/instance";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultReactions } from "@/store";
|
||||
|
||||
const meta = ref();
|
||||
const stats = ref();
|
||||
@ -184,13 +180,15 @@ function showMenu(ev) {
|
||||
os.pageWindow("/about-firefish");
|
||||
},
|
||||
},
|
||||
instance.tosUrl ? {
|
||||
instance.tosUrl
|
||||
? {
|
||||
text: i18n.ts.tos,
|
||||
icon: "ph-scroll ph-bold ph-lg",
|
||||
action: () => {
|
||||
window.open(instance.tosUrl, "_blank");
|
||||
},
|
||||
} : null,
|
||||
}
|
||||
: null,
|
||||
],
|
||||
ev.currentTarget ?? ev.target,
|
||||
);
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user