- Session click opens edit form (name, description, image, agent) instead of chat
- Chat is now a separate route (#chat/{id}), opened via button
- Sessions created on save, not on click
- Soft-delete for sessions (is_deleted flag)
- Delete button in session form
- Removed title double-click editing from chat
- Card images now square (aspect-ratio: 1)
- New Session as placeholder card
236 lines
3.7 KiB
CSS
236 lines
3.7 KiB
CSS
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#app {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.page {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Nav ── */
|
|
|
|
#nav {
|
|
padding: var(--s3) calc(var(--s4) * 1.5);
|
|
border-bottom: var(--border-width) solid var(--f2-border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: calc(var(--s4) * 2);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-links {
|
|
display: flex;
|
|
gap: var(--s4);
|
|
}
|
|
|
|
.nav-link {
|
|
text-decoration: none;
|
|
padding: var(--s1) var(--s2);
|
|
color: var(--text);
|
|
}
|
|
|
|
.nav-link:hover { color: var(--text); }
|
|
.nav-link.active { color: var(--text); border-bottom: 2px solid var(--primary); }
|
|
|
|
/* ── Dashboard ── */
|
|
|
|
.dashboard {
|
|
padding: calc(var(--s4) * 2);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.dashboard section {
|
|
margin-bottom: calc(var(--s4) * 2);
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: var(--s4);
|
|
}
|
|
|
|
.card-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
gap: var(--s4);
|
|
}
|
|
|
|
.card {
|
|
background: var(--f3-bg);
|
|
border: var(--border-width) solid var(--f3-border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card.clickable { cursor: pointer; }
|
|
.card.clickable:hover { border-color: var(--primary); }
|
|
|
|
.card-image {
|
|
aspect-ratio: 1;
|
|
background: var(--f2-bg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.card-body {
|
|
padding: var(--s3);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--s1);
|
|
}
|
|
|
|
.card-title-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--s2);
|
|
}
|
|
|
|
.card-title {
|
|
font-weight: bold;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.card-desc {
|
|
display: -webkit-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.badge {
|
|
padding: var(--s1) var(--s2);
|
|
background: var(--f1-bg);
|
|
border: var(--border-width) solid var(--f2-border);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.card.placeholder {
|
|
border-style: dashed;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* ── Session Page ── */
|
|
|
|
.session-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.session-header {
|
|
padding: var(--s3) calc(var(--s4) * 1.5);
|
|
border-bottom: var(--border-width) solid var(--f1-border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--s4);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.back-btn {
|
|
background: none;
|
|
border: none;
|
|
padding: var(--s1) var(--s2);
|
|
}
|
|
|
|
.editable-title {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.editable-title:hover {
|
|
text-decoration: underline;
|
|
text-decoration-style: dotted;
|
|
}
|
|
|
|
/* ── Placeholder Pages ── */
|
|
|
|
.placeholder-page {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--s4);
|
|
}
|
|
|
|
.placeholder-icon {
|
|
font-size: 4em;
|
|
}
|
|
|
|
/* ── Agent Form ── */
|
|
|
|
.agent-form {
|
|
padding: calc(var(--s4) * 2);
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--s3);
|
|
max-width: 600px;
|
|
}
|
|
|
|
.agent-form label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.agent-form textarea {
|
|
resize: vertical;
|
|
}
|
|
|
|
.agent-avatar-section {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--s4);
|
|
}
|
|
|
|
.agent-avatar-preview {
|
|
width: 64px;
|
|
height: 64px;
|
|
background: var(--f2-bg);
|
|
border: var(--border-width) solid var(--f2-border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 2em;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.agent-avatar-preview img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.agent-form-actions {
|
|
display: flex;
|
|
gap: var(--s4);
|
|
margin-top: var(--s4);
|
|
}
|
|
|
|
.danger-btn {
|
|
color: #ff6b6b;
|
|
border-color: #ff6b6b;
|
|
}
|
|
|
|
.danger-btn:hover {
|
|
background: #ff6b6b;
|
|
color: var(--f1-bg);
|
|
}
|