Files
CipherTalk/src/components/TitleBar.scss
T
2026-04-06 22:00:46 +08:00

175 lines
2.7 KiB
SCSS

.title-bar {
height: 41px;
background: var(--bg-secondary);
display: grid;
grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
align-items: center;
padding-left: 16px;
padding-right: 144px; // 为窗口控件留空间
border-bottom: 1px solid var(--border-color);
-webkit-app-region: drag;
flex-shrink: 0;
&.is-mac {
padding-left: 84px;
padding-right: 16px;
}
}
.title-bar-left {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.title-bar-center {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
min-width: 0;
.titles {
max-width: 360px;
}
}
.title-bar-traffic-spacer {
width: 68px;
height: 12px;
flex-shrink: 0;
}
.update-status {
display: flex;
align-items: center;
gap: 6px;
margin-left: 8px;
padding: 2px 8px;
background: rgba(0, 120, 212, 0.08);
border-radius: 4px;
}
.update-indicator {
color: #0078d4;
animation: spin 1s linear infinite;
flex-shrink: 0;
display: inline-block !important;
}
.update-text {
font-size: 11px;
color: #0078d4;
font-weight: 500;
white-space: nowrap;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.title-bar-right {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
min-width: 0;
-webkit-app-region: no-drag;
}
.title-logo {
width: 20px;
height: 20px;
object-fit: contain;
}
.titles {
font-size: 15px;
font-weight: 500;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 600px;
}
.title-bar.is-mac {
.title-bar-left {
justify-content: flex-start;
}
.title-bar-right {
overflow: hidden;
}
.update-status {
margin-left: 0;
max-width: 280px;
}
}
// 导出页面标签切换
.export-tabs {
display: flex;
gap: 2px;
padding: 3px;
background: var(--bg-tertiary);
border-radius: 999px;
}
@media (max-width: 960px) {
.title-bar {
grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
}
.title-bar.is-mac {
padding-left: 76px;
}
.title-bar.is-mac .title-bar-center .titles {
max-width: 220px;
}
.update-status {
.update-text {
display: none;
}
}
}
.export-tab {
display: flex;
align-items: center;
gap: 5px;
padding: 4px 12px;
background: transparent;
border: none;
border-radius: 999px;
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
&:hover {
color: var(--text-primary);
}
&.active {
background: var(--card-bg);
color: var(--text-primary);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
svg {
flex-shrink: 0;
}
}