Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions desktop/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,8 @@ const en: Dict = {
'read.showDetails': 'Show details',

'author.docTabs': 'Open documents',
'author.tabsScrollBack': 'Scroll to earlier documents',
'author.tabsScrollForward': 'Scroll to later documents',
'author.words_one': '{n} word',
'author.words_other': '{n} words',
'author.placeholder': 'Write in Markdown — $math$ and ```code``` supported…',
Expand Down Expand Up @@ -3711,6 +3713,8 @@ const zh: Dict = {
'read.showDetails': '显示详情',

'author.docTabs': '打开的文档',
'author.tabsScrollBack': '滚动到较早的文档',
'author.tabsScrollForward': '滚动到较后的文档',
'author.words': '{n} 词',
'author.placeholder': '用 Markdown 撰写 — 支持 $数学$ 与 ```代码```…',
'author.empty': '暂无可预览内容。',
Expand Down
166 changes: 166 additions & 0 deletions desktop/src/styles/partials/09-canvas-tail.css
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,172 @@
display: flex;
flex-direction: column;
}
/* Author's document strip is denser than the Reader's mixed-content tabs, but
filenames must remain recognizable. Fixed-width tabs scroll instead of
collapsing into icon/close-button noise; edge controls make that overflow
discoverable without leaving a permanent scrollbar in the workbench chrome. */
.author-tabs-shell {
flex: 0 0 38px;
min-width: 0;
display: flex;
align-items: stretch;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.author-tabs-shell .author-doc-tabs {
flex: 1;
min-width: 0;
gap: 3px;
padding: 5px 7px 0;
border-bottom: 0;
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: none;
scroll-behavior: smooth;
overscroll-behavior-inline: contain;
}
.author-doc-tabs::-webkit-scrollbar {
display: none;
}
.author-doc-tabs .read-tabitem {
position: relative;
flex: 0 0 clamp(148px, 16vw, 208px);
min-width: 0;
height: 32px;
max-width: none;
border-color: transparent;
border-radius: 7px 7px 0 0;
transition: color 120ms var(--ease), background 120ms var(--ease), border-color 120ms var(--ease);
}
.author-doc-tabs .read-tabitem::before {
content: '';
position: absolute;
z-index: 1;
top: 0;
left: 10px;
right: 10px;
height: 2px;
border-radius: 0 0 2px 2px;
background: var(--accent);
opacity: 0;
transform: scaleX(0.55);
transition: opacity 120ms var(--ease), transform 120ms var(--ease);
}
.author-doc-tabs .read-tabitem:hover:not(.active) {
color: var(--text);
background: var(--hover);
}
.author-doc-tabs .read-tabitem.active {
background: var(--bg);
border-color: var(--border);
}
.author-doc-tabs .read-tabitem.active::before {
opacity: 1;
transform: scaleX(1);
}
.author-doc-tabs .read-tabitem-label {
flex: 1;
gap: 7px;
min-width: 0;
padding: 0 4px 0 10px;
letter-spacing: -0.005em;
}
.author-doc-tabs .read-tabitem-kind {
color: var(--text-muted);
transition: color 120ms var(--ease);
}
.author-doc-tabs .active .read-tabitem-kind {
color: var(--accent-text);
}
.author-tab-title {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.author-tab-dirty {
flex: 0 0 6px;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--warn);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 13%, transparent);
}
.author-doc-tabs .read-tabitem-badge {
flex: none;
margin-left: 0;
padding: 0 4px;
line-height: 16px;
color: var(--text-secondary);
background: var(--raised);
}
.author-doc-tabs .read-tabitem-agent {
flex: 0 0 20px;
width: 20px;
height: 20px;
display: inline-flex;
align-items: center;
justify-content: center;
margin: 0 1px 0 0;
padding: 0;
border-radius: 5px;
}
.author-doc-tabs .read-tabitem-agent:hover {
background: var(--accent-strong);
}
.author-doc-tabs .read-tabitem-x {
flex: 0 0 22px;
width: 22px;
height: 22px;
margin-right: 4px;
padding: 0;
border-radius: 5px;
opacity: 0;
transition: opacity 120ms var(--ease), color 120ms var(--ease), background 120ms var(--ease);
}
.author-doc-tabs .read-tabitem:hover .read-tabitem-x,
.author-doc-tabs .read-tabitem.active .read-tabitem-x,
.author-doc-tabs .read-tabitem-x:focus-visible,
.author-doc-tabs .read-tabitem-x.danger {
opacity: 0.72;
}
.author-doc-tabs .read-tabitem-x:hover {
color: var(--text);
background: var(--hover);
opacity: 1;
}
.author-doc-tabs .read-tabitem-x.danger {
color: var(--danger);
background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.author-tab-scroll {
flex: 0 0 28px;
width: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
color: var(--text-secondary);
background: var(--surface);
border: 0;
cursor: pointer;
}
.author-tab-scroll.before {
border-right: 1px solid var(--border);
}
.author-tab-scroll.after {
border-left: 1px solid var(--border);
}
.author-tab-scroll:hover:not(:disabled) {
color: var(--text);
background: var(--hover);
}
.author-tab-scroll:disabled {
color: var(--text-muted);
opacity: 0.3;
cursor: default;
}
.author-nav-col {
flex: none;
min-height: 0;
Expand Down
Loading
Loading