mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
273 lines
7.8 KiB
CSS
273 lines
7.8 KiB
CSS
/* ==========================================================================
|
||
应用外壳:顶栏 / 页面滑动轨 / M3 导航栏 / 操作锁横幅 / snackbar
|
||
========================================================================== */
|
||
|
||
#app {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
max-width: 600px;
|
||
margin: 0 auto;
|
||
height: calc(100dvh / 0.95);
|
||
overflow: hidden;
|
||
background-color: var(--md-sys-color-background);
|
||
}
|
||
|
||
/* ── M3 small top app bar ─────────────────────────────────────────── */
|
||
.app-bar {
|
||
position: relative;
|
||
z-index: 3;
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--md-sys-spacing-1);
|
||
min-height: 64px;
|
||
padding: var(--md-sys-spacing-2) var(--md-sys-spacing-1) var(--md-sys-spacing-2)
|
||
var(--md-sys-spacing-4);
|
||
background-color: var(--md-sys-color-surface);
|
||
transition: background-color var(--md-sys-motion-duration-medium2)
|
||
var(--md-sys-motion-easing-standard);
|
||
}
|
||
|
||
.app-bar.scrolled {
|
||
background-color: var(--md-sys-color-surface-container);
|
||
}
|
||
|
||
.app-bar__text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
|
||
.app-bar__title {
|
||
margin: 0;
|
||
color: var(--md-sys-color-on-surface);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--md-sys-spacing-2);
|
||
}
|
||
|
||
.app-bar__subtitle {
|
||
color: var(--md-sys-color-on-surface-variant);
|
||
}
|
||
|
||
/* 发布通道徽标(Beta / Dev) */
|
||
.channel-badge {
|
||
flex: 0 0 auto;
|
||
padding: 2px 8px;
|
||
border-radius: var(--md-sys-shape-corner-full);
|
||
background-color: var(--lp-color-warning-container);
|
||
color: var(--lp-color-warning);
|
||
font-size: var(--md-sys-typescale-label-small-size);
|
||
line-height: var(--md-sys-typescale-label-small-line-height);
|
||
font-weight: 700;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
/* 守护进程状态胶囊 */
|
||
.status-pill {
|
||
flex: 0 0 auto;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 4px 10px;
|
||
border-radius: var(--md-sys-shape-corner-full);
|
||
background-color: var(--md-sys-color-surface-container-high);
|
||
color: var(--md-sys-color-on-surface-variant);
|
||
font-size: var(--md-sys-typescale-label-small-size);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.status-pill__dot {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
background-color: var(--md-sys-color-outline);
|
||
}
|
||
|
||
.status-pill.running .status-pill__dot {
|
||
background-color: var(--lp-color-success);
|
||
box-shadow: 0 0 8px var(--lp-color-success-container);
|
||
animation: status-pulse 2.4s var(--md-sys-motion-easing-standard) infinite;
|
||
}
|
||
|
||
.status-pill.paused .status-pill__dot {
|
||
background-color: var(--lp-color-warning);
|
||
}
|
||
|
||
.status-pill.stopped .status-pill__dot {
|
||
background-color: var(--md-sys-color-error);
|
||
animation: status-pulse 2s var(--md-sys-motion-easing-standard) infinite;
|
||
}
|
||
|
||
@keyframes status-pulse {
|
||
0%,
|
||
100% {
|
||
opacity: 1;
|
||
}
|
||
50% {
|
||
opacity: 0.45;
|
||
}
|
||
}
|
||
|
||
.app-bar__actions {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
}
|
||
|
||
/* ── 页面滑动轨 ───────────────────────────────────────────────────── */
|
||
.page-viewport {
|
||
flex: 1;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
.page-track {
|
||
display: flex;
|
||
height: 100%;
|
||
transition: transform var(--md-sys-motion-duration-medium4)
|
||
var(--md-sys-motion-easing-emphasized);
|
||
will-change: transform;
|
||
}
|
||
|
||
.page-slide {
|
||
flex: 0 0 100%;
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: var(--md-sys-spacing-3);
|
||
padding: var(--md-sys-spacing-3) var(--md-sys-spacing-3)
|
||
calc(var(--md-sys-spacing-5) + var(--safe-area-inset-bottom, 0px));
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
/* ── M3 导航栏 ────────────────────────────────────────────────────── */
|
||
md-navigation-bar {
|
||
flex: 0 0 auto;
|
||
--md-navigation-bar-container-color: var(--md-sys-color-surface-container);
|
||
--md-navigation-bar-active-indicator-color: var(--md-sys-color-secondary-container);
|
||
--md-navigation-bar-active-icon-color: var(--md-sys-color-on-secondary-container);
|
||
--md-navigation-bar-active-label-text-color: var(--md-sys-color-on-surface);
|
||
--md-navigation-bar-inactive-icon-color: var(--md-sys-color-on-surface-variant);
|
||
--md-navigation-bar-inactive-label-text-color: var(--md-sys-color-on-surface-variant);
|
||
}
|
||
|
||
md-navigation-tab {
|
||
--md-navigation-tab-active-indicator-shape: var(--md-sys-shape-corner-full);
|
||
}
|
||
|
||
/* ── 操作锁横幅 ───────────────────────────────────────────────────── */
|
||
.oplock-banner {
|
||
/* 参与正常流(并排在顶栏之前):出现时把内容整体下推,而不是盖住顶栏 */
|
||
order: -1;
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--md-sys-spacing-2);
|
||
padding: var(--md-sys-spacing-2) var(--md-sys-spacing-4);
|
||
background-color: var(--md-sys-color-surface-container-highest);
|
||
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
||
color: var(--md-sys-color-on-surface);
|
||
}
|
||
|
||
.oplock-banner__spinner {
|
||
flex: 0 0 auto;
|
||
width: 16px;
|
||
height: 16px;
|
||
border: 2px solid var(--md-sys-color-primary);
|
||
border-top-color: transparent;
|
||
border-radius: 50%;
|
||
animation: oplock-spin 0.8s linear infinite;
|
||
}
|
||
|
||
@keyframes oplock-spin {
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
.oplock-banner__text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
font-size: var(--md-sys-typescale-title-small-size);
|
||
line-height: var(--md-sys-typescale-title-small-line-height);
|
||
font-weight: var(--md-sys-typescale-title-small-weight);
|
||
}
|
||
|
||
.oplock-banner__elapsed {
|
||
font-family: var(--md-sys-typescale-font-mono);
|
||
font-size: var(--md-sys-typescale-label-medium-size);
|
||
color: var(--md-sys-color-on-surface-variant);
|
||
}
|
||
|
||
.oplock-enter-active,
|
||
.oplock-leave-active {
|
||
transition:
|
||
opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
|
||
transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
|
||
}
|
||
|
||
.oplock-enter-from,
|
||
.oplock-leave-to {
|
||
opacity: 0;
|
||
transform: translateY(-100%);
|
||
}
|
||
|
||
/* ── Snackbar(M3:反色表面 + 4dp 圆角)───────────────────────────── */
|
||
.snackbar-host {
|
||
position: absolute;
|
||
left: var(--md-sys-spacing-3);
|
||
right: var(--md-sys-spacing-3);
|
||
bottom: calc(96px + var(--safe-area-inset-bottom, 0px));
|
||
z-index: 7;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: var(--md-sys-spacing-2);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.snackbar {
|
||
pointer-events: auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--md-sys-spacing-3);
|
||
width: 100%;
|
||
min-height: 48px;
|
||
padding: var(--md-sys-spacing-3) var(--md-sys-spacing-4);
|
||
border-radius: var(--md-sys-shape-corner-extra-small);
|
||
background-color: var(--md-sys-color-inverse-surface);
|
||
color: var(--md-sys-color-inverse-on-surface);
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
||
font-size: var(--md-sys-typescale-body-medium-size);
|
||
line-height: var(--md-sys-typescale-body-medium-line-height);
|
||
}
|
||
|
||
.snackbar-enter-active,
|
||
.snackbar-leave-active {
|
||
transition:
|
||
opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard),
|
||
transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized-decelerate);
|
||
}
|
||
|
||
.snackbar-enter-from,
|
||
.snackbar-leave-to {
|
||
opacity: 0;
|
||
transform: translateY(16px);
|
||
}
|
||
|
||
/* ── 对话框:宽屏居中、窄屏留边 ───────────────────────────────────── */
|
||
md-dialog {
|
||
--md-dialog-container-shape: var(--md-sys-shape-corner-extra-large);
|
||
max-width: min(560px, calc(100vw - 48px));
|
||
max-height: calc(100dvh - 96px);
|
||
}
|