Added quote message for chat rooms

This commit is contained in:
defnax 2026-07-25 22:52:54 +02:00
parent 6202ff7077
commit 97c05df59a
4 changed files with 34 additions and 9 deletions

View File

@ -1511,6 +1511,25 @@ const Layout = {
m('i.fas.fa-quote-right', { style: 'color: #3b82f6;' }),
'Quote Message'
]),
ChatHubState.messageContextMenu.gxsId &&
ChatHubState.messageContextMenu.gxsId !== '00000000000000000000000000000000' &&
m('.context-menu-item', {
style: 'padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; transition: background 0.15s ease;',
onmouseenter: (e) => (e.currentTarget.style.background = '#f1f5f9'),
onmouseleave: (e) => (e.currentTarget.style.background = 'transparent'),
onclick: () => {
const { gxsId } = ChatHubState.messageContextMenu;
const peopleState = require('people/people_state');
peopleState.State.selectedId = gxsId;
peopleState.State.activeFilter = 'all';
peopleState.fetchIdDetails(gxsId);
ChatHubState.messageContextMenu.show = false;
m.route.set('/people/All');
},
}, [
m('i.fas.fa-user-circle', { style: 'color: #0ea5e9;' }),
'Show Author in People'
]),
m('.context-menu-item', {
style: 'padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; transition: background 0.15s ease;',
onmouseenter: (e) => (e.currentTarget.style.background = '#f1f5f9'),
@ -1522,7 +1541,7 @@ const Layout = {
m.redraw();
},
}, [
m('i.far.fa-copy', { style: 'color: #64748b;' }),
m('i.fas.fa-copy', { style: 'color: #64748b;' }),
'Copy Text'
]),
])

View File

@ -443,6 +443,7 @@ const Message = () => {
y: e.clientY,
messageText: targetText,
username: username,
gxsId: gxsId,
};
m.redraw();
};
@ -885,6 +886,7 @@ const ChatHubState = {
y: 0,
messageText: '',
username: '',
gxsId: '',
},
};

View File

@ -1027,25 +1027,27 @@ textarea.chatMsg {
}
.chat-hub-input-area {
padding: 1rem 1.5rem;
padding: 0.75rem 1.5rem;
background-color: #ffffff;
border-top: 1px solid #cbd5e1;
display: flex;
gap: 0.75rem;
align-items: center;
align-items: flex-end;
flex-shrink: 0;
}
.chat-hub-input-area textarea.chat-hub-textarea {
flex: 1;
resize: none;
resize: vertical;
min-height: 40px;
max-height: 250px;
height: 40px;
padding: 0.5rem 0.75rem;
border: 1px solid #cbd5e1;
border-radius: 0.375rem;
font-size: 0.9rem;
outline: none;
transition: all 0.2s;
transition: border-color 0.2s, box-shadow 0.2s;
background-color: #f8fafc;
}

View File

@ -1603,25 +1603,27 @@ h1{font-size:3rem}h2{font-size:2.25rem}h3{font-size:1.875rem}h4{font-size:1.5rem
}
.chat-hub-input-area {
padding: 1rem 1.5rem;
padding: 0.75rem 1.5rem;
background-color: #ffffff;
border-top: 1px solid #cbd5e1;
display: flex;
gap: 0.75rem;
align-items: center;
align-items: flex-end;
flex-shrink: 0;
}
.chat-hub-input-area textarea.chat-hub-textarea {
flex: 1;
resize: none;
resize: vertical;
min-height: 40px;
max-height: 250px;
height: 40px;
padding: 0.5rem 0.75rem;
border: 1px solid #cbd5e1;
border-radius: 0.375rem;
font-size: 0.9rem;
outline: none;
transition: all 0.2s;
transition: border-color 0.2s, box-shadow 0.2s;
background-color: #f8fafc;
}