Files
WeFlow/src/pages/InsightInboxPage.scss
2026-05-05 13:54:50 +08:00

613 lines
11 KiB
SCSS

.insight-inbox-page {
--insight-panel-width: 360px;
--insight-card-bg: var(--bg-secondary);
display: flex;
height: calc(100% + 48px);
margin: -24px;
overflow: hidden;
background: var(--bg-primary);
color: var(--text-primary);
}
.insight-inbox-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
padding: 18px 24px 14px;
}
.insight-inbox-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 0 4px 12px;
border-bottom: 1px solid var(--border-color);
}
.insight-inbox-title-block {
min-width: 0;
display: flex;
flex-direction: column;
gap: 7px;
}
.insight-inbox-title-line {
display: flex;
align-items: center;
gap: 10px;
h2 {
margin: 0;
font-size: 22px;
font-weight: 700;
color: var(--text-primary);
}
}
.insight-inbox-logo {
width: 30px;
height: 30px;
border-radius: 8px;
object-fit: cover;
}
.insight-inbox-stats {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
font-size: 13px;
color: var(--text-secondary);
span + span::before {
content: '';
display: inline-block;
width: 3px;
height: 3px;
margin-right: 10px;
border-radius: 50%;
background: var(--text-tertiary);
vertical-align: middle;
}
}
.insight-icon-btn,
.insight-action-btn {
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-secondary);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
&:hover {
color: var(--text-primary);
background: var(--bg-tertiary);
border-color: var(--text-secondary);
}
}
.insight-icon-btn {
width: 40px;
height: 40px;
border-radius: 10px;
}
.insight-action-btn {
width: 30px;
height: 30px;
border-radius: 8px;
&.code {
color: var(--primary);
}
}
.spinning {
animation: insight-spin 0.9s linear infinite;
}
@keyframes insight-spin {
to {
transform: rotate(360deg);
}
}
.insight-focus-bar {
margin: 12px 4px 0;
padding: 9px 12px;
border: 1px solid rgba(91, 147, 144, 0.22);
border-radius: 10px;
background: rgba(91, 147, 144, 0.08);
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
button {
margin-left: auto;
border: none;
background: transparent;
color: var(--primary);
cursor: pointer;
font-size: 13px;
}
}
.insight-record-scroll {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 16px 4px 22px;
}
.insight-date-group {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 18px;
}
.insight-date-label {
position: sticky;
top: 0;
z-index: 1;
width: fit-content;
padding: 5px 10px;
border-radius: 999px;
background: color-mix(in srgb, var(--bg-primary) 86%, transparent);
color: var(--text-tertiary);
font-size: 12px;
backdrop-filter: blur(10px);
}
.insight-card {
display: flex;
gap: 14px;
padding: 18px;
border: 1px solid var(--border-color);
border-radius: 14px;
background: var(--insight-card-bg);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
&:hover {
border-color: rgba(91, 147, 144, 0.28);
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}
&.unread {
border-left: 4px solid var(--primary);
}
&.focused {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(91, 147, 144, 0.14), 0 12px 32px rgba(0, 0, 0, 0.08);
}
}
.insight-card-avatar {
flex: 0 0 auto;
}
.insight-card-content {
min-width: 0;
flex: 1;
display: flex;
flex-direction: column;
gap: 12px;
}
.insight-card-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.insight-recipient {
display: flex;
align-items: center;
gap: 9px;
min-width: 0;
}
.insight-recipient-text {
min-width: 0;
display: flex;
flex-direction: column;
gap: 3px;
}
.insight-recipient-name {
font-size: 14px;
font-weight: 700;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.insight-session-id {
max-width: 260px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
color: var(--text-tertiary);
}
.insight-card-actions {
display: flex;
align-items: center;
gap: 7px;
flex-shrink: 0;
}
.insight-trigger-pill {
padding: 5px 8px;
border-radius: 999px;
background: var(--bg-tertiary);
color: var(--text-secondary);
font-size: 12px;
white-space: nowrap;
&.silence {
color: #8a5a00;
background: rgba(245, 158, 11, 0.14);
}
&.test {
color: #5b55a0;
background: rgba(99, 102, 241, 0.12);
}
}
.insight-time {
font-size: 12px;
color: var(--text-tertiary);
white-space: nowrap;
}
.insight-body {
margin: 0;
color: var(--text-primary);
font-size: 15px;
line-height: 1.72;
white-space: pre-wrap;
word-break: break-word;
}
.insight-filter-panel {
width: var(--insight-panel-width);
flex-shrink: 0;
padding: 24px 24px 18px;
border-left: 1px solid var(--border-color);
background: color-mix(in srgb, var(--bg-secondary) 70%, var(--bg-primary));
overflow-y: auto;
}
.insight-filter-header {
margin-bottom: 18px;
h3 {
margin: 0;
font-size: 16px;
font-weight: 700;
}
}
.insight-filter-widget {
border: 1px solid var(--border-color);
border-radius: 12px;
background: var(--bg-secondary);
padding: 14px;
margin-bottom: 14px;
}
.insight-widget-title {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-secondary);
font-size: 13px;
font-weight: 700;
margin-bottom: 10px;
}
.insight-widget-count {
margin-left: auto;
color: var(--text-tertiary);
font-weight: 500;
}
.insight-input-wrap {
display: flex;
align-items: center;
gap: 6px;
border-radius: 9px;
background: var(--bg-tertiary);
padding: 0 9px;
input {
min-width: 0;
flex: 1;
height: 38px;
border: none;
outline: none;
background: transparent;
color: var(--text-primary);
font-size: 13px;
}
button {
border: none;
background: transparent;
color: var(--text-tertiary);
cursor: pointer;
display: inline-flex;
padding: 3px;
}
}
.insight-date-tabs {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
button {
height: 34px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-primary);
color: var(--text-secondary);
cursor: pointer;
font-size: 13px;
&.active {
border-color: var(--primary);
color: var(--primary);
background: rgba(91, 147, 144, 0.08);
}
}
}
.insight-custom-dates {
display: grid;
grid-template-columns: 1fr;
gap: 8px;
margin-top: 10px;
input {
height: 34px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-primary);
color: var(--text-primary);
padding: 0 10px;
}
}
.contact-filter {
display: flex;
flex-direction: column;
min-height: 260px;
}
.insight-contact-list {
margin-top: 8px;
display: flex;
flex-direction: column;
gap: 4px;
max-height: 420px;
overflow-y: auto;
}
.insight-contact-row {
width: 100%;
min-height: 42px;
display: flex;
align-items: center;
gap: 9px;
border: none;
border-radius: 9px;
background: transparent;
color: var(--text-secondary);
padding: 7px 8px;
cursor: pointer;
text-align: left;
span {
min-width: 0;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
}
strong {
font-size: 12px;
color: var(--text-tertiary);
font-weight: 600;
}
&:hover,
&.active {
background: var(--bg-tertiary);
color: var(--text-primary);
}
&.all {
margin-top: 10px;
}
}
.insight-empty-state {
min-height: 240px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
color: var(--text-tertiary);
text-align: center;
strong {
color: var(--text-primary);
font-size: 16px;
}
button {
border: 1px solid var(--border-color);
background: var(--bg-secondary);
color: var(--text-primary);
border-radius: 8px;
padding: 7px 12px;
cursor: pointer;
}
}
.insight-modal-overlay {
position: fixed;
inset: 0;
z-index: 1000;
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
}
.insight-log-dialog {
width: min(860px, 92vw);
height: min(780px, 84vh);
display: flex;
flex-direction: column;
border: 1px solid var(--border-color);
border-radius: 14px;
background: var(--bg-secondary);
box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
overflow: hidden;
}
.insight-log-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
padding: 16px 18px;
border-bottom: 1px solid var(--border-color);
background: var(--bg-tertiary);
h3 {
margin: 0 0 4px;
font-size: 16px;
}
span {
color: var(--text-secondary);
font-size: 12px;
}
}
.insight-log-actions {
display: flex;
align-items: center;
gap: 8px;
button {
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-secondary);
color: var(--text-secondary);
min-height: 32px;
padding: 0 10px;
display: inline-flex;
align-items: center;
gap: 6px;
cursor: pointer;
&:hover {
color: var(--text-primary);
background: var(--bg-primary);
}
&.close {
width: 32px;
padding: 0;
justify-content: center;
}
}
}
.insight-log-body {
flex: 1;
overflow-y: auto;
padding: 18px;
background: var(--bg-primary);
section {
margin-bottom: 18px;
}
h4 {
margin: 0 0 8px;
color: var(--text-primary);
font-size: 13px;
font-weight: 700;
}
pre {
margin: 0;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 10px;
background: var(--bg-secondary);
color: var(--text-primary);
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 12px;
line-height: 1.55;
white-space: pre-wrap;
word-break: break-word;
user-select: text;
}
}
.insight-copy-toast {
position: fixed;
left: 50%;
bottom: 26px;
transform: translateX(-50%);
z-index: 1100;
padding: 9px 14px;
border-radius: 999px;
background: rgba(30, 30, 30, 0.88);
color: #fff;
font-size: 13px;
}
@media (max-width: 980px) {
.insight-inbox-page {
flex-direction: column;
}
.insight-filter-panel {
width: auto;
border-left: none;
border-top: 1px solid var(--border-color);
max-height: 42%;
}
.insight-card-header,
.insight-card-actions {
align-items: flex-start;
flex-wrap: wrap;
}
}