StatusContent: Better separate subject from status content.

This commit is contained in:
lain 2020-06-19 12:46:48 +02:00
parent 95f5c7fff6
commit a79bad5cdb
2 changed files with 13 additions and 15 deletions

View file

@ -142,12 +142,6 @@ const StatusContent = {
return html return html
} }
}, },
contentHtml () {
if (!this.status.summary_html) {
return this.postBodyHtml
}
return this.status.summary_html + '<br />' + this.postBodyHtml
},
...mapGetters(['mergedConfig']), ...mapGetters(['mergedConfig']),
...mapState({ ...mapState({
betterShadow: state => state.interface.browserSupport.cssFilter, betterShadow: state => state.interface.browserSupport.cssFilter,

View file

@ -31,7 +31,7 @@
<div <div
class="status-content media-body" class="status-content media-body"
@click.prevent="linkClicked" @click.prevent="linkClicked"
v-html="contentHtml" v-html="postBodyHtml"
/> />
<a <a
v-if="showingLongSubject" v-if="showingLongSubject"
@ -52,17 +52,17 @@
href="#" href="#"
@click.prevent="toggleShowMore" @click.prevent="toggleShowMore"
>{{ $t("general.show_more") }}</a> >{{ $t("general.show_more") }}</a>
<div
v-if="status.summary_html"
class="status-content media-body summary"
@click.prevent="linkClicked"
v-html="status.summary_html"
/>
<div <div
v-if="!hideSubjectStatus" v-if="!hideSubjectStatus"
class="status-content media-body" class="status-content media-body"
@click.prevent="linkClicked" @click.prevent="linkClicked"
v-html="contentHtml" v-html="postBodyHtml"
/>
<div
v-else
class="status-content media-body"
@click.prevent="linkClicked"
v-html="status.summary_html"
/> />
<a <a
v-if="hideSubjectStatus" v-if="hideSubjectStatus"
@ -181,6 +181,10 @@ $status-margin: 0.75em;
line-height: 1.4em; line-height: 1.4em;
white-space: pre-wrap; white-space: pre-wrap;
&.summary {
font-weight: bold;
}
blockquote { blockquote {
margin: 0.2em 0 0.2em 2em; margin: 0.2em 0 0.2em 2em;
font-style: italic; font-style: italic;
@ -226,7 +230,7 @@ $status-margin: 0.75em;
.greentext { .greentext {
color: $fallback--cGreen; color: $fallback--cGreen;
color: var(--postGreentext, $fallback--cGreen); color: var(--cGreen, $fallback--cGreen);
} }
.timeline :not(.panel-disabled) > { .timeline :not(.panel-disabled) > {