aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/notification/notification.js9
-rw-r--r--src/components/notification/notification.vue4
-rw-r--r--src/components/status/status.js6
-rw-r--r--src/components/status/status.vue14
-rw-r--r--src/components/user_profile/user_profile.js3
-rw-r--r--src/i18n/en.json4
6 files changed, 27 insertions, 13 deletions
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index fe5b7018..42a48f3f 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -31,6 +31,15 @@ const Notification = {
const highlight = this.$store.state.config.highlight
const user = this.notification.action.user
return highlightStyle(highlight[user.screen_name])
+ },
+ userInStore () {
+ return this.$store.getters.findUser(this.notification.action.user.id)
+ },
+ user () {
+ if (this.userInStore) {
+ return this.userInStore
+ }
+ return {}
}
}
}
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 5e9cef97..8f532747 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -1,11 +1,11 @@
<template>
<status v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
- <div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
+ <div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]" v-else>
<a class='avatar-container' :href="notification.action.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/>
</a>
<div class='notification-right'>
- <UserCard :user="notification.action.user" :rounded="true" :bordered="true" v-if="userExpanded"/>
+ <UserCard :user="user" :rounded="true" :bordered="true" v-if="userExpanded"/>
<span class="notification-details">
<div class="name-and-action">
<span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span>
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 550fe76f..0295cd04 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 1f415534..690e8318 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/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 82df4510..1df06fe6 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -72,9 +72,6 @@ const UserProfile = {
return this.$store.getters.findUser(this.fetchedUserId || routeParams.name || routeParams.id)
},
user () {
- if (this.timeline.statuses[0]) {
- return this.timeline.statuses[0].user
- }
if (this.userInStore) {
return this.userInStore
}
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 2c060998..026546cc 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",