feature: ナビメニューからプロフィールを削除してカスタム絵文字を追加
(cherry picked from commit 94b8cea7bb6fea37f3a5c20fb97eadc5828e1272)
This commit is contained in:
parent
4c7cd47fb6
commit
624e5e82cd
|
@ -657,6 +657,8 @@ export interface Locale {
|
||||||
"regenerateLoginToken": string;
|
"regenerateLoginToken": string;
|
||||||
"regenerateLoginTokenDescription": string;
|
"regenerateLoginTokenDescription": string;
|
||||||
"setMultipleBySeparatingWithSpace": string;
|
"setMultipleBySeparatingWithSpace": string;
|
||||||
|
"emojiNameValidation": string;
|
||||||
|
"isSensitive": string;
|
||||||
"fileIdOrUrl": string;
|
"fileIdOrUrl": string;
|
||||||
"behavior": string;
|
"behavior": string;
|
||||||
"sample": string;
|
"sample": string;
|
||||||
|
|
|
@ -88,7 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch } from 'vue';
|
import { computed, watch,ref } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
@ -118,7 +118,7 @@ let localOnly = $ref(props.emoji ? props.emoji.localOnly : false);
|
||||||
let roleIdsThatCanBeUsedThisEmojiAsReaction = $ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
let roleIdsThatCanBeUsedThisEmojiAsReaction = $ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
||||||
let rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
let rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
||||||
let file = $ref<Misskey.entities.DriveFile>();
|
let file = $ref<Misskey.entities.DriveFile>();
|
||||||
let chooseFile: DriveFile|null = $ref(null);
|
let chooseFile: MkDriveFile|null = $ref(null);
|
||||||
let draft = $ref(props.emoji ? props.emoji.draft : false);
|
let draft = $ref(props.emoji ? props.emoji.draft : false);
|
||||||
let isRequest = $ref(props.isRequest);
|
let isRequest = $ref(props.isRequest);
|
||||||
|
|
||||||
|
@ -127,8 +127,6 @@ watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
||||||
}, { immediate: true });
|
}, { immediate: true });
|
||||||
|
|
||||||
const imgUrl = computed(() => file ? file.url : props.emoji ? `/emoji/${props.emoji.name}.webp` : null);
|
const imgUrl = computed(() => file ? file.url : props.emoji ? `/emoji/${props.emoji.name}.webp` : null);
|
||||||
let draft = $ref(props.emoji.draft);
|
|
||||||
let isRequest = $ref(props.isRequest);
|
|
||||||
const validation = computed(() => {
|
const validation = computed(() => {
|
||||||
return name.match(/^[a-zA-Z0-9_]+$/) && imgUrl.value != null;
|
return name.match(/^[a-zA-Z0-9_]+$/) && imgUrl.value != null;
|
||||||
})
|
})
|
||||||
|
|
|
@ -148,6 +148,19 @@ export const navbarItemDef = reactive({
|
||||||
action: (ev) => {
|
action: (ev) => {
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
switchLightOrDarkMode: {
|
||||||
|
title: i18n.ts.switchLightOrDarkMode,
|
||||||
|
icon: 'ti ti-palette',
|
||||||
|
action: (ev) => {
|
||||||
|
const mode = defaultStore.makeGetterSetter('darkMode');
|
||||||
|
mode.set(!mode.get());
|
||||||
|
},
|
||||||
|
},
|
||||||
|
customEmojis: {
|
||||||
|
title: i18n.ts.customEmojis,
|
||||||
|
icon: 'ti ti-icons',
|
||||||
|
to: '/about#emojis',
|
||||||
},
|
},
|
||||||
profile: {
|
profile: {
|
||||||
title: i18n.ts.profile,
|
title: i18n.ts.profile,
|
||||||
|
@ -155,4 +168,11 @@ export const navbarItemDef = reactive({
|
||||||
show: computed(() => $i != null),
|
show: computed(() => $i != null),
|
||||||
to: `/@${$i?.username}`,
|
to: `/@${$i?.username}`,
|
||||||
},
|
},
|
||||||
|
clearCache: {
|
||||||
|
title: i18n.ts.clearCache,
|
||||||
|
icon: 'ti ti-trash',
|
||||||
|
action: (ev) => {
|
||||||
|
clearCache();
|
||||||
|
},
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue