This commit is contained in:
syuilo 2024-09-28 14:02:48 +09:00
parent 3f3c59e1ae
commit e5856c6b3b
3 changed files with 11 additions and 2 deletions

View File

@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<header :class="$style.root"> <header :class="$style.root">
<MkCondensedLine :minScale="0" style="min-width: 0;"> <component :is="defaultStore.state.enableCondensedLine ? 'MkCondensedLine' : 'div'" :minScale="0" style="min-width: 0;">
<div style="display: flex; white-space: nowrap; align-items: baseline;"> <div style="display: flex; white-space: nowrap; align-items: baseline;">
<div v-if="mock" :class="$style.name"> <div v-if="mock" :class="$style.name">
<MkUserName :user="note.user"/> <MkUserName :user="note.user"/>
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="note.user.isBot" :class="$style.isBot">bot</div> <div v-if="note.user.isBot" :class="$style.isBot">bot</div>
<div :class="$style.username"><MkAcct :user="note.user"/></div> <div :class="$style.username"><MkAcct :user="note.user"/></div>
</div> </div>
</MkCondensedLine> </component>
<div v-if="note.user.badgeRoles" :class="$style.badgeRoles"> <div v-if="note.user.badgeRoles" :class="$style.badgeRoles">
<img v-for="(role, i) in note.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.badgeRole" :src="role.iconUrl!"/> <img v-for="(role, i) in note.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.badgeRole" :src="role.iconUrl!"/>
</div> </div>
@ -44,6 +44,7 @@ import * as Misskey from 'misskey-js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { notePage } from '@/filters/note.js'; import { notePage } from '@/filters/note.js';
import { userPage } from '@/filters/user.js'; import { userPage } from '@/filters/user.js';
import { defaultStore } from '@/store.js';
defineProps<{ defineProps<{
note: Misskey.entities.Note; note: Misskey.entities.Note;

View File

@ -51,6 +51,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #label>{{ i18n.ts.experimentalFeatures }}</template> <template #label>{{ i18n.ts.experimentalFeatures }}</template>
<div class="_gaps_m"> <div class="_gaps_m">
<MkSwitch v-model="enableCondensedLine">
<template #label>Enable condensed line</template>
</MkSwitch>
</div> </div>
</MkFolder> </MkFolder>
@ -101,6 +104,7 @@ import FormSection from '@/components/form/section.vue';
const $i = signinRequired(); const $i = signinRequired();
const reportError = computed(defaultStore.makeGetterSetter('reportError')); const reportError = computed(defaultStore.makeGetterSetter('reportError'));
const enableCondensedLine = computed(defaultStore.makeGetterSetter('enableCondensedLine'));
const devMode = computed(defaultStore.makeGetterSetter('devMode')); const devMode = computed(defaultStore.makeGetterSetter('devMode'));
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies')); const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));

View File

@ -392,6 +392,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device', where: 'device',
default: 'horizontal' as 'vertical' | 'horizontal', default: 'horizontal' as 'vertical' | 'horizontal',
}, },
enableCondensedLine: {
where: 'device',
default: true,
},
additionalUnicodeEmojiIndexes: { additionalUnicodeEmojiIndexes: {
where: 'device', where: 'device',
default: {} as Record<string, Record<string, string[]>>, default: {} as Record<string, Record<string, string[]>>,