chat drin
This commit is contained in:
1 parent
ef238f3b9c
commit
988a5410f7
12 files changed
+1115
-4
No files matched your search
@@ -0,0 +1,317 @@
|
||||
/* ── Chat plugin styles ── */
|
||||
|
||||
#chat-flyout {
|
||||
position: fixed;
|
||||
bottom: 48px;
|
||||
right: 16px;
|
||||
width: 340px;
|
||||
height: 460px;
|
||||
max-height: calc(100vh - 100px);
|
||||
background: var(--t-surface);
|
||||
border: 1px solid var(--t-border);
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#chat-flyout.hidden { display: none; }
|
||||
|
||||
#chat-flyout-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--t-border);
|
||||
background: var(--t-bg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.chat-view.hidden { display: none; }
|
||||
|
||||
/* ── Conversation list ── */
|
||||
|
||||
.chat-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chat-list-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--t-border);
|
||||
cursor: pointer;
|
||||
transition: background 0.1s;
|
||||
}
|
||||
|
||||
.chat-list-row:hover {
|
||||
background: var(--t-raised);
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-avatar {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
background: var(--t-raised);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--t-accent);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-peer {
|
||||
font-family: var(--t-font-pixel);
|
||||
font-size: 10px;
|
||||
color: var(--t-bright);
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-time {
|
||||
font-size: 9px;
|
||||
color: var(--t-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-preview {
|
||||
font-size: 10px;
|
||||
color: var(--t-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.chat-list-row .chat-list-preview.outgoing::before {
|
||||
content: "› ";
|
||||
color: var(--t-dim);
|
||||
}
|
||||
|
||||
.chat-list-row .chat-unread-badge {
|
||||
background: var(--t-accent);
|
||||
color: var(--t-bg);
|
||||
font-family: var(--t-font-pixel);
|
||||
font-size: 9px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-empty {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
/* ── Thread view ── */
|
||||
|
||||
#chat-thread-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--t-border);
|
||||
background: var(--t-bg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-thread-messages {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chat-bubble {
|
||||
max-width: 80%;
|
||||
padding: 6px 10px;
|
||||
font-size: 11px;
|
||||
font-family: var(--t-font-mono, monospace);
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.4;
|
||||
border: 1px solid var(--t-border);
|
||||
}
|
||||
|
||||
.chat-bubble.in {
|
||||
align-self: flex-start;
|
||||
background: var(--t-raised);
|
||||
color: var(--t-bright);
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.chat-bubble.out {
|
||||
align-self: flex-end;
|
||||
background: var(--t-accent);
|
||||
color: var(--t-bg);
|
||||
border-color: var(--t-accent);
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.chat-bubble-time {
|
||||
font-size: 8px;
|
||||
color: var(--t-dim);
|
||||
margin-top: 2px;
|
||||
font-family: var(--t-font-pixel);
|
||||
}
|
||||
|
||||
.chat-bubble.out + .chat-bubble-time { align-self: flex-end; }
|
||||
.chat-bubble.in + .chat-bubble-time { align-self: flex-start; }
|
||||
|
||||
#chat-thread-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 10px;
|
||||
border-top: 1px solid var(--t-border);
|
||||
background: var(--t-bg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#chat-thread-input {
|
||||
flex: 1;
|
||||
background: var(--t-surface);
|
||||
border: 1px solid var(--t-border);
|
||||
color: var(--t-bright);
|
||||
padding: 6px 10px;
|
||||
font-size: 11px;
|
||||
font-family: var(--t-font-mono, monospace);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#chat-thread-input:focus {
|
||||
border-color: var(--t-accent);
|
||||
}
|
||||
|
||||
#chat-thread-send {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
|
||||
#chat-thread-send:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* ── Pick recipient view ── */
|
||||
|
||||
#chat-pick-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--t-border);
|
||||
background: var(--t-bg);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-pick-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chat-pick-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--t-border);
|
||||
cursor: pointer;
|
||||
font-family: var(--t-font-pixel);
|
||||
font-size: 10px;
|
||||
color: var(--t-bright);
|
||||
transition: background 0.1s;
|
||||
}
|
||||
|
||||
.chat-pick-row:hover {
|
||||
background: var(--t-raised);
|
||||
color: var(--t-accent);
|
||||
}
|
||||
|
||||
/* ── Footer button ── */
|
||||
|
||||
#chat-footer-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 10px;
|
||||
font-size: 12px;
|
||||
border: 1px solid var(--t-border);
|
||||
color: var(--t-muted);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#chat-footer-btn:hover {
|
||||
border-color: var(--t-accent);
|
||||
color: var(--t-accent);
|
||||
}
|
||||
|
||||
#chat-footer-btn .chat-footer-label {
|
||||
font-family: var(--t-font-pixel);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#chat-footer-btn.has-unread {
|
||||
border-color: var(--t-accent);
|
||||
color: var(--t-accent);
|
||||
}
|
||||
|
||||
#chat-footer-btn .chat-unread-dot {
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
right: -3px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--t-accent);
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat-footer-btn.has-unread .chat-unread-dot {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes chatBlink {
|
||||
0%, 100% {
|
||||
border-color: var(--t-accent);
|
||||
color: var(--t-accent);
|
||||
box-shadow: 0 0 0 0 var(--t-accent);
|
||||
}
|
||||
50% {
|
||||
border-color: var(--t-accent);
|
||||
color: var(--t-bright);
|
||||
box-shadow: 0 0 8px 1px var(--t-accent);
|
||||
}
|
||||
}
|
||||
|
||||
#chat-footer-btn.blinking {
|
||||
animation: chatBlink 1.2s ease-in-out infinite;
|
||||
}
|
||||
Reference in new issue
Block a user