Changeset 0.37.14 (#226)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -472,3 +472,125 @@ select option { background: var(--bg-surface); color: var(--text); }
|
||||
.sw-tabs-content { flex: 1; min-height: 0; overflow: hidden; }
|
||||
.sw-tab-panel { height: 100%; overflow-y: auto; }
|
||||
|
||||
/* ── Responsive: Mobile ───────────────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
/* Flyout items: larger touch targets */
|
||||
.sw-menu-flyout .flyout-item {
|
||||
padding: 10px 12px;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
/* Flyout: constrain to viewport */
|
||||
.sw-menu-flyout {
|
||||
max-width: calc(100vw - 16px);
|
||||
}
|
||||
|
||||
/* Dialog/modal: full width on mobile, max with margins */
|
||||
.sw-dialog__content {
|
||||
width: calc(100vw - 32px);
|
||||
max-width: 100%;
|
||||
max-height: calc(100vh - 64px);
|
||||
}
|
||||
|
||||
/* Toast: full width, centered */
|
||||
.sw-toast {
|
||||
max-width: calc(100vw - 32px);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── User Picker (autocomplete) ──────────── */
|
||||
|
||||
.sw-user-picker {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sw-user-picker__input {
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
border-radius: var(--radius, 6px);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
background: var(--bg, #0e0e10);
|
||||
color: var(--text, #eee);
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.sw-user-picker__input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent, #b38a4e);
|
||||
}
|
||||
|
||||
.sw-user-picker__spinner {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid var(--border, #2a2a2e);
|
||||
border-top-color: var(--accent, #b38a4e);
|
||||
border-radius: 50%;
|
||||
animation: sw-spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes sw-spin { to { transform: translateY(-50%) rotate(360deg); } }
|
||||
|
||||
.sw-user-picker__dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top: 4px;
|
||||
background: var(--bg-elevated, #2a2a2e);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
border-radius: var(--radius, 6px);
|
||||
box-shadow: 0 8px 24px rgba(0,0,0,0.5);
|
||||
z-index: 300;
|
||||
max-height: 240px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sw-user-picker__option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s;
|
||||
}
|
||||
|
||||
.sw-user-picker__option:hover,
|
||||
.sw-user-picker__option--active {
|
||||
background: var(--bg-hover, rgba(255,255,255,0.06));
|
||||
}
|
||||
|
||||
.sw-user-picker__avatar {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent, #b38a4e);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.7em;
|
||||
font-weight: 600;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sw-user-picker__label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sw-user-picker__name {
|
||||
font-size: 0.85em;
|
||||
color: var(--text, #eee);
|
||||
}
|
||||
|
||||
.sw-user-picker__handle {
|
||||
font-size: 0.75em;
|
||||
color: var(--text-muted, #888);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,11 +98,17 @@
|
||||
font-family: inherit;
|
||||
padding: 4px 6px;
|
||||
cursor: pointer;
|
||||
max-width: 140px;
|
||||
min-width: 100px;
|
||||
max-width: 160px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sw-model-selector__select:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.sw-model-selector__select:focus {
|
||||
border-color: var(--accent, #b38a4e);
|
||||
outline: none;
|
||||
@@ -148,6 +154,72 @@
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Other user messages — left-aligned bubble */
|
||||
.sw-chat-msg--other {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.sw-chat-msg--other .sw-chat-msg__content {
|
||||
background: var(--bg-2, #1a1a1e);
|
||||
color: var(--text, #eee);
|
||||
padding: 8px 14px;
|
||||
border-radius: 12px 12px 12px 2px;
|
||||
max-width: 85%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.sw-chat-msg__sender {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text-3, #555);
|
||||
margin-bottom: 2px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
/* ── @Mention highlights in rendered messages ─ */
|
||||
|
||||
.sw-mention {
|
||||
color: var(--accent, #6366f1);
|
||||
background: rgba(var(--accent-rgb, 99, 102, 241), 0.1);
|
||||
border-radius: 3px;
|
||||
padding: 0 3px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ── Typing Indicator ─────────────────────── */
|
||||
|
||||
.sw-typing-indicator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 16px;
|
||||
font-size: 12px;
|
||||
color: var(--text-3, #888);
|
||||
min-height: 22px;
|
||||
}
|
||||
|
||||
.sw-typing-indicator__dots {
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.sw-typing-indicator__dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-3, #888);
|
||||
animation: sw-typing-bounce 1.4s infinite ease-in-out both;
|
||||
}
|
||||
|
||||
.sw-typing-indicator__dot:nth-child(1) { animation-delay: 0s; }
|
||||
.sw-typing-indicator__dot:nth-child(2) { animation-delay: 0.16s; }
|
||||
.sw-typing-indicator__dot:nth-child(3) { animation-delay: 0.32s; }
|
||||
|
||||
@keyframes sw-typing-bounce {
|
||||
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
||||
40% { transform: scale(1); opacity: 1; }
|
||||
}
|
||||
|
||||
/* Assistant messages — left-aligned */
|
||||
.sw-chat-msg--assistant {
|
||||
padding: 8px 16px;
|
||||
@@ -527,31 +599,22 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ── Markdown Toolbar ─────────────────────── */
|
||||
/* ── CM6 Chat Input ──────────────────────── */
|
||||
|
||||
.sw-md-toolbar {
|
||||
display: flex;
|
||||
gap: 1px;
|
||||
padding: 4px 12px 2px;
|
||||
flex-shrink: 0;
|
||||
.sw-msg-input__cm-container {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sw-md-toolbar__btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-3, #555);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 3px 7px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: color 0.15s, background 0.15s;
|
||||
line-height: 1;
|
||||
.sw-msg-input__cm-container .cm-editor {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
max-height: 160px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sw-md-toolbar__btn:hover {
|
||||
color: var(--text, #eee);
|
||||
background: var(--bg, #0e0e10);
|
||||
.sw-msg-input__cm-container .cm-editor.cm-focused {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* ── Error Banner ─────────────────────────── */
|
||||
@@ -750,3 +813,35 @@
|
||||
vertical-align: middle;
|
||||
accent-color: var(--accent, #b38a4e);
|
||||
}
|
||||
|
||||
/* ── Thinking / Reasoning Blocks ────────── */
|
||||
|
||||
.sw-chat-msg__thinking {
|
||||
margin-bottom: 8px;
|
||||
border-left: 3px solid var(--border, rgba(255,255,255,0.1));
|
||||
border-radius: 4px;
|
||||
font-size: 0.85em;
|
||||
color: var(--text-muted, #888);
|
||||
}
|
||||
|
||||
.sw-chat-msg__thinking-toggle {
|
||||
cursor: pointer;
|
||||
padding: 6px 10px;
|
||||
user-select: none;
|
||||
font-weight: 500;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.sw-chat-msg__thinking-toggle:hover { opacity: 1; }
|
||||
|
||||
.sw-chat-msg__thinking[open] .sw-chat-msg__thinking-toggle {
|
||||
border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.sw-chat-msg__thinking-content {
|
||||
padding: 6px 10px 10px;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.1));
|
||||
border: 1px solid var(--accent, #b38a4e);
|
||||
@@ -53,6 +53,7 @@
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-folder-btn,
|
||||
.sw-chat-surface__collapse-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -68,6 +69,7 @@
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-folder-btn:hover,
|
||||
.sw-chat-surface__collapse-btn:hover {
|
||||
color: var(--text, #eee);
|
||||
background: var(--bg, #0e0e10);
|
||||
@@ -77,6 +79,52 @@
|
||||
background: rgba(179, 138, 78, 0.2);
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-menu-wrap {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--surface, #1a1a1e);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
||||
z-index: 130;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-menu button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
color: var(--text, #eee);
|
||||
font-size: 12px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-menu button:hover {
|
||||
background: var(--bg-hover, rgba(255, 255, 255, 0.06));
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-menu-icon {
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ── Search ───────────────────────────────── */
|
||||
|
||||
.sw-chat-surface__search-wrap {
|
||||
@@ -95,9 +143,9 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.sw-chat-surface__search {
|
||||
input.sw-chat-surface__search {
|
||||
width: 100%;
|
||||
padding: 6px 8px 6px 30px;
|
||||
padding: 6px 8px 6px 34px;
|
||||
background: var(--bg, #0e0e10);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
border-radius: 6px;
|
||||
@@ -108,7 +156,7 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sw-chat-surface__search:focus {
|
||||
input.sw-chat-surface__search:focus {
|
||||
border-color: var(--accent, #b38a4e);
|
||||
}
|
||||
|
||||
@@ -222,7 +270,7 @@
|
||||
}
|
||||
|
||||
.sw-chat-surface__item-menu {
|
||||
display: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
@@ -234,10 +282,14 @@
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sw-chat-surface__item:hover .sw-chat-surface__item-menu {
|
||||
display: flex;
|
||||
.sw-chat-surface__item:hover .sw-chat-surface__item-menu,
|
||||
.sw-chat-surface__folder-header:hover .sw-chat-surface__item-menu {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.sw-chat-surface__item-menu:hover {
|
||||
@@ -261,6 +313,29 @@
|
||||
|
||||
.sw-chat-surface__folder {
|
||||
margin: 2px 0;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__folder--drag-over {
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.1));
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.sw-chat-surface__root-drop {
|
||||
margin: 4px 8px;
|
||||
padding: 10px;
|
||||
border: 2px dashed var(--border, #2a2a2e);
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: var(--text-3, #555);
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__root-drop--active {
|
||||
border-color: var(--accent, #b38a4e);
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.1));
|
||||
color: var(--text-2, #999);
|
||||
}
|
||||
|
||||
.sw-chat-surface__folder-header {
|
||||
@@ -270,6 +345,25 @@
|
||||
padding: 4px 12px;
|
||||
color: var(--text-3, #555);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__folder-header:hover {
|
||||
background: var(--bg, #0e0e10);
|
||||
}
|
||||
|
||||
/* Draggable items */
|
||||
.sw-chat-surface__item[draggable="true"],
|
||||
.sw-chat-surface__folder[draggable="true"] {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.sw-chat-surface__item[draggable="true"]:active,
|
||||
.sw-chat-surface__folder[draggable="true"]:active {
|
||||
cursor: grabbing;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.sw-chat-surface__folder-name {
|
||||
@@ -380,6 +474,180 @@
|
||||
background: var(--bg, #0e0e10);
|
||||
}
|
||||
|
||||
/* ── Header Buttons (members, settings) ───── */
|
||||
|
||||
.sw-chat-surface__header-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
color: var(--text-3, #555);
|
||||
cursor: pointer;
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-surface__header-btn:hover {
|
||||
color: var(--text, #eee);
|
||||
background: var(--bg, #0e0e10);
|
||||
}
|
||||
|
||||
/* ── Channel Panel Shared ─────────────────── */
|
||||
|
||||
.sw-panel-loading,
|
||||
.sw-panel-empty {
|
||||
padding: 24px 16px;
|
||||
text-align: center;
|
||||
color: var(--text-muted, #888);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* ── Members Panel ────────────────────────── */
|
||||
|
||||
.sw-members-list {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.sw-members-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
transition: background 0.12s;
|
||||
}
|
||||
|
||||
.sw-members-row:hover {
|
||||
background: var(--bg, rgba(255,255,255,0.03));
|
||||
}
|
||||
|
||||
.sw-members-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent, #b38a4e);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.75em;
|
||||
font-weight: 600;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sw-members-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.sw-members-name {
|
||||
font-size: 0.9em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sw-members-type {
|
||||
font-size: 0.75em;
|
||||
color: var(--text-muted, #888);
|
||||
}
|
||||
|
||||
.sw-members-role {
|
||||
font-size: 0.8em;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-secondary, #151517);
|
||||
color: var(--text, #eee);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
}
|
||||
|
||||
.sw-members-remove {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-muted, #888);
|
||||
cursor: pointer;
|
||||
font-size: 1.1em;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-members-remove:hover {
|
||||
color: #e55;
|
||||
background: rgba(238,85,85,0.1);
|
||||
}
|
||||
|
||||
.sw-members-add {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid var(--border, #2a2a2e);
|
||||
}
|
||||
|
||||
.sw-members-add input {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
background: var(--bg, #0e0e10);
|
||||
color: var(--text, #eee);
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
/* ── Settings Panel ───────────────────────── */
|
||||
|
||||
.sw-settings-form {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.sw-settings-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.sw-settings-field label {
|
||||
font-size: 0.8em;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted, #888);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.sw-settings-field input,
|
||||
.sw-settings-field textarea,
|
||||
.sw-settings-field select {
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
background: var(--bg, #0e0e10);
|
||||
color: var(--text, #eee);
|
||||
font-size: 0.9em;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.sw-settings-info {
|
||||
padding: 10px 0;
|
||||
border-top: 1px solid var(--border, rgba(255,255,255,0.06));
|
||||
font-size: 0.82em;
|
||||
color: var(--text-muted, #888);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.sw-settings-save {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
/* ── Tools Button ─────────────────────────── */
|
||||
|
||||
.sw-chat-surface__tools-btn {
|
||||
@@ -595,14 +863,169 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 280px;
|
||||
z-index: 20;
|
||||
z-index: 120;
|
||||
}
|
||||
|
||||
.sw-chat-surface__sidebar-overlay {
|
||||
display: block;
|
||||
z-index: 110;
|
||||
}
|
||||
|
||||
.sw-chat-surface__collapse-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Ensure touch targets are >= 44px */
|
||||
.sw-chat-surface__item {
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.sw-chat-surface__folder-header {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
/* Prevent iOS zoom on search */
|
||||
input.sw-chat-surface__search {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Context menu: constrain to viewport */
|
||||
.sw-chat-surface__context-menu {
|
||||
max-width: calc(100vw - 16px);
|
||||
right: 8px;
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
/* Header buttons: tighter on mobile */
|
||||
.sw-chat-surface__sidebar-header {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.sw-chat-surface__new-chat-btn {
|
||||
font-size: 12px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Dashboard (no chat selected) ─────────── */
|
||||
|
||||
.sw-chat-dashboard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 40px 24px;
|
||||
gap: 32px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__welcome {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--text, #eee);
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__hint {
|
||||
font-size: 13px;
|
||||
color: var(--text-3, #555);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__actions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 12px;
|
||||
max-width: 360px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 20px 12px;
|
||||
background: var(--surface, #1a1a1e);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
border-radius: 10px;
|
||||
color: var(--text, #eee);
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__card:hover {
|
||||
border-color: var(--accent, #b38a4e);
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.08));
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__card-icon {
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__card-label {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__recent {
|
||||
max-width: 360px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__section-title {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--text-3, #555);
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__recent-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__recent-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
color: var(--text-2, #999);
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__recent-icon {
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.sw-chat-dashboard__recent-title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sw-chat-dashboard {
|
||||
padding: 24px 16px;
|
||||
}
|
||||
.sw-chat-dashboard__actions {
|
||||
gap: 8px;
|
||||
}
|
||||
.sw-chat-dashboard__card {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
}
|
||||
@@ -353,14 +353,25 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 280px;
|
||||
z-index: 20;
|
||||
z-index: 120;
|
||||
}
|
||||
|
||||
.sw-notes-surface__sidebar-overlay {
|
||||
display: block;
|
||||
z-index: 110;
|
||||
}
|
||||
|
||||
.sw-notes-surface__collapse-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Touch targets */
|
||||
.sw-notes-surface__item {
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
/* Prevent iOS zoom */
|
||||
.sw-notes-surface__search {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +193,11 @@
|
||||
.sw-menu__arrow { font-size: 0.6em; color: var(--text-3); }
|
||||
.sw-menu__divider { height: 1px; background: var(--border); margin: 4px 0; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sw-menu { max-width: calc(100vw - 16px); }
|
||||
.sw-menu__item { min-height: 44px; padding: 0.5rem 0.75rem; }
|
||||
}
|
||||
|
||||
/* ── Drawer ────────────────────────────────── */
|
||||
|
||||
.sw-drawer-overlay {
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
/* Safe-area insets for notched devices */
|
||||
padding-top: env(safe-area-inset-top, 0);
|
||||
padding-bottom: env(safe-area-inset-bottom, 0);
|
||||
padding-left: env(safe-area-inset-left, 0);
|
||||
padding-right: env(safe-area-inset-right, 0);
|
||||
}
|
||||
|
||||
/* ── Banner (fixed top / bottom — identical component) ── */
|
||||
@@ -137,3 +142,184 @@
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ── Notification Bell ───────────────────── */
|
||||
|
||||
.sw-notification-bell {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sw-notification-bell__trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
color: var(--text-3, #555);
|
||||
cursor: pointer;
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.sw-notification-bell__trigger:hover {
|
||||
color: var(--text, #eee);
|
||||
background: var(--bg, #0e0e10);
|
||||
}
|
||||
|
||||
.sw-notification-bell__badge {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
background: var(--danger, #ef4444);
|
||||
color: #fff;
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
min-width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.sw-notification-bell__panel {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
margin-top: 6px;
|
||||
width: 320px;
|
||||
max-height: 420px;
|
||||
background: var(--bg-secondary, #151517);
|
||||
border: 1px solid var(--border, #2a2a2e);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
||||
z-index: 200;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sw-notification-bell__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border, #2a2a2e);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text, #eee);
|
||||
}
|
||||
|
||||
.sw-notification-bell__mark-all {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--accent, #b38a4e);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sw-notification-bell__mark-all:hover {
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.1));
|
||||
}
|
||||
|
||||
.sw-notification-bell__list {
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sw-notification-bell__empty {
|
||||
padding: 24px 14px;
|
||||
text-align: center;
|
||||
color: var(--text-3, #555);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border, #2a2a2e);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item:hover {
|
||||
background: var(--bg, #0e0e10);
|
||||
}
|
||||
|
||||
.sw-notification-bell__item--unread {
|
||||
background: var(--accent-dim, rgba(179, 138, 78, 0.05));
|
||||
}
|
||||
|
||||
.sw-notification-bell__item--unread::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent, #b38a4e);
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item-text {
|
||||
font-size: 12px;
|
||||
color: var(--text, #eee);
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item-body {
|
||||
font-size: 11px;
|
||||
color: var(--text-3, #555);
|
||||
margin-top: 3px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item-time {
|
||||
font-size: 10px;
|
||||
color: var(--text-3, #555);
|
||||
margin-top: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item--navigable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item-action {
|
||||
font-size: 10px;
|
||||
color: var(--accent, #4a9eff);
|
||||
font-weight: 600;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.sw-notification-bell__item:hover .sw-notification-bell__item-action {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ── Notification Bell — Mobile ──────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sw-notification-bell__panel {
|
||||
width: calc(100vw - 24px);
|
||||
max-width: 320px;
|
||||
right: -8px;
|
||||
}
|
||||
|
||||
.sw-notification-bell__trigger {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,3 +95,18 @@
|
||||
width: 200px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* ── Responsive: Mobile ───────────────────── */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
/* User menu button: ensure 44px touch target */
|
||||
.user-menu-wrap .user-btn {
|
||||
padding: 8px;
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
/* Flyout: open upward and constrain width */
|
||||
.user-menu-wrap .sw-menu-flyout {
|
||||
max-width: calc(100vw - 16px);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,13 @@
|
||||
--warning-dim: rgba(234,179,8,0.2);
|
||||
|
||||
/* ── Surfaces ────────────────────────────── */
|
||||
--bg-primary: #0e0e10;
|
||||
--bg-secondary: #151517;
|
||||
--overlay: rgba(0,0,0,0.55);
|
||||
--glass: rgba(255,255,255,0.03);
|
||||
--input-bg: #1a1a1f;
|
||||
--user-bubble: rgba(108,159,255,0.08);
|
||||
--danger-bg: rgba(239,68,68,0.12);
|
||||
--shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
|
||||
|
||||
/* ── Layout ──────────────────────────────── */
|
||||
@@ -105,10 +108,13 @@
|
||||
--success-dim: rgba(22,163,74,0.09);
|
||||
--warning-dim: rgba(202,138,4,0.09);
|
||||
|
||||
--bg-primary: #f7f7fa;
|
||||
--bg-secondary: #ecedf2;
|
||||
--overlay: rgba(0,0,0,0.25);
|
||||
--glass: rgba(0,0,0,0.02);
|
||||
--input-bg: #f2f3f6;
|
||||
--user-bubble: rgba(74,124,219,0.06);
|
||||
--danger-bg: #fef2f2;
|
||||
--shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
|
||||
|
||||
color-scheme: light;
|
||||
|
||||
Reference in New Issue
Block a user