From f591fa14ed2a96858ed3fbe4986a00c41d1c1c3f Mon Sep 17 00:00:00 2001 From: freeplay Date: Thu, 13 Jul 2023 19:26:44 -0400 Subject: [PATCH 1/4] style: user card design --- packages/client/src/components/MkUserInfo.vue | 320 +++++++++++++----- 1 file changed, 244 insertions(+), 76 deletions(-) diff --git a/packages/client/src/components/MkUserInfo.vue b/packages/client/src/components/MkUserInfo.vue index 9c2763e53..9ff5f8b6c 100644 --- a/packages/client/src/components/MkUserInfo.vue +++ b/packages/client/src/components/MkUserInfo.vue @@ -1,151 +1,319 @@ From 55d150f9b1f59475561cc4fde81922b732955fd1 Mon Sep 17 00:00:00 2001 From: freeplay Date: Thu, 13 Jul 2023 19:27:00 -0400 Subject: [PATCH 2/4] refactor: use new card design in user popup --- .../client/src/components/MkUserPreview.vue | 303 +----------------- 1 file changed, 2 insertions(+), 301 deletions(-) diff --git a/packages/client/src/components/MkUserPreview.vue b/packages/client/src/components/MkUserPreview.vue index 6c3838fd2..60a91c11b 100644 --- a/packages/client/src/components/MkUserPreview.vue +++ b/packages/client/src/components/MkUserPreview.vue @@ -19,96 +19,7 @@ } " > -
- - -
- -

-
-
- -
- -
-
-
- -
-
- -
-
-
-
-
-

{{ i18n.ts.notes }}

- {{ user.notesCount }} -
-
-

{{ i18n.ts.following }}

- {{ user.followingCount }} -
-
-

{{ i18n.ts.followers }}

- {{ user.followersCount }} -
-
- -
+
@@ -118,14 +29,10 @@ @@ -148,7 +139,6 @@ let collapsed = $ref(isLong); } } - .title { position: relative; display: block; @@ -159,7 +149,7 @@ let collapsed = $ref(isLong); background: var(--panel); line-height: 1; z-index: 4; - + .avatar { display: block; position: absolute; @@ -210,12 +200,10 @@ let collapsed = $ref(isLong); position: relative; max-height: calc(9em + 50px); mask: linear-gradient(black calc(100% - 64px), transparent); - -webkit-mask: linear-gradient( - black calc(100% - 64px), - transparent - ); + -webkit-mask: linear-gradient(black calc(100% - 64px), transparent); } - &.collapsed, &.truncate { + &.collapsed, + &.truncate { :deep(br) { display: none; // collapse white spaces } diff --git a/packages/client/src/components/MkUserPreview.vue b/packages/client/src/components/MkUserPreview.vue index 60a91c11b..894e3dfb8 100644 --- a/packages/client/src/components/MkUserPreview.vue +++ b/packages/client/src/components/MkUserPreview.vue @@ -93,6 +93,5 @@ onMounted(() => { width: 300px; overflow: hidden; transform-origin: center top; - } From 46c436bbb150a84494ceadf280d57b21cae9ceff Mon Sep 17 00:00:00 2001 From: freeplay Date: Thu, 13 Jul 2023 19:32:35 -0400 Subject: [PATCH 4/4] fix: collapsing white space --- packages/client/src/components/MkUserInfo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/MkUserInfo.vue b/packages/client/src/components/MkUserInfo.vue index ad3602330..55979a229 100644 --- a/packages/client/src/components/MkUserInfo.vue +++ b/packages/client/src/components/MkUserInfo.vue @@ -205,7 +205,7 @@ let collapsed = $ref(isLong); &.collapsed, &.truncate { :deep(br) { - display: none; // collapse white spaces + display: block; // collapse white spaces } } }