feat: persist heaven readings in unified dialog

This commit is contained in:
leefer
2026-07-23 09:51:33 +08:00
parent a517f9d859
commit c62670d46b
10 changed files with 739 additions and 22 deletions
+112
View File
@@ -11604,3 +11604,115 @@ button.account-role-badge:focus-visible { outline: 2px solid var(--blue); outlin
.assistant-stream-caret { animation: none; }
.assistant-messages { scroll-behavior: auto; }
}
.heart-history-button {
min-height: 44px;
position: absolute;
top: 12px;
right: 102px;
z-index: 8;
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 12px;
border: 1px solid rgba(36, 40, 32, .18);
border-radius: 2px;
background: rgba(253, 252, 248, .92);
color: #62675f;
box-shadow: 0 4px 18px rgba(36, 40, 32, .06);
cursor: pointer;
font-family: var(--heaven-serif);
font-size: 11px;
}
.heart-history-button:hover,
.heart-history-button:focus-visible { border-color: rgba(154, 91, 69, .58); color: #824a39; outline: none; }
.heart-history-button .lucide { width: 15px; height: 15px; }
.heart-read-actions { display: flex; gap: 8px; }
.heaven-reading-dialog {
width: min(920px, calc(100vw - 32px));
max-height: min(820px, calc(100dvh - 32px));
overflow: hidden;
background: #fdfcf8;
}
.heaven-reading-tabs {
display: flex;
gap: 4px;
padding: 10px 18px;
border-bottom: 1px solid var(--border);
}
.heaven-reading-tabs button {
min-height: 34px;
padding: 0 12px;
border: 0;
border-bottom: 2px solid transparent;
background: transparent;
color: var(--text-secondary);
cursor: pointer;
font: inherit;
font-size: 12px;
}
.heaven-reading-tabs button.active { border-bottom-color: #9a5b45; color: #6f3f31; font-weight: 700; }
.heaven-reading-tabs button:focus-visible { outline: 2px solid #9a5b45; outline-offset: 1px; }
.heaven-reading-current { min-height: 430px; max-height: calc(100dvh - 170px); overflow-y: auto; padding: 24px 28px 30px; }
.heaven-reading-loading { min-height: 360px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.heaven-reading-loading[hidden] { display: none; }
.heaven-reading-mark {
width: 64px;
height: 64px;
display: grid;
place-items: center;
border: 1px solid rgba(154, 91, 69, .35);
border-radius: 50%;
color: #8b503e;
font-family: var(--heaven-serif);
font-size: 24px;
animation: heaven-reading-breathe 2.4s ease-in-out infinite;
}
@keyframes heaven-reading-breathe { 50% { opacity: .55; box-shadow: 0 0 0 10px rgba(154, 91, 69, .05); } }
.heaven-reading-loading strong { margin-top: 8px; color: #343a35; font-family: var(--heaven-serif); font-size: 18px; letter-spacing: 0; }
.heaven-reading-loading small { color: var(--text-secondary); }
.heaven-reading-result > header,
.heaven-reading-history-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.heaven-reading-result > header span,
.heaven-reading-history-detail > header span { color: #9a5b45; font-family: var(--heaven-serif); font-size: 12px; font-weight: 700; }
.heaven-reading-result h3,
.heaven-reading-history-detail h3 { margin: 5px 0 0; color: #2d332e; font-family: var(--heaven-serif); font-size: 22px; font-weight: 600; letter-spacing: 0; }
.heaven-reading-result time,
.heaven-reading-history-detail time { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.heaven-reading-result > p,
.heaven-reading-history-detail > p { margin: 12px 0 0; color: var(--text-secondary); font-size: 12px; }
.heaven-reading-answer { margin-top: 24px; color: #303833; font-family: var(--heaven-serif); font-size: 15px; line-height: 1.95; }
.heaven-reading-answer .mentor-answer-heading { color: #713f31; }
.heaven-reading-history { min-height: 500px; max-height: calc(100dvh - 170px); display: grid; grid-template-columns: 270px minmax(0, 1fr); overflow: hidden; }
.heaven-reading-history[hidden] { display: none; }
.heaven-reading-history-list-wrap { min-width: 0; overflow-y: auto; border-right: 1px solid var(--border); background: rgba(246, 244, 237, .72); }
.heaven-reading-history-heading { display: flex; justify-content: space-between; gap: 10px; padding: 15px 16px 10px; color: var(--text-secondary); font-size: 11px; }
.heaven-reading-history-heading strong { color: var(--text); font-size: 13px; }
.heaven-reading-history-list { display: grid; }
.heaven-reading-history-item { display: grid; gap: 4px; width: 100%; padding: 13px 16px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.heaven-reading-history-item:hover,
.heaven-reading-history-item.active { background: #fff; box-shadow: inset 3px 0 #9a5b45; }
.heaven-reading-history-item:focus-visible { outline: 2px solid #9a5b45; outline-offset: -2px; }
.heaven-reading-history-item span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.heaven-reading-history-item small,
.heaven-reading-history-item time { overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.heaven-reading-history-detail { min-width: 0; overflow-y: auto; padding: 24px 28px; }
.heaven-reading-history-detail footer { display: flex; justify-content: flex-end; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--border); }
@media (max-width: 720px) {
.heart-history-button { top: 8px; right: 60px; min-width: 42px; padding: 0 10px; }
.heart-history-button span { display: none; }
.heart-read-actions { flex-wrap: wrap; justify-content: flex-end; }
.heaven-reading-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: 8px auto; }
.heaven-reading-current { min-height: 360px; max-height: calc(100dvh - 150px); padding: 20px 17px 24px; }
.heaven-reading-history { min-height: 0; max-height: calc(100dvh - 150px); grid-template-columns: 1fr; overflow-y: auto; }
.heaven-reading-history-list-wrap { max-height: 210px; border-right: 0; border-bottom: 1px solid var(--border); }
.heaven-reading-history-detail { overflow: visible; padding: 20px 17px 24px; }
.heaven-reading-result > header,
.heaven-reading-history-detail > header { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
.heaven-reading-mark { animation: none; }
}