aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-04-08 04:23:43 +0300
committerHenry Jameson <me@hjkos.com>2018-04-08 04:23:43 +0300
commit38d366f9aaee189b6ad48edea189e1d8b7f66ed6 (patch)
treeaa82e8b947135222d4b0f42f1641c9dc7cafb27a
parent59a05081c5ab6250a51b58a44c6b11245c7c79c4 (diff)
some more improvements. changed the way user-card is layout, but should look the
same, except that longer user names should be properly ellipsis-ed.
-rw-r--r--src/components/notifications/notifications.scss4
-rw-r--r--src/components/user_card/user_card.vue3
-rw-r--r--src/components/user_card_content/user_card_content.vue38
3 files changed, 25 insertions, 20 deletions
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss
index e9a60a93..3b7403e4 100644
--- a/src/components/notifications/notifications.scss
+++ b/src/components/notifications/notifications.scss
@@ -64,6 +64,10 @@
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg, $fallback--bg) 80%)
}
+ time {
+ white-space: nowrap;
+ }
+
.text {
min-width: 0px;
word-wrap: break-word;
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 7381ef8f..51d6965f 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -7,7 +7,7 @@
<user-card-content :user="user" :switcher="false"></user-card-content>
</div>
<div class="name-and-screen-name" v-else>
- <div class="user-name">
+ <div :title="user.name" class="user-name">
{{ user.name }}
<span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
{{ $t('user_card.follows_you') }}
@@ -26,7 +26,6 @@
.name-and-screen-name {
margin-left: 0.7em;
margin-top:0.0em;
- margin-right: 2em;
text-align: left;
width: 100%;
}
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 46d1c8b5..68e2583f 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -9,9 +9,8 @@
<router-link :to="{ name: 'user-profile', params: { id: user.id } }">
<StillImage class="avatar" :src="user.profile_image_url_original"/>
</router-link>
- <span class="glyphicon glyphicon-user"></span>
<div class="name-and-screen-name">
- <div class='user-name'>{{user.name}}</div>
+ <div :title="user.name" class='user-name'>{{user.name}}</div>
<router-link :to="{ name: 'user-profile', params: { id: user.id } }">
<div class='user-screen-name'>@{{user.screen_name}}</div>
</router-link>
@@ -125,25 +124,21 @@
.container {
padding: 16px 10px 4px 10px;
display: flex;
- flex-wrap: wrap;
- flex-direction: column;
- align-content: flex-start;
- justify-content: center;
max-height: 56px;
overflow: hidden;
- }
- .avatar {
- border-radius: $fallback--avatarRadius;
- border-radius: var(--avatarRadius, $fallback--avatarRadius);
- flex: 1 0 100%;
- width: 56px;
- height: 56px;
- box-shadow: 0px 1px 8px rgba(0,0,0,0.75);
- object-fit: cover;
+ .avatar {
+ border-radius: $fallback--avatarRadius;
+ border-radius: var(--avatarRadius, $fallback--avatarRadius);
+ flex: 1 0 100%;
+ width: 56px;
+ height: 56px;
+ box-shadow: 0px 1px 8px rgba(0,0,0,0.75);
+ object-fit: cover;
- &.animated::before {
- display: none;
+ &.animated::before {
+ display: none;
+ }
}
}
@@ -158,16 +153,24 @@
text-shadow: 0px 1px 1.5px rgba(0, 0, 0, 1.0);
+ .usersettings {
+ color: #fff;
+ opacity: .8;
+ }
+
.name-and-screen-name {
display: block;
margin-left: 0.6em;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
+ flex: 1 1 0;
}
.user-name{
color: white;
+ text-overflow: ellipsis;
+ overflow: hidden;
}
.user-screen-name {
@@ -175,7 +178,6 @@
font-weight: lighter;
font-size: 15px;
padding-right: 0.1em;
- flex: 0 0 auto;
}
.user-interactions {