aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/notifications')
-rw-r--r--src/components/notifications/notifications.js4
-rw-r--r--src/components/notifications/notifications.scss62
-rw-r--r--src/components/notifications/notifications.vue34
3 files changed, 46 insertions, 54 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
index 390ade6a..c8d5e212 100644
--- a/src/components/notifications/notifications.js
+++ b/src/components/notifications/notifications.js
@@ -1,5 +1,4 @@
import { sortBy, take, filter } from 'lodash'
-import Status from '../status/status.vue'
const Notifications = {
data () {
@@ -7,9 +6,6 @@ const Notifications = {
visibleNotificationCount: 10
}
},
- components: {
- Status
- },
computed: {
notifications () {
return this.$store.state.statuses.notifications
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss
index 65efb103..517afeaa 100644
--- a/src/components/notifications/notifications.scss
+++ b/src/components/notifications/notifications.scss
@@ -1,44 +1,42 @@
@import '../../_variables.scss';
.notification {
+ padding: 0.4em 0 0 0.7em;
+ display: flex;
border-bottom: 1px solid silver;
- .notification-base {
- padding: 0.4em 0 0 0.7em;
- display: flex;
- .avatar {
- padding-top: 0.3em;
- width: 32px;
- height: 32px;
- border-radius: 50%;
- }
+ .text {
+ min-width: 0px;
+ word-wrap: break-word;
+ line-height:18px;
- .text {
- min-width: 0px;
- word-wrap: break-word;
- line-height:18px;
+ .icon-retweet {
+ color: $green;
+ }
- .icon-retweet {
- color: $green;
- }
+ .icon-reply {
+ color: $blue;
+ }
- .icon-reply {
- color: $blue;
- }
+ h1 {
+ margin: 0 0 0.3em;
+ padding: 0;
+ font-size: 1em;
+ line-height:20px;
+ }
- h1 {
- margin: 0 0 0.3em;
- padding: 0;
- font-size: 1em;
- line-height:20px;
- }
+ padding: 0.3em 0.8em 0.5em;
+ p {
+ margin: 0;
+ margin-top: 0;
+ margin-bottom: 0.3em;
+ }
+ }
- padding: 0.3em 0.8em 0.5em;
- p {
- margin: 0;
- margin-top: 0;
- margin-bottom: 0.3em;
- }
- }
+ .avatar {
+ padding-top: 0.3em;
+ width: 32px;
+ height: 32px;
+ border-radius: 50%;
}
&:last-child {
diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue
index c14abf27..785cc019 100644
--- a/src/components/notifications/notifications.vue
+++ b/src/components/notifications/notifications.vue
@@ -4,26 +4,24 @@
<div class="panel-heading base01-background base04">Notifications ({{unseenCount}}) <button @click.prevent="markAsSeen">Read!</button></div>
<div class="panel-body">
<div v-for="notification in visibleNotifications" class="notification" :class='{"base01-background": notification.seen}'>
- <div class="notification-base">
- <a :href="notification.action.user.statusnet_profile_url">
- <img class='avatar' :src="notification.action.user.profile_image_url_original">
- </a>
- <div class='text'>
- <timeago :since="notification.action.created_at" :auto-update="240"></timeago>
- <div v-if="notification.type === 'favorite'">
- <h1>{{ notification.action.user.name }}<br><i class="fa icon-star"></i> favorited your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
- <p>{{ notification.status.text }}</p>
- </div>
- <div v-if="notification.type === 'repeat'">
- <h1>{{ notification.action.user.name }}<br><i class="fa icon-retweet"></i> repeated your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
- <p>{{ notification.status.text }}</p>
- </div>
- <div v-if="notification.type === 'mention'">
- <h1>{{ notification.action.user.name }}<br><i class="fa icon-reply"></i> <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">mentioned</router-link> you</h1>
- </div>
+ <a :href="notification.action.user.statusnet_profile_url">
+ <img class='avatar' :src="notification.action.user.profile_image_url_original">
+ </a>
+ <div class='text'>
+ <timeago :since="notification.action.created_at" :auto-update="240"></timeago>
+ <div v-if="notification.type === 'favorite'">
+ <h1>{{ notification.action.user.name }}<br><i class="fa icon-star"></i> favorited your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
+ <p>{{ notification.status.text }}</p>
+ </div>
+ <div v-if="notification.type === 'repeat'">
+ <h1>{{ notification.action.user.name }}<br><i class="fa icon-retweet"></i> repeated your <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">status</h1>
+ <p>{{ notification.status.text }}</p>
+ </div>
+ <div v-if="notification.type === 'mention'">
+ <h1>{{ notification.action.user.name }}<br><i class="fa icon-reply"></i> <router-link :to="{ name: 'conversation', params: { id: notification.status.id } }">mentioned</router-link> you</h1>
+ <p>{{ notification.status.text }}</p>
</div>
</div>
- <status v-if="notification.type === 'mention'" :statusoid="notification.action" :expandable="false"></status>
</div>
</div>
</div>