1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-25 07:37:13 +09:00

Pages埋め込みノートで詳細表示にするかどうか選べるように

This commit is contained in:
syuilo 2020-11-15 13:47:15 +09:00
parent f655b54937
commit 77de3f2b9d
3 changed files with 7 additions and 3 deletions

View File

@ -1181,6 +1181,7 @@ _pages:
_note: _note:
id: "ートID" id: "ートID"
idDescription: "ートURLをペーストして設定することもできます。" idDescription: "ートURLをペーストして設定することもできます。"
detailed: "詳細な表示"
switch: "スイッチ" switch: "スイッチ"
_switch: _switch:

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="voxdxuby"> <div class="voxdxuby">
<XNote v-if="note" v-model:note="note" :key="note.id"/> <XNote v-if="note" v-model:note="note" :key="note.id" :detail="value.detailed"/>
</div> </div>
</template> </template>

View File

@ -7,8 +7,9 @@
<span>{{ $t('_pages.blocks._note.id') }}</span> <span>{{ $t('_pages.blocks._note.id') }}</span>
<template #desc>{{ $t('_pages.blocks._note.idDescription') }}</template> <template #desc>{{ $t('_pages.blocks._note.idDescription') }}</template>
</MkInput> </MkInput>
<MkSwitch v-model:value="value.detailed"><span>{{ $t('_pages.blocks._note.detailed') }}</span></MkSwitch>
<XNote v-if="note" v-model:note="note" :key="note.id" style="margin-bottom: 16px;"/> <XNote v-if="note" v-model:note="note" :key="note.id + ':' + (value.detailed ? 'detailed' : 'normal')" :detail="value.detailed" style="margin-bottom: 16px;"/>
</section> </section>
</XContainer> </XContainer>
</template> </template>
@ -18,12 +19,13 @@ import { defineComponent } from 'vue';
import { faStickyNote } from '@fortawesome/free-solid-svg-icons'; import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
import XContainer from '../page-editor.container.vue'; import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/ui/input.vue'; import MkInput from '@/components/ui/input.vue';
import MkSwitch from '@/components/ui/switch.vue';
import XNote from '@/components/note.vue'; import XNote from '@/components/note.vue';
import * as os from '@/os'; import * as os from '@/os';
export default defineComponent({ export default defineComponent({
components: { components: {
XContainer, MkInput, XNote XContainer, MkInput, MkSwitch, XNote
}, },
props: { props: {
@ -57,6 +59,7 @@ export default defineComponent({
created() { created() {
if (this.value.note == null) this.value.note = null; if (this.value.note == null) this.value.note = null;
if (this.value.detailed == null) this.value.detailed = false;
}, },
}); });
</script> </script>