init f0ckm
This commit is contained in:
463
public/s/css/dm.css
Normal file
463
public/s/css/dm.css
Normal file
@@ -0,0 +1,463 @@
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════
|
||||
PRIVATE MESSAGES / DM SYSTEM
|
||||
═══════════════════════════════════════════════════════════ */
|
||||
|
||||
/* Page layout */
|
||||
.messages-page {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: calc(100vh - 80px);
|
||||
}
|
||||
|
||||
.messages-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 18px;
|
||||
border-bottom: 1px solid var(--border, #333);
|
||||
padding-bottom: 12px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.messages-header h2 {
|
||||
margin: 0;
|
||||
font-size: 1.1em;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.dm-back-btn {
|
||||
color: var(--accent);
|
||||
font-size: 1.4em;
|
||||
text-decoration: none;
|
||||
line-height: 1;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.dm-back-btn:hover { background: var(--bg2, #222); }
|
||||
|
||||
.dm-convo-header-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dm-header-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.dm-header-username {
|
||||
font-weight: 600;
|
||||
font-size: 1em;
|
||||
text-decoration: none;
|
||||
color: var(--fg, #ddd);
|
||||
}
|
||||
|
||||
.dm-header-username:hover { text-decoration: underline; }
|
||||
|
||||
/* Key notice banner */
|
||||
.dm-key-notice {
|
||||
background: rgba(255, 200, 80, 0.15);
|
||||
border: 1px solid rgba(255, 200, 80, 0.4);
|
||||
color: #ffc850;
|
||||
padding: 10px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.88em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 14px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.dm-key-export-inline {
|
||||
background: rgba(255, 200, 80, 0.25);
|
||||
border: 1px solid rgba(255, 200, 80, 0.5);
|
||||
color: #ffc850;
|
||||
padding: 3px 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.dm-key-export-inline:hover { background: rgba(255, 200, 80, 0.4); }
|
||||
|
||||
/* Inbox list */
|
||||
.dm-inbox-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.dm-convo-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 8px;
|
||||
background: var(--bg2, #1a1a1a);
|
||||
border: 1px solid transparent;
|
||||
text-decoration: none;
|
||||
color: var(--fg, #ccc);
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dm-convo-card:hover {
|
||||
background: var(--bg3, #222);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.dm-convo-card.dm-convo-unread { border-color: var(--accent); }
|
||||
|
||||
.dm-convo-avatar {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 6px;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dm-convo-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.dm-convo-name {
|
||||
font-weight: 600;
|
||||
font-size: 0.95em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.dm-convo-time {
|
||||
font-size: 0.78em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.dm-convo-badge {
|
||||
background: var(--accent);
|
||||
color: var(--bg, #000);
|
||||
font-size: 0.72em;
|
||||
font-weight: 700;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 5px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Thread */
|
||||
.dm-thread {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 8px 0;
|
||||
min-height: 200px;
|
||||
max-height: calc(100vh - 280px);
|
||||
}
|
||||
|
||||
.dm-load-more {
|
||||
align-self: center;
|
||||
background: transparent;
|
||||
border: 1px solid #444;
|
||||
color: #888;
|
||||
padding: 6px 16px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.82em;
|
||||
margin-bottom: 8px;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
}
|
||||
|
||||
.dm-load-more:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Message bubbles */
|
||||
.dm-msg {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 75%;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.dm-msg-mine {
|
||||
align-self: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.dm-msg-theirs {
|
||||
align-self: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.dm-bubble {
|
||||
padding: 9px 13px;
|
||||
border-radius: 14px;
|
||||
font-size: 0.92em;
|
||||
line-height: 1.45;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.dm-msg-mine .dm-bubble {
|
||||
background: var(--accent);
|
||||
color: var(--bg, #000);
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.dm-msg-theirs .dm-bubble {
|
||||
background: var(--bg2, #222);
|
||||
color: var(--fg, #ddd);
|
||||
border: 1px solid #333;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.dm-msg-time {
|
||||
font-size: 0.72em;
|
||||
color: #555;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.dm-unreadable {
|
||||
font-style: italic;
|
||||
opacity: 0.5;
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
/* Send form: column layout matching comment form */
|
||||
.dm-send-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #333;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dm-input {
|
||||
width: 100%;
|
||||
background: var(--bg2, #1a1a1a);
|
||||
border: 1px solid #444;
|
||||
color: var(--fg, #ddd);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
font-size: 0.92em;
|
||||
resize: none;
|
||||
min-height: 44px;
|
||||
max-height: 140px;
|
||||
font-family: inherit;
|
||||
transition: border-color 0.15s;
|
||||
line-height: 1.4;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dm-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* Actions bar: ☺ emoji trigger on left, Send on right */
|
||||
.dm-send-form .input-actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.dm-send-btn {
|
||||
background: var(--accent);
|
||||
color: var(--bg, #000);
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 6px 18px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
font-size: 0.9em;
|
||||
margin-left: auto;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.dm-send-btn:hover { opacity: 0.85; }
|
||||
.dm-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
|
||||
/* Emojis rendered inside DM bubbles */
|
||||
.dm-bubble img.emoji {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
vertical-align: middle;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* State messages */
|
||||
.dm-loading, .dm-empty, .dm-error {
|
||||
color: #666;
|
||||
font-size: 0.9em;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.dm-error { color: #e06c6c; }
|
||||
|
||||
/* Key Manager Modal */
|
||||
.dm-modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
z-index: 15000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.dm-modal {
|
||||
background: var(--bg, #111);
|
||||
border: 1px solid var(--accent);
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
padding: 28px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dm-modal h2 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 1.1em;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.dm-modal-sub {
|
||||
font-size: 0.85em;
|
||||
color: #888;
|
||||
margin: 0 0 18px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.dm-modal-close {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 16px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #888;
|
||||
font-size: 1.4em;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.dm-modal-close:hover { color: var(--fg, #ddd); }
|
||||
|
||||
.dm-key-status {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border-radius: 6px;
|
||||
padding: 10px 12px;
|
||||
font-size: 0.85em;
|
||||
margin-bottom: 18px;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.dm-key-section {
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #2a2a2a;
|
||||
}
|
||||
|
||||
.dm-key-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
|
||||
|
||||
.dm-key-section h3 {
|
||||
font-size: 0.9em;
|
||||
margin: 0 0 6px;
|
||||
color: var(--fg, #ccc);
|
||||
}
|
||||
|
||||
.dm-key-section p {
|
||||
font-size: 0.82em;
|
||||
color: #777;
|
||||
margin: 0 0 10px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.dm-key-input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: var(--bg2, #1a1a1a);
|
||||
border: 1px solid #444;
|
||||
color: var(--fg, #ddd);
|
||||
border-radius: 6px;
|
||||
padding: 8px 10px;
|
||||
font-size: 0.88em;
|
||||
margin-bottom: 8px;
|
||||
box-sizing: border-box;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.dm-key-input:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
.dm-key-btn {
|
||||
background: var(--accent);
|
||||
color: var(--bg, #000);
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 8px 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
font-size: 0.86em;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.dm-key-btn:hover { opacity: 0.85; }
|
||||
|
||||
.dm-key-btn-danger {
|
||||
background: #d94f4f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.dm-key-danger h3 { color: #d94f4f; }
|
||||
|
||||
.dm-key-msg {
|
||||
font-size: 0.82em;
|
||||
margin-top: 8px;
|
||||
min-height: 18px;
|
||||
}
|
||||
|
||||
.dm-msg-ok { color: #5cb85c; }
|
||||
.dm-msg-err { color: #e06c6c; }
|
||||
|
||||
/* Navbar DM icon */
|
||||
#nav-dm-btn {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media (max-width: 600px) {
|
||||
.messages-page { padding: 10px; }
|
||||
.dm-msg { max-width: 90%; }
|
||||
.dm-thread { max-height: calc(100vh - 240px); }
|
||||
.dm-modal { padding: 20px; }
|
||||
}
|
||||
Reference in New Issue
Block a user