From 2c6ec37e6a796d2d7be7be58ac0e3c6c8bbd6a18 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 18 Feb 2019 05:03:26 +0000 Subject: media description support --- src/components/still-image/still-image.vue | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index f2ddeb7b..9130ec98 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -10,6 +10,8 @@ Date: Sun, 28 Jun 2020 02:31:57 -0400 Subject: fix vue style warnings --- src/components/post_status_form/post_status_form.vue | 6 +++++- src/components/still-image/still-image.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 6eefc853..49291455 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -266,7 +266,11 @@ :href="file.url" >{{ file.url }} - +
Date: Tue, 28 Jul 2020 01:54:40 +0300 Subject: neater way to do hover thing with still image --- src/components/status/status.scss | 13 ++------- src/components/still-image/still-image.vue | 47 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 33 deletions(-) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/status/status.scss b/src/components/status/status.scss index 85e433c4..8797211e 100644 --- a/src/components/status/status.scss +++ b/src/components/status/status.scss @@ -10,16 +10,9 @@ $status-margin: 0.75em; border-left: 4px $fallback--cRed; border-left: 4px var(--cRed, $fallback--cRed); - // TODO find a way to do this in a cleaner way without JS - // stylelint-disable rscss/class-format - &:hover .avatar.animated { - canvas { - display: none; - } - - img { - visibility: visible; - } + &:hover .avatar { + --still-image-img: visible; + --still-image-canvas: hidden; } &.-focused { diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index 2ebf33ba..6fa055de 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -35,8 +35,16 @@ display: flex; align-items: center; - &:hover canvas { - display: none; + canvas { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; + height: 100%; + object-fit: contain; + visibility: var(--still-image-canvas, visible); } img { @@ -46,15 +54,6 @@ } &.animated { - &:hover::before, - img { - visibility: hidden; - } - - &:hover img { - visibility: visible - } - &::before { content: 'gif'; position: absolute; @@ -62,25 +61,27 @@ font-size: 10px; top: 5px; left: 5px; - background: rgba(127,127,127,.5); - color: #FFF; + background: rgba(127, 127, 127, 0.5); + color: #fff; display: block; padding: 2px 4px; border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); z-index: 2; } - } - canvas { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - width: 100%; - height: 100%; - object-fit: contain; + &:hover canvas { + display: none; + } + + &:hover::before, + img { + visibility: var(--still-image-img, hidden); + } + + &:hover img { + visibility: visible; + } } } -- cgit v1.2.3-70-g09d2 From 815f230ac7ace5a1507afae91bafa57589a77522 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 18 Aug 2020 23:57:42 +0300 Subject: fixed some issues related to user avatar --- src/components/attachment/attachment.vue | 8 ++++++-- src/components/chat_list_item/chat_list_item.scss | 2 +- src/components/chat_title/chat_title.vue | 2 +- src/components/status/status.scss | 2 +- src/components/still-image/still-image.vue | 3 +-- src/components/user_avatar/user_avatar.vue | 6 ++++-- src/components/user_card/user_card.vue | 10 +++------- 7 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index be7377e9..63e0ceba 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -60,6 +60,7 @@ @click="openModal" > @import '../../_variables.scss'; -.avatar.still-image { +.Avatar { + --still-image-label-visibility: hidden; + width: 48px; height: 48px; box-shadow: var(--avatarStatusShadow); diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 75db5db1..07fce79a 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -364,13 +364,9 @@ } } - &:hover .animated.avatar { - canvas { - display: none; - } - img { - visibility: visible; - } + &:hover .avatar { + --still-image-img: visible; + --still-image-canvas: hidden; } &-avatar-link { -- cgit v1.2.3-70-g09d2