From 5eb944ecdeb0d65ec82b89522dfdf37d980bdb51 Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Fri, 22 Dec 2023 20:41:42 +0900 Subject: enhance: チャンネルに新規の投稿がある場合にバッジを表示させる (#12690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 多分できたかも * 不要なpropsを削除 * 不要なimportを削除 * 縁を付けた * 枠線の位置を端に寄せた * やっぱり内側へ寄せることにした * できたかも * 修正 * 修正 * クラスにまとめた * 微調整 * 直せたかも * importを付け足し * 多分できたかも * Update channel.vue * Update MkMenu.vue * Update channel.vue * Update CHANGELOG.md --------- Co-authored-by: syuilo --- packages/frontend/src/components/MkMenu.vue | 64 ++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 19 deletions(-) (limited to 'packages/frontend/src/components/MkMenu.vue') diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 8e4b86f1c7..0a97cf3dba 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -228,6 +240,7 @@ onBeforeUnmount(() => { .root { padding: 8px 0; box-sizing: border-box; + max-width: 100vw; min-width: 200px; overflow: auto; overscroll-behavior: contain; @@ -267,7 +280,8 @@ onBeforeUnmount(() => { } .item { - display: block; + display: flex; + align-items: center; position: relative; padding: 5px 16px; width: 100%; @@ -340,10 +354,6 @@ onBeforeUnmount(() => { pointer-events: none; font-size: 0.7em; padding-bottom: 4px; - - > span { - opacity: 0.7; - } } &.pending { @@ -373,6 +383,22 @@ onBeforeUnmount(() => { } } +.item_content { + width: 100%; + max-width: 100vw; + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + text-overflow: ellipsis; +} + +.item_content_text { + max-width: calc(100vw - 4rem); + text-overflow: ellipsis; + overflow: hidden; +} + .switch { position: relative; display: flex; @@ -406,6 +432,7 @@ onBeforeUnmount(() => { .icon { margin-right: 8px; + line-height: 1; } .caret { @@ -419,9 +446,8 @@ onBeforeUnmount(() => { } .indicator { - position: absolute; - top: 5px; - left: 13px; + display: flex; + align-items: center; color: var(--indicator); font-size: 12px; animation: blink 1s infinite; -- cgit v1.2.3-freya