style: web-bak页面设计优化,采用浅色设计语言
- index.css: 添加CSS自定义属性设计系统色彩令牌 - App.css: 所有组件样式更新为CSS自定义属性 - App.tsx: 主题配置更新,通知位置改为右上角 - LoginPage.tsx: 重新设计登录页面 - RemoteControlApp.tsx: 移除所有emoji,替换硬编码颜色 - AuthGuard.tsx: 移除emoji,替换渐变背景 - InstallPage.tsx: 移除emoji,替换硬编码颜色 - DeviceFilter.tsx: 替换硬编码颜色 - DeviceInfoCard.tsx: 替换硬编码颜色 - GalleryView.tsx: 移除emoji,替换硬编码颜色 - ScreenReader.tsx: 移除所有emoji,替换注释为英文
This commit is contained in:
452
src/App.css
452
src/App.css
@@ -1,335 +1,343 @@
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 主布局自适应 */
|
||||
/* Main layout */
|
||||
.app-layout {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Header 响应式 */
|
||||
/* Header */
|
||||
.app-header {
|
||||
padding: 0 24px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
flex-shrink: 0;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
z-index: 10;
|
||||
padding: 0 24px;
|
||||
background: var(--md-surface-container);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: var(--md-elevation-1);
|
||||
flex-shrink: 0;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
z-index: 10;
|
||||
border-bottom: 1px solid var(--md-outline-variant);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.app-header {
|
||||
padding: 0 12px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
.app-header {
|
||||
padding: 0 12px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 侧边栏 */
|
||||
/* Sidebar */
|
||||
.app-sider {
|
||||
background: #fff !important;
|
||||
border-right: 1px solid #f0f0f0;
|
||||
box-shadow: 2px 0 8px rgba(0,0,0,0.04);
|
||||
background: var(--md-surface-container-low) !important;
|
||||
border-right: 1px solid var(--md-outline-variant);
|
||||
}
|
||||
|
||||
.app-sider .ant-menu {
|
||||
border-right: 0;
|
||||
background: transparent;
|
||||
border-right: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
/* Content area */
|
||||
.app-content {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 设备列表页 */
|
||||
/* Device list page */
|
||||
.device-list-page {
|
||||
padding: 20px;
|
||||
background: #f0f2f5;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
padding: 20px;
|
||||
background: var(--md-surface);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.device-list-page {
|
||||
padding: 12px;
|
||||
}
|
||||
.device-list-page {
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.device-list-card {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.08);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
background: var(--md-surface-container-lowest);
|
||||
border-radius: var(--md-shape-md);
|
||||
padding: 20px;
|
||||
box-shadow: var(--md-elevation-1);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
border: 1px solid var(--md-outline-variant);
|
||||
}
|
||||
|
||||
/* 筛选栏响应式 */
|
||||
/* Filter bar */
|
||||
.device-filter-bar {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
|
||||
border: 1px solid #f0f0f0;
|
||||
background: var(--md-surface-container-low);
|
||||
border-radius: var(--md-shape-sm);
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 16px;
|
||||
border: 1px solid var(--md-outline-variant);
|
||||
}
|
||||
|
||||
.device-filter-bar .ant-form-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.device-filter-bar .ant-form-inline .ant-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.device-filter-bar .ant-form-inline .ant-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
/* Empty state */
|
||||
.device-empty-state {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: #8c8c8c;
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: var(--md-on-surface-variant);
|
||||
}
|
||||
|
||||
/* 独立控制页面 - 全屏自适应 */
|
||||
/* Standalone control page */
|
||||
.standalone-control-page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background: #f0f2f5;
|
||||
overflow: hidden;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background: var(--md-surface);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 控制页左侧屏幕区域 */
|
||||
/* Control screen area */
|
||||
.control-screen-area {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-lowest);
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 工具栏 */
|
||||
/* Toolbar */
|
||||
.control-toolbar {
|
||||
padding: 6px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
background: #fafafa;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
min-height: 40px;
|
||||
padding: 6px 12px;
|
||||
border-bottom: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-low);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.control-toolbar .ant-btn {
|
||||
font-size: 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.control-toolbar {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.control-toolbar .ant-btn {
|
||||
font-size: 11px;
|
||||
padding: 0 6px;
|
||||
}
|
||||
.control-toolbar {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.control-toolbar .ant-btn {
|
||||
font-size: 11px;
|
||||
padding: 0 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 屏幕+阅读器水平布局 */
|
||||
/* Screen + reader horizontal layout */
|
||||
.screen-reader-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.screen-reader-panel {
|
||||
width: 50%;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 50%;
|
||||
border-right: 1px solid var(--md-outline-variant);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--md-surface-container-low);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.device-screen-panel {
|
||||
width: 50%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 50%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--md-surface-container);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 文本输入区域 */
|
||||
/* Text input bar */
|
||||
.text-input-bar {
|
||||
height: 44px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fff;
|
||||
padding: 6px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
height: 44px;
|
||||
border-top: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-lowest);
|
||||
padding: 6px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.text-input-bar input {
|
||||
flex: 1;
|
||||
height: 30px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
transition: border-color 0.2s;
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid var(--md-outline-variant);
|
||||
border-radius: var(--md-shape-full);
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
background: var(--md-surface-container-low);
|
||||
color: var(--md-on-surface);
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.text-input-bar input:focus {
|
||||
border-color: #1890ff;
|
||||
box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
|
||||
border-color: var(--md-primary);
|
||||
box-shadow: 0 0 0 2px rgba(91, 95, 199, 0.12);
|
||||
}
|
||||
|
||||
.text-input-bar input::placeholder {
|
||||
color: var(--md-on-surface-variant);
|
||||
}
|
||||
|
||||
.text-input-bar button {
|
||||
height: 30px;
|
||||
padding: 0 14px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: #1890ff;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: background 0.2s;
|
||||
height: 32px;
|
||||
padding: 0 16px;
|
||||
border: none;
|
||||
border-radius: var(--md-shape-full);
|
||||
background: var(--md-primary);
|
||||
color: var(--md-on-primary);
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: background 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.text-input-bar button:hover:not(:disabled) {
|
||||
background: #40a9ff;
|
||||
box-shadow: var(--md-elevation-1);
|
||||
filter: brightness(1.08);
|
||||
}
|
||||
|
||||
.text-input-bar button:disabled {
|
||||
background: #f5f5f5;
|
||||
color: #bfbfbf;
|
||||
cursor: not-allowed;
|
||||
background: var(--md-surface-container-highest);
|
||||
color: var(--md-outline);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* 系统按键区域 */
|
||||
/* System keys bar */
|
||||
.system-keys-bar {
|
||||
padding: 8px 12px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border-top: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-lowest);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.system-keys-bar .ant-btn {
|
||||
min-width: 72px;
|
||||
height: 34px;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
min-width: 72px;
|
||||
height: 34px;
|
||||
border-radius: var(--md-shape-full);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* 右侧控制面板 */
|
||||
/* Right control panel */
|
||||
.control-panel-area {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--md-surface-container-lowest);
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.control-panel-header {
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
background: #fafafa;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-low);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: var(--md-on-surface);
|
||||
}
|
||||
|
||||
.control-panel-body {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 底部状态栏 */
|
||||
/* Bottom status bar */
|
||||
.screen-reader-status-bar {
|
||||
padding: 3px 12px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fafafa;
|
||||
font-size: 11px;
|
||||
color: #8c8c8c;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 12px;
|
||||
border-top: 1px solid var(--md-outline-variant);
|
||||
background: var(--md-surface-container-low);
|
||||
font-size: 11px;
|
||||
color: var(--md-on-surface-variant);
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 移动端遮罩 */
|
||||
/* Mobile overlay */
|
||||
.mobile-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0,0,0,0.45);
|
||||
z-index: 999;
|
||||
animation: fadeIn 0.2s ease;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.32);
|
||||
z-index: 999;
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
/* 移动端侧边栏 */
|
||||
/* Mobile sidebar */
|
||||
@media (max-width: 768px) {
|
||||
.ant-layout-sider {
|
||||
position: fixed !important;
|
||||
height: 100vh !important;
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
|
||||
.ant-layout-header {
|
||||
padding: 0 12px !important;
|
||||
}
|
||||
.ant-layout-sider {
|
||||
position: fixed !important;
|
||||
height: 100vh !important;
|
||||
z-index: 1000 !important;
|
||||
}
|
||||
.ant-layout-header {
|
||||
padding: 0 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格自适应 */
|
||||
/* Table responsive */
|
||||
.ant-table-wrapper {
|
||||
overflow-x: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.ant-table {
|
||||
font-size: 13px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user