修改换行逻辑和段落查看方式
This commit is contained in:
+201
-33
@@ -16,19 +16,20 @@
|
||||
|
||||
/*
|
||||
* Item pane section header buttons (open in window, adaptive height).
|
||||
* Lucide-style icons are stroke-based (context-stroke); Zotero only enables
|
||||
* fill context on .section-custom-button by default, so strokes stay invisible
|
||||
* in light and dark themes until stroke is wired to currentColor.
|
||||
* Icons use fill="context-fill" like native Zotero toolbar SVGs.
|
||||
*/
|
||||
collapsible-section[custom][data-pane="chatpapers-chat"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section[custom][data-pane="chatpapers-lecture"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-adaptive-height > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-fixed-height > .head toolbarbutton.section-custom-button {
|
||||
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity;
|
||||
-moz-context-properties: fill, fill-opacity;
|
||||
fill: currentColor;
|
||||
stroke: currentColor;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
collapsible-section[custom][data-pane="chatpapers-chat"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section[custom][data-pane="chatpapers-lecture"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-adaptive-height > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-fixed-height > .head toolbarbutton.section-custom-button {
|
||||
list-style-image: var(--custom-button-icon-light);
|
||||
@@ -36,6 +37,8 @@ collapsible-section.chatpapers-fixed-height > .head toolbarbutton.section-custom
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
collapsible-section[custom][data-pane="chatpapers-chat"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section[custom][data-pane="chatpapers-lecture"] > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-adaptive-height > .head toolbarbutton.section-custom-button,
|
||||
collapsible-section.chatpapers-fixed-height > .head toolbarbutton.section-custom-button {
|
||||
list-style-image: var(--custom-button-icon-dark);
|
||||
@@ -75,7 +78,7 @@ collapsible-section[open] > :not(.head) .chatpapers-root {
|
||||
}
|
||||
|
||||
collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
min-height: 180px;
|
||||
min-height: 320px;
|
||||
}
|
||||
|
||||
.chatpapers-header {
|
||||
@@ -824,6 +827,46 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
/* --- Voice lecture pane --- */
|
||||
.chatpapers-lecture-root {
|
||||
gap: 10px;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
width: 100%;
|
||||
min-height: 150px;
|
||||
max-height: min(260px, 34vh);
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list.chatpapers-lecture-scroll-y,
|
||||
.chatpapers-lecture-para-detail.chatpapers-lecture-scroll-y {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: color-mix(in srgb, currentColor 32%, transparent) transparent;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list.chatpapers-lecture-scroll-y::-webkit-scrollbar,
|
||||
.chatpapers-lecture-para-detail.chatpapers-lecture-scroll-y::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list.chatpapers-lecture-scroll-y::-webkit-scrollbar-thumb,
|
||||
.chatpapers-lecture-para-detail.chatpapers-lecture-scroll-y::-webkit-scrollbar-thumb {
|
||||
background: color-mix(in srgb, currentColor 28%, transparent);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list.chatpapers-lecture-scroll-y::-webkit-scrollbar-track,
|
||||
.chatpapers-lecture-para-detail.chatpapers-lecture-scroll-y::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-empty {
|
||||
@@ -1015,7 +1058,7 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
outline: 1px solid rgba(31, 122, 140, 0.35);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-sentence-item .chatpapers-lecture-beat-title {
|
||||
.chatpapers-lecture-sentence-item .chatpapers-lecture-beat-preview {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -1032,12 +1075,21 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
}
|
||||
|
||||
.chatpapers-lecture-sentence-chip {
|
||||
appearance: none;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid color-mix(in srgb, #1f7a8c 20%, transparent);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
font-size: 11px;
|
||||
line-height: 1.35;
|
||||
color: inherit;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-sentence-chip.is-active {
|
||||
@@ -1062,8 +1114,54 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
border: 1px solid color-mix(in srgb, #1f7a8c 15%, transparent);
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-detail:not(.is-empty) {
|
||||
min-height: 140px;
|
||||
max-height: min(300px, 38vh);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-detail.is-empty {
|
||||
min-height: auto;
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-original,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-translation,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-context,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-role,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-kind,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-pdf-sync-hint {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
overflow-x: hidden;
|
||||
max-width: 100%;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-original-label,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-translation-label,
|
||||
.chatpapers-lecture-para-detail .chatpapers-lecture-para-context-label {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-detail-empty {
|
||||
opacity: 0.72;
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
text-align: center;
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-para-play-btn {
|
||||
align-self: flex-start;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-selection-explain {
|
||||
@@ -1135,6 +1233,10 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin-top: 4px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-player-title {
|
||||
@@ -1143,31 +1245,82 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
.chatpapers-lecture-para-list-hint {
|
||||
font-size: 11px;
|
||||
opacity: 0.68;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
align-items: stretch;
|
||||
gap: 4px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
min-height: 40px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid color-mix(in srgb, #1f7a8c 18%, transparent);
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, #1f7a8c 4%, transparent);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-main {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
min-height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
color: inherit;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-main:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, #1f7a8c 10%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-main:disabled {
|
||||
opacity: 0.55;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-play {
|
||||
flex-shrink: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 34px;
|
||||
align-self: stretch;
|
||||
border: none;
|
||||
border-left: 1px solid color-mix(in srgb, #1f7a8c 18%, transparent);
|
||||
background: color-mix(in srgb, #1f7a8c 6%, transparent);
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, #1f7a8c 10%, transparent);
|
||||
.chatpapers-lecture-beat-play:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, #1f7a8c 16%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-play:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item.is-selected {
|
||||
border-color: color-mix(in srgb, #2563eb 45%, transparent);
|
||||
background: color-mix(in srgb, #2563eb 8%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item.is-active {
|
||||
@@ -1175,38 +1328,53 @@ collapsible-section[open] > :not(.head) .chatpapers-lecture-root {
|
||||
background: color-mix(in srgb, #16a34a 10%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item.is-selected.is-active {
|
||||
border-color: color-mix(in srgb, #16a34a 50%, transparent);
|
||||
box-shadow: inset 3px 0 0 color-mix(in srgb, #2563eb 70%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-item.is-pending {
|
||||
opacity: 0.55;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-meta {
|
||||
.chatpapers-lecture-beat-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-type {
|
||||
font-size: 10px;
|
||||
.chatpapers-lecture-beat-label {
|
||||
flex-shrink: 0;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
opacity: 0.65;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
line-height: 1.3;
|
||||
opacity: 0.72;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-title {
|
||||
.chatpapers-lecture-beat-preview {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-beat-status {
|
||||
flex-shrink: 0;
|
||||
align-self: center;
|
||||
font-size: 11px;
|
||||
line-height: 1;
|
||||
opacity: 0.7;
|
||||
max-width: 4.5em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.chatpapers-lecture-player-controls {
|
||||
|
||||
Reference in New Issue
Block a user