🎨 and refactor
This commit is contained in:
parent
46e6dd99d1
commit
dba44daf9c
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
:class="[$style.root, { [$style.modal]: modal, _popup: modal }]"
|
:class="[$style.root]"
|
||||||
@dragover.stop="onDragover"
|
@dragover.stop="onDragover"
|
||||||
@dragenter="onDragenter"
|
@dragenter="onDragenter"
|
||||||
@dragleave="onDragleave"
|
@dragleave="onDragleave"
|
||||||
|
|
@ -114,7 +114,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, watch, nextTick, onMounted, defineAsyncComponent, provide, shallowRef, ref, computed, useTemplateRef, onUnmounted } from 'vue';
|
import { watch, nextTick, onMounted, defineAsyncComponent, provide, shallowRef, ref, computed, useTemplateRef, onUnmounted } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
|
|
@ -161,8 +161,6 @@ import { closeTip } from '@/tips.js';
|
||||||
|
|
||||||
const $i = ensureSignin();
|
const $i = ensureSignin();
|
||||||
|
|
||||||
const modal = inject(DI.inModal, false);
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<PostFormProps & {
|
const props = withDefaults(defineProps<PostFormProps & {
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
|
|
@ -1447,13 +1445,6 @@ defineExpose({
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
container-type: inline-size;
|
container-type: inline-size;
|
||||||
|
|
||||||
&.modal {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 520px;
|
|
||||||
overflow-x: clip;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region header
|
//#region header
|
||||||
|
|
@ -1722,7 +1713,8 @@ html[data-color-scheme=light] .preview {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 90px;
|
min-height: 90px;
|
||||||
height: 100%;
|
max-height: 500px;
|
||||||
|
field-sizing: content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textCount {
|
.textCount {
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkPostForm
|
<MkPostForm
|
||||||
ref="form"
|
ref="form"
|
||||||
:class="$style.form"
|
:class="$style.form"
|
||||||
|
class="_popup"
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
autofocus
|
autofocus
|
||||||
freezeAfterPosted
|
freezeAfterPosted
|
||||||
|
|
@ -73,7 +74,8 @@ function onModalClosed() {
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.form {
|
.form {
|
||||||
max-height: 100%;
|
width: 100%;
|
||||||
|
max-width: 520px;
|
||||||
margin: 0 auto auto auto;
|
margin: 0 auto auto auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue