Apply suggestions from code review

Co-authored-by: taichan <40626578+tai-cha@users.noreply.github.com>
This commit is contained in:
FineArchs 2024-06-10 05:34:46 +09:00 committed by GitHub
parent 1fad9a8b52
commit faf916da85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -231,7 +231,7 @@ if (collapsingNoteCondition === 'seeRenderedSize') {
const limit = collapseSize * parseFloat(getComputedStyle(collapsibleArea.value).fontSize);
isLong.value = current > limit;
collapsed.value &&= isLong.value;
})
});
}
// plugin

View File

@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue';
import { ref, computed, onMounted } from 'vue';
import * as Misskey from 'misskey-js';
import * as mfm from 'mfm-js';
import MkMediaList from '@/components/MkMediaList.vue';
@ -57,7 +57,7 @@ if (collapsingNoteCondition === 'seeRenderedSize') {
const limit = collapseSize * parseFloat(getComputedStyle(collapsibleArea.value).fontSize);
isLong.value = current > limit;
collapsed.value &&= isLong.value;
})
});
}
const isLong = ref(true);
switch (collapsingNoteCondition) {

View File

@ -98,7 +98,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="legacyCalculation">{{ i18n.ts.legacyCalculation }}</option>
<option value="seeRenderedSize">{{ i18n.ts.seeRenderedSize }}</option>
</MkRadios>
<MkRadios v-model="collapsingNoteSize" v-if="collapsingNoteCondition !== 'legacyCalculation'">
<MkRadios v-if="collapsingNoteCondition !== 'legacyCalculation'" v-model="collapsingNoteSize">
<template #label>{{ i18n.ts.collapsingNoteSize }}</template>
<option :value="18">{{ i18n.ts.large }}</option>
<option :value="13.5">{{ i18n.ts.medium }}</option>