mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
fix(ui): unify flat emoji picker styling
- Unify Mail composer emoji picker with standard flat design - Remove duplicate SCSS blocks and prevent button shadow bleeding
This commit is contained in:
parent
0af8d7e7f6
commit
20e2180cdf
@ -732,40 +732,34 @@ const Layout = () => {
|
||||
]),
|
||||
|
||||
// Floating Emoji Picker Popover
|
||||
showEmojiPicker && m('.mail-emoji-picker-popover', {
|
||||
style: 'position: absolute; bottom: 50px; left: 130px; background: #ffffff; border: 1px solid #cbd5e1; border-radius: 0.5rem; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.1); width: 320px; max-height: 340px; z-index: 2000; display: flex; flex-direction: column; overflow: hidden;',
|
||||
showEmojiPicker && m('.emoji-picker', {
|
||||
style: 'position: absolute; bottom: 50px; left: 130px; z-index: 2000;',
|
||||
onclick: (e) => e.stopPropagation(),
|
||||
}, [
|
||||
m('.emoji-search-bar', { style: 'padding: 0.5rem; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 0.5rem;' }, [
|
||||
m('i.fas.fa-search', { style: 'color: #94a3b8; font-size: 0.85rem;' }),
|
||||
m('input[type=text][placeholder=Search emoji...]', {
|
||||
style: 'border: none; outline: none; width: 100%; font-size: 0.85rem;',
|
||||
m('.emoji-search-row', [
|
||||
m('i.fas.fa-search.emoji-search-icon'),
|
||||
m('input.emoji-search-input[type=text][placeholder=Search emoji...]', {
|
||||
value: emojiSearch,
|
||||
oninput: (e) => (emojiSearch = e.target.value),
|
||||
}),
|
||||
emojiSearch && m('i.fas.fa-times', {
|
||||
style: 'cursor: pointer; color: #94a3b8; font-size: 0.85rem;',
|
||||
emojiSearch && m('button.emoji-search-clear[type=button]', {
|
||||
onclick: () => (emojiSearch = ''),
|
||||
}),
|
||||
}, m('i.fas.fa-times')),
|
||||
]),
|
||||
!emojiSearch && m('.emoji-cat-bar', { style: 'display: flex; background: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 0.25rem; overflow-x: auto;' },
|
||||
!emojiSearch && m('.emoji-categories',
|
||||
chatEmoji.EMOJI_CATEGORIES.map((c) =>
|
||||
m('button', {
|
||||
style: `border: none; background: ${c === emojiCategory ? '#ffffff' : 'transparent'}; border-radius: 0.25rem; padding: 0.3rem 0.4rem; cursor: pointer; font-size: 1rem; box-shadow: ${c === emojiCategory ? '0 1px 2px rgba(0,0,0,0.1)' : 'none'};`,
|
||||
m('button.emoji-cat-btn[type=button]' + (c === emojiCategory ? '.active' : ''), {
|
||||
title: c,
|
||||
onclick: () => (emojiCategory = c),
|
||||
}, chatEmoji.EMOJI_ICONS[c])
|
||||
)
|
||||
),
|
||||
m('.emoji-grid-body', { style: 'padding: 0.5rem; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; max-height: 230px; overflow-y: auto;' },
|
||||
m('.emoji-grid',
|
||||
(emojiSearch
|
||||
? Object.values(chatEmoji.EMOJI_DATA).flat().filter((e) => e.includes(emojiSearch))
|
||||
: (chatEmoji.EMOJI_DATA[emojiCategory] || [])
|
||||
).map((e) =>
|
||||
m('button', {
|
||||
style: 'border: none; background: transparent; font-size: 1.25rem; cursor: pointer; padding: 0.25rem; border-radius: 0.25rem; transition: background 0.15s ease;',
|
||||
onmouseenter: (ev) => (ev.currentTarget.style.background = '#f1f5f9'),
|
||||
onmouseleave: (ev) => (ev.currentTarget.style.background = 'transparent'),
|
||||
m('button.emoji-btn[type=button]', {
|
||||
onclick: () => {
|
||||
insertEmoji(e);
|
||||
showEmojiPicker = false;
|
||||
@ -773,7 +767,7 @@ const Layout = () => {
|
||||
}, e)
|
||||
)
|
||||
),
|
||||
])
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
||||
@ -1828,162 +1828,6 @@ label.mobile-chat-attachment__option:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.emoji-picker-wrapper {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-picker {
|
||||
position: absolute;
|
||||
bottom: calc(100% + 0.5rem);
|
||||
left: 0;
|
||||
width: 320px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 0.625rem;
|
||||
box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
|
||||
z-index: 3000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
animation: emoji-pop 0.15s ease-out;
|
||||
}
|
||||
|
||||
.emoji-search-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.6rem 0.75rem 0.4rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.emoji-search-icon {
|
||||
color: #94a3b8;
|
||||
font-size: 0.8rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.emoji-search-input {
|
||||
flex: 1;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.3rem 0.5rem;
|
||||
font-size: 0.85rem;
|
||||
outline: none;
|
||||
background-color: #f8fafc;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.emoji-search-input:focus {
|
||||
border-color: #3ba4d7;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.emoji-search-clear {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
padding: 0.2rem;
|
||||
font-size: 0.8rem;
|
||||
box-shadow: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-search-clear:hover {
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
.emoji-categories {
|
||||
display: flex;
|
||||
gap: 0.1rem;
|
||||
padding: 0.35rem 0.5rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.emoji-categories::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.emoji-cat-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 1.2rem;
|
||||
padding: 0.3rem 0.35rem;
|
||||
border-radius: 0.375rem;
|
||||
line-height: 1;
|
||||
box-shadow: none;
|
||||
transition: background-color 0.1s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.emoji-cat-btn:hover {
|
||||
background-color: #f1f5f9;
|
||||
}
|
||||
|
||||
.emoji-cat-btn.active {
|
||||
background-color: #e0f2fe;
|
||||
box-shadow: inset 0 -2px 0 #3ba4d7;
|
||||
}
|
||||
|
||||
.emoji-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 0;
|
||||
padding: 0.4rem 0.35rem;
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #cbd5e1 transparent;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar-thumb {
|
||||
background-color: #cbd5e1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.emoji-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 1.7rem;
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.3rem;
|
||||
line-height: 1;
|
||||
box-shadow: none;
|
||||
text-align: center;
|
||||
transition: background-color 0.1s, transform 0.1s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.emoji-btn:hover {
|
||||
background-color: #f1f5f9;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
@keyframes emoji-pop {
|
||||
from { opacity: 0; transform: scale(0.92) translateY(6px); }
|
||||
to { opacity: 1; transform: scale(1) translateY(0); }
|
||||
|
||||
}
|
||||
|
||||
.chat-hub-messages.compact-container .message.compact,
|
||||
.messages.compact-container .message.compact {
|
||||
display: block !important;
|
||||
@ -2167,141 +2011,166 @@ label.mobile-chat-attachment__option:hover {
|
||||
/* Emoji Picker Dropdown & Grid Styling */
|
||||
.emoji-picker-wrapper {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-picker {
|
||||
position: absolute;
|
||||
bottom: 48px;
|
||||
bottom: calc(100% + 0.5rem);
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
width: 320px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
||||
padding: 0.75rem;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 0.625rem;
|
||||
box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
font-family: inherit;
|
||||
|
||||
.emoji-search-row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.emoji-search-icon {
|
||||
position: absolute;
|
||||
left: 0.6rem;
|
||||
color: #94a3b8;
|
||||
font-size: 0.85rem;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
input.emoji-search-input {
|
||||
width: 100%;
|
||||
padding: 0.4rem 1.8rem 0.4rem 1.8rem;
|
||||
font-size: 0.85rem;
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
background-color: #f8fafc;
|
||||
transition: border-color 0.15s ease;
|
||||
|
||||
&:focus {
|
||||
border-color: #3b82f6;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-search-clear {
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
padding: 0.2rem;
|
||||
font-size: 0.85rem;
|
||||
|
||||
&:hover {
|
||||
color: #ef4444;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-categories {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 0.4rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
margin-bottom: 0.25rem;
|
||||
|
||||
.emoji-cat-btn {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
font-size: 1.1rem !important;
|
||||
padding: 0.25rem 0.35rem !important;
|
||||
border-radius: 6px !important;
|
||||
cursor: pointer !important;
|
||||
transition: background-color 0.15s ease, transform 0.1s ease !important;
|
||||
line-height: 1 !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
min-width: unset !important;
|
||||
|
||||
&:hover {
|
||||
background-color: #f1f5f9 !important;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #e0f2fe !important;
|
||||
border-radius: 6px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(8, 1fr) !important;
|
||||
gap: 2px !important;
|
||||
max-height: 220px !important;
|
||||
overflow-y: auto !important;
|
||||
padding-right: 2px !important;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #cbd5e1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.emoji-btn {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
font-size: 1.25rem !important;
|
||||
padding: 0.35rem 0 !important;
|
||||
cursor: pointer !important;
|
||||
border-radius: 6px !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
min-width: unset !important;
|
||||
transition: background-color 0.1s ease, transform 0.1s ease !important;
|
||||
|
||||
&:hover {
|
||||
background-color: #e2e8f0 !important;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
}
|
||||
}
|
||||
overflow: hidden;
|
||||
animation: emoji-pop 0.15s ease-out;
|
||||
}
|
||||
|
||||
.emoji-search-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.6rem 0.75rem 0.4rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.emoji-search-icon {
|
||||
color: #94a3b8;
|
||||
font-size: 0.8rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.emoji-search-input {
|
||||
flex: 1;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.3rem 0.5rem;
|
||||
font-size: 0.85rem;
|
||||
outline: none;
|
||||
background-color: #f8fafc;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.emoji-search-input:focus {
|
||||
border-color: #3ba4d7;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.emoji-search-clear {
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
cursor: pointer;
|
||||
color: #94a3b8;
|
||||
padding: 0.2rem;
|
||||
font-size: 0.8rem;
|
||||
box-shadow: none !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-search-clear:hover {
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
.emoji-categories {
|
||||
display: flex;
|
||||
gap: 0.1rem;
|
||||
padding: 0.35rem 0.5rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.emoji-categories::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.emoji-cat-btn {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
cursor: pointer;
|
||||
font-size: 1.15rem !important;
|
||||
padding: 0.25rem 0.35rem !important;
|
||||
border-radius: 6px !important;
|
||||
line-height: 1 !important;
|
||||
box-shadow: none !important;
|
||||
transition: background-color 0.15s ease, transform 0.1s ease !important;
|
||||
flex-shrink: 0;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
min-width: unset !important;
|
||||
}
|
||||
|
||||
.emoji-cat-btn:hover {
|
||||
background-color: #f1f5f9 !important;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.emoji-cat-btn.active {
|
||||
background-color: #e0f2fe !important;
|
||||
border-radius: 6px !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.emoji-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(8, 1fr) !important;
|
||||
gap: 2px !important;
|
||||
padding: 0.4rem 0.35rem !important;
|
||||
max-height: 220px !important;
|
||||
overflow-y: auto !important;
|
||||
overflow-x: hidden !important;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #cbd5e1 transparent;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.emoji-grid::-webkit-scrollbar-thumb {
|
||||
background-color: #cbd5e1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.emoji-btn {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
cursor: pointer;
|
||||
font-size: 1.25rem !important;
|
||||
padding: 0.35rem 0 !important;
|
||||
border-radius: 6px !important;
|
||||
line-height: 1 !important;
|
||||
box-shadow: none !important;
|
||||
text-align: center;
|
||||
transition: background-color 0.1s ease, transform 0.1s ease !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
min-width: unset !important;
|
||||
}
|
||||
|
||||
.emoji-btn:hover {
|
||||
background-color: #e2e8f0 !important;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
@keyframes emoji-pop {
|
||||
from { opacity: 0; transform: scale(0.92) translateY(6px); }
|
||||
to { opacity: 1; transform: scale(1) translateY(0); }
|
||||
}
|
||||
/* Rightbar / Chat Message Context Menus */
|
||||
.rightbar-context-menu,
|
||||
.chat-msg-context-menu {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user