Merge branch '603' into 'develop'

Hide text format when only plaintext is available

Closes #603

See merge request pleroma/pleroma-fe!867
This commit is contained in:
Shpuld Shpludson 2019-07-05 13:22:04 +00:00
commit 4f0ba97be9

View File

@ -74,6 +74,13 @@
</p> </p>
</EmojiInput> </EmojiInput>
<div class="visibility-tray"> <div class="visibility-tray">
<scope-selector
:showAll="showAllScopes"
:userDefault="userDefaultScope"
:originalScope="copyMessageScope"
:initialScope="newStatus.visibility"
:onScopeChange="changeVis"/>
<div class="text-format" v-if="postFormats.length > 1"> <div class="text-format" v-if="postFormats.length > 1">
<label for="post-content-type" class="select"> <label for="post-content-type" class="select">
<select id="post-content-type" v-model="newStatus.contentType" class="form-control"> <select id="post-content-type" v-model="newStatus.contentType" class="form-control">
@ -84,18 +91,11 @@
<i class="icon-down-open"></i> <i class="icon-down-open"></i>
</label> </label>
</div> </div>
<div class="text-format" v-if="postFormats.length === 1"> <div class="text-format" v-if="postFormats.length === 1 && postFormats[0] !== 'text/plain'">
<span class="only-format"> <span class="only-format">
{{$t(`post_status.content_type["${postFormats[0]}"]`)}} {{$t(`post_status.content_type["${postFormats[0]}"]`)}}
</span> </span>
</div> </div>
<scope-selector
:showAll="showAllScopes"
:userDefault="userDefaultScope"
:originalScope="copyMessageScope"
:initialScope="newStatus.visibility"
:onScopeChange="changeVis"/>
</div> </div>
</div> </div>
<poll-form <poll-form
@ -170,7 +170,6 @@
.visibility-tray { .visibility-tray {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: row-reverse;
padding-top: 5px; padding-top: 5px;
} }
} }
@ -217,7 +216,7 @@
.icon-chart-bar { .icon-chart-bar {
cursor: pointer; cursor: pointer;
} }
.error { .error {
text-align: center; text-align: center;