diff --git a/src/components/status/status.js b/src/components/status/status.js index 550fe76ff43131f861b50dc5b54cd2f8b10d1eb3..0295cd0426ce93857de0a48b02a2e765bf45a875 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -251,6 +251,12 @@ const Status = { }, maxThumbnails () { return this.$store.state.config.maxThumbnails + }, + contentHtml () { + if (!this.status.summary_html) { + return this.status.statusnet_html + } + return this.status.summary_html + '<br />' + this.status.statusnet_html } }, components: { diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 1f41553427fe11a203f69fee8ee78a3ead31d69a..690e8318ed7a7b63b5dd4d34fe9bc5538a7a2838 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -98,16 +98,16 @@ </div> <div class="status-content-wrapper" :class="{ 'tall-status': !showingLongSubject }" v-if="longSubject"> - <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingLongSubject" href="#" @click.prevent="showingLongSubject=true">Show more</a> - <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html"></div> - <a v-if="showingLongSubject" href="#" class="status-unhider" @click.prevent="showingLongSubject=false">Show less</a> + <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="!showingLongSubject" href="#" @click.prevent="showingLongSubject=true">{{$t("general.show_more")}}</a> + <div @click.prevent="linkClicked" class="status-content media-body" v-html="contentHtml"></div> + <a v-if="showingLongSubject" href="#" class="status-unhider" @click.prevent="showingLongSubject=false">{{$t("general.show_less")}}</a> </div> <div :class="{'tall-status': hideTallStatus}" class="status-content-wrapper" v-else> - <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">Show more</a> - <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html" v-if="!hideSubjectStatus"></div> + <a class="tall-status-hider" :class="{ 'tall-status-hider_focused': isFocused }" v-if="hideTallStatus" href="#" @click.prevent="toggleShowMore">{{$t("general.show_more")}}</a> + <div @click.prevent="linkClicked" class="status-content media-body" v-html="contentHtml" v-if="!hideSubjectStatus"></div> <div @click.prevent="linkClicked" class="status-content media-body" v-html="status.summary_html" v-else></div> - <a v-if="hideSubjectStatus" href="#" class="cw-status-hider" @click.prevent="toggleShowMore">Show more</a> - <a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">Show less</a> + <a v-if="hideSubjectStatus" href="#" class="cw-status-hider" @click.prevent="toggleShowMore">{{$t("general.show_more")}}</a> + <a v-if="showingMore" href="#" class="status-unhider" @click.prevent="toggleShowMore">{{$t("general.show_less")}}</a> </div> <div v-if="status.attachments && (!hideSubjectStatus || showingLongSubject)" class="attachments media-body"> diff --git a/src/i18n/en.json b/src/i18n/en.json index c501c6a79b00f370c0c21164be05d2b5920b2c3d..baf3b28a4c25953a9d26d28e8e2fdf79c71d7bf7 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -20,7 +20,9 @@ "submit": "Submit", "more": "More", "generic_error": "An error occured", - "optional": "optional" + "optional": "optional", + "show_more": "Show more", + "show_less": "Show less" }, "image_cropper": { "crop_picture": "Crop picture",