formatting

This commit is contained in:
ThatOneCalculator 2023-02-18 15:53:19 -08:00
parent 0f9daa4ac4
commit 3e87ca0e94
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 36 additions and 36 deletions

View File

@ -2,15 +2,15 @@
<MkModal ref="modal" :prefer-type="'dialog'" @click="modal.close()" @closed="onModalClosed()">
<MkPostForm ref="form" style="margin: 0 auto auto auto;" v-bind="props" autofocus freeze-after-posted @posted="onPosted" @cancel="modal.close()" @esc="modal.close()"/>
</MkModal>
</template>
</template>
<script lang="ts" setup>
import { } from 'vue';
import * as misskey from 'calckey-js';
import MkModal from '@/components/MkModal.vue';
import MkPostForm from '@/components/MkPostForm.vue';
<script lang="ts" setup>
import { } from 'vue';
import * as misskey from 'calckey-js';
import MkModal from '@/components/MkModal.vue';
import MkPostForm from '@/components/MkPostForm.vue';
const props = defineProps<{
const props = defineProps<{
reply?: misskey.entities.Note;
renote?: misskey.entities.Note;
channel?: any; // TODO
@ -25,22 +25,22 @@
instant?: boolean;
fixed?: boolean;
autofocus?: boolean;
}>();
}>();
const emit = defineEmits<{
const emit = defineEmits<{
(ev: 'closed'): void;
}>();
}>();
let modal = $shallowRef<InstanceType<typeof MkModal>>();
let form = $shallowRef<InstanceType<typeof MkPostForm>>();
let modal = $shallowRef<InstanceType<typeof MkModal>>();
let form = $shallowRef<InstanceType<typeof MkPostForm>>();
function onPosted() {
function onPosted() {
modal.close({
useSendAnimation: true,
});
}
}
function onModalClosed() {
function onModalClosed() {
emit('closed');
}
</script>
}
</script>