固定投稿フォームを実装 (#5994)

* 固定投稿フォームを実装

* fix
This commit is contained in:
Xeltica
2020-02-19 03:11:09 +09:00
committed by GitHub
parent ca7cb94358
commit a340d4ed8e
4 changed files with 28 additions and 2 deletions

View File

@ -6,7 +6,7 @@
@drop.stop="onDrop"
>
<header>
<button class="cancel _button" @click="cancel"><fa :icon="faTimes"/></button>
<button v-if="!fixed" class="cancel _button" @click="cancel"><fa :icon="faTimes"/></button>
<div>
<span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span>
<button class="_button visibility" @click="setVisibility" ref="visibilityButton">
@ -18,7 +18,7 @@
<button class="submit _buttonPrimary" :disabled="!canPost" @click="post">{{ submitText }}<fa :icon="reply ? faReply : renote ? faQuoteRight : faPaperPlane"/></button>
</div>
</header>
<div class="form">
<div class="form" :class="{ fixed }">
<x-note-preview class="preview" v-if="reply" :note="reply"/>
<x-note-preview class="preview" v-if="renote" :note="renote"/>
<div class="with-quote" v-if="quoteId"><fa icon="quote-left"/> {{ $t('quoteAttached') }}<button @click="quoteId = null"><fa icon="times"/></button></div>
@ -108,6 +108,11 @@ export default Vue.extend({
type: Boolean,
required: false,
default: false
},
fixed: {
type: Boolean,
required: false,
default: false
}
},
@ -651,6 +656,11 @@ export default Vue.extend({
max-width: 500px;
margin: 0 auto;
&.fixed {
max-width: unset;
margin: 0 32px;
}
> .preview {
padding: 16px;
}