feature: ナビメニューからプロフィールを削除してカスタム絵文字を追加
(cherry picked from commit 94b8cea7bb6fea37f3a5c20fb97eadc5828e1272)
This commit is contained in:
parent
4c7cd47fb6
commit
624e5e82cd
|
@ -657,6 +657,8 @@ export interface Locale {
|
|||
"regenerateLoginToken": string;
|
||||
"regenerateLoginTokenDescription": string;
|
||||
"setMultipleBySeparatingWithSpace": string;
|
||||
"emojiNameValidation": string;
|
||||
"isSensitive": string;
|
||||
"fileIdOrUrl": string;
|
||||
"behavior": string;
|
||||
"sample": string;
|
||||
|
|
|
@ -88,7 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch } from 'vue';
|
||||
import { computed, watch,ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkModalWindow from '@/components/MkModalWindow.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 rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
||||
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 isRequest = $ref(props.isRequest);
|
||||
|
||||
|
@ -127,8 +127,6 @@ watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
|||
}, { immediate: true });
|
||||
|
||||
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(() => {
|
||||
return name.match(/^[a-zA-Z0-9_]+$/) && imgUrl.value != null;
|
||||
})
|
||||
|
|
|
@ -149,10 +149,30 @@ export const navbarItemDef = reactive({
|
|||
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: {
|
||||
title: i18n.ts.profile,
|
||||
icon: 'ti ti-user',
|
||||
show: computed(() => $i != null),
|
||||
to: `/@${$i?.username}`,
|
||||
},
|
||||
clearCache: {
|
||||
title: i18n.ts.clearCache,
|
||||
icon: 'ti ti-trash',
|
||||
action: (ev) => {
|
||||
clearCache();
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue