Changeset 0.20.0 (#85)
This commit is contained in:
210
src/css/channel-models.css
Normal file
210
src/css/channel-models.css
Normal file
@@ -0,0 +1,210 @@
|
||||
/* ==========================================
|
||||
Channel Models — v0.20.0 Phase 2
|
||||
Model pills, @mention autocomplete, add dialog
|
||||
========================================== */
|
||||
|
||||
/* ── Model Pills (chat header) ───────────── */
|
||||
|
||||
.ch-model-pills {
|
||||
display: none; /* shown by JS when roster > 1 */
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 0 8px;
|
||||
flex-shrink: 1;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.ch-model-pills::-webkit-scrollbar { display: none; }
|
||||
|
||||
.ch-model-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 12px;
|
||||
background: var(--bg-secondary, #f0f0f0);
|
||||
border: 1px solid var(--border-color, #ddd);
|
||||
font-size: 0.75rem;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.ch-model-pill.ch-model-default {
|
||||
background: var(--accent-bg, #e8f0fe);
|
||||
border-color: var(--accent-color, #4a8af4);
|
||||
}
|
||||
.ch-model-pill-name {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
.ch-model-pill-name:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.ch-model-pill-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 0.65rem;
|
||||
color: var(--text-secondary, #888);
|
||||
padding: 0 2px;
|
||||
line-height: 1;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
.ch-model-pill-remove:hover {
|
||||
opacity: 1;
|
||||
color: var(--error-color, #d32f2f);
|
||||
}
|
||||
|
||||
.ch-model-add-btn {
|
||||
background: none;
|
||||
border: 1px dashed var(--border-color, #ccc);
|
||||
border-radius: 12px;
|
||||
padding: 2px 8px;
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary, #888);
|
||||
white-space: nowrap;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
.ch-model-add-btn:hover {
|
||||
color: var(--text-primary, #333);
|
||||
border-color: var(--text-primary, #333);
|
||||
}
|
||||
|
||||
/* ── Add Model Dialog ────────────────────── */
|
||||
|
||||
.ch-model-add-dialog {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(0,0,0,0.4);
|
||||
z-index: 1100;
|
||||
}
|
||||
.ch-model-add-inner {
|
||||
background: var(--bg-primary, #fff);
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
min-width: 320px;
|
||||
max-width: 420px;
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
||||
}
|
||||
.ch-model-add-inner h3 {
|
||||
margin: 0 0 16px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.ch-model-add-inner label {
|
||||
display: block;
|
||||
margin-bottom: 12px;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-secondary, #666);
|
||||
}
|
||||
.ch-model-add-inner select,
|
||||
.ch-model-add-inner input[type="text"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
padding: 8px;
|
||||
border: 1px solid var(--border-color, #ddd);
|
||||
border-radius: 6px;
|
||||
font-size: 0.9rem;
|
||||
background: var(--bg-primary, #fff);
|
||||
color: var(--text-primary, #333);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.ch-model-add-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
/* ── @mention Autocomplete ───────────────── */
|
||||
|
||||
.mention-ac {
|
||||
position: fixed;
|
||||
z-index: 1050;
|
||||
background: var(--bg-primary, #fff);
|
||||
border: 1px solid var(--border-color, #ddd);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding: 4px 0;
|
||||
}
|
||||
.mention-ac-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
gap: 12px;
|
||||
transition: background 0.1s;
|
||||
}
|
||||
.mention-ac-item:hover,
|
||||
.mention-ac-item.mention-ac-active {
|
||||
background: var(--bg-secondary, #f5f5f5);
|
||||
}
|
||||
.mention-ac-name {
|
||||
font-weight: 500;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.mention-ac-model {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary, #999);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 160px;
|
||||
}
|
||||
|
||||
/* ── Model Attribution (multi-model messages) ─ */
|
||||
|
||||
.msg-model-label {
|
||||
display: inline-block;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 600;
|
||||
padding: 1px 6px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-secondary, #f0f0f0);
|
||||
color: var(--text-secondary, #666);
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Model separator in multi-model stream */
|
||||
.model-stream-divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 0 4px;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary, #888);
|
||||
font-weight: 500;
|
||||
}
|
||||
.model-stream-divider::before,
|
||||
.model-stream-divider::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border-color, #eee);
|
||||
}
|
||||
|
||||
/* ── Mobile ──────────────────────────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.ch-model-pills {
|
||||
max-width: 50vw;
|
||||
}
|
||||
.ch-model-add-inner {
|
||||
min-width: auto;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.mention-ac {
|
||||
left: 8px !important;
|
||||
right: 8px;
|
||||
min-width: auto !important;
|
||||
}
|
||||
}
|
||||
64
src/css/notification-prefs.css
Normal file
64
src/css/notification-prefs.css
Normal file
@@ -0,0 +1,64 @@
|
||||
/* ==========================================
|
||||
Notification Preferences — v0.20.0 Phase 3
|
||||
========================================== */
|
||||
|
||||
.notif-pref-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.notif-pref-table th {
|
||||
text-align: left;
|
||||
padding: 6px 8px;
|
||||
border-bottom: 2px solid var(--border-color, #ddd);
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary, #888);
|
||||
font-weight: 500;
|
||||
}
|
||||
.notif-pref-table th:nth-child(2),
|
||||
.notif-pref-table th:nth-child(3) {
|
||||
text-align: center;
|
||||
width: 70px;
|
||||
}
|
||||
.notif-pref-table td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid var(--border-color, #eee);
|
||||
}
|
||||
.notif-pref-toggle {
|
||||
text-align: center;
|
||||
}
|
||||
.notif-pref-label {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* ── SMTP Config (Admin panel) ────────────── */
|
||||
|
||||
.smtp-config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
}
|
||||
.smtp-config-grid .form-group {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.smtp-config-grid .form-group.full-width {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.smtp-test-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.smtp-test-status {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-secondary, #888);
|
||||
}
|
||||
.smtp-test-status.success { color: var(--success-color, #2e7d32); }
|
||||
.smtp-test-status.error { color: var(--error-color, #d32f2f); }
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.smtp-config-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
249
src/css/notifications.css
Normal file
249
src/css/notifications.css
Normal file
@@ -0,0 +1,249 @@
|
||||
/* ==========================================
|
||||
Notifications (v0.20.0)
|
||||
========================================== */
|
||||
|
||||
/* ── Bell + Badge ──────────────────────────── */
|
||||
|
||||
.notif-wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.notif-bell {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px 6px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-secondary, #888);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.notif-bell:hover {
|
||||
background: var(--hover-bg, rgba(128, 128, 128, 0.1));
|
||||
color: var(--text-primary, #ddd);
|
||||
}
|
||||
|
||||
.notif-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
min-width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
background: var(--accent-red, #e55);
|
||||
color: #fff;
|
||||
padding: 0 4px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ── Dropdown ──────────────────────────────── */
|
||||
|
||||
.notif-dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
width: 360px;
|
||||
max-height: 480px;
|
||||
background: var(--bg-surface, #1e1e1e);
|
||||
border: 1px solid var(--border-color, #333);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.notif-dd-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border-color, #333);
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.notif-mark-all {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--accent, #5b9);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.notif-mark-all:hover {
|
||||
background: var(--hover-bg, rgba(128, 128, 128, 0.1));
|
||||
}
|
||||
|
||||
.notif-dd-list {
|
||||
overflow-y: auto;
|
||||
max-height: 380px;
|
||||
}
|
||||
|
||||
.notif-dd-footer {
|
||||
padding: 8px 14px;
|
||||
border-top: 1px solid var(--border-color, #333);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.notif-view-all {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--accent, #5b9);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.notif-view-all:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ── Notification Item ─────────────────────── */
|
||||
|
||||
.notif-item,
|
||||
.notif-panel-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding: 10px 14px;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s;
|
||||
border-bottom: 1px solid var(--border-color, #222);
|
||||
}
|
||||
|
||||
.notif-item:hover,
|
||||
.notif-panel-item:hover {
|
||||
background: var(--hover-bg, rgba(128, 128, 128, 0.08));
|
||||
}
|
||||
|
||||
.notif-item.notif-unread,
|
||||
.notif-panel-item.notif-unread {
|
||||
background: var(--notif-unread-bg, rgba(91, 187, 153, 0.06));
|
||||
}
|
||||
|
||||
.notif-dot {
|
||||
flex-shrink: 0;
|
||||
width: 18px;
|
||||
font-size: 10px;
|
||||
margin-top: 3px;
|
||||
color: var(--accent, #5b9);
|
||||
}
|
||||
|
||||
.notif-item:not(.notif-unread) .notif-dot,
|
||||
.notif-panel-item:not(.notif-unread) .notif-dot {
|
||||
color: var(--text-tertiary, #555);
|
||||
}
|
||||
|
||||
.notif-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.notif-title {
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
color: var(--text-primary, #ddd);
|
||||
}
|
||||
|
||||
.notif-detail {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary, #888);
|
||||
margin-top: 2px;
|
||||
line-height: 1.3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.notif-time {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary, #666);
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.notif-empty {
|
||||
padding: 32px 14px;
|
||||
text-align: center;
|
||||
color: var(--text-secondary, #888);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* ── Panel ─────────────────────────────────── */
|
||||
|
||||
.notif-panel {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.notif-panel-toolbar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--border-color, #333);
|
||||
}
|
||||
|
||||
.notif-panel-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.notif-panel-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.notif-delete {
|
||||
flex-shrink: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-tertiary, #555);
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.notif-panel-item:hover .notif-delete {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.notif-delete:hover {
|
||||
color: var(--accent-red, #e55);
|
||||
background: var(--hover-bg, rgba(128, 128, 128, 0.1));
|
||||
}
|
||||
|
||||
.notif-panel-more {
|
||||
padding: 8px 12px;
|
||||
text-align: center;
|
||||
border-top: 1px solid var(--border-color, #333);
|
||||
}
|
||||
|
||||
/* ── Mobile ────────────────────────────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.notif-dropdown {
|
||||
position: fixed;
|
||||
top: 48px;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
width: auto;
|
||||
max-height: calc(100vh - 96px);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user