From 568cd7d1942e28c00a0ae60b87d262e6f7a727e7 Mon Sep 17 00:00:00 2001 From: RugerMc <550279039@qq.com> Date: Sat, 1 Apr 2023 20:41:37 +0800 Subject: [PATCH] opt: adjust position of edit text --- app/components/home.module.scss | 21 ++++++++++++++------- app/components/home.tsx | 20 ++++++++++---------- app/locales/cn.ts | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/app/components/home.module.scss b/app/components/home.module.scss index 15a2af240..1994d800b 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -252,9 +252,12 @@ right: 10px; pointer-events: all; } - .chat-message-top-left-actions { + } + + &:hover { + .chat-message-bottom-actions { opacity: 1; - left:10px; + right: 10px; pointer-events: all; } } @@ -289,7 +292,6 @@ .chat-message-item { box-sizing: border-box; max-width: 100%; - min-width: 70px; margin-top: 10px; border-radius: 10px; background-color: rgba(0, 0, 0, 0.05); @@ -330,10 +332,8 @@ } } -.chat-message-top-left-actions { +.chat-message-bottom-actions { font-size: 12px; - position: absolute; - top: -26px; transition: all ease 0.3s; opacity: 0; pointer-events: none; @@ -341,7 +341,7 @@ display: flex; flex-direction: row-reverse; - .chat-message-top-left-action { + .chat-message-bottom-action { opacity: 0.5; color: var(--black); white-space: nowrap; @@ -374,6 +374,13 @@ color: #aaa; } +.chat-message-action-edit { + opacity: 0.5; + color: var(--black); + white-space: nowrap; + cursor: pointer; +} + .chat-message-action-edit-button { width: 24px; height: 15px; diff --git a/app/components/home.tsx b/app/components/home.tsx index 6044fba99..c936b71ee 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -467,16 +467,6 @@ export function Chat(props: { )} - {isUser && !message.preview && !message.isEditing && ( -