385 lines
6.2 KiB
CSS
385 lines
6.2 KiB
CSS
/* SFTP Manager 自定义样式 */
|
|
/* 全局样式 */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
background-color: #f5f5f5;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 应用容器 */
|
|
.app-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
background-color: #fff;
|
|
}
|
|
|
|
/* 导航栏 */
|
|
.navbar {
|
|
flex-shrink: 0;
|
|
padding: 8px 16px;
|
|
min-height: 48px;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* 工具栏 */
|
|
.toolbar {
|
|
flex-shrink: 0;
|
|
padding: 8px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
min-height: 44px;
|
|
}
|
|
|
|
/* 传输进度(上传/下载/跨面板传输) */
|
|
.transfer-progress {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
vertical-align: middle;
|
|
gap: 8px;
|
|
}
|
|
|
|
.transfer-progress-label {
|
|
font-size: 12px;
|
|
color: #333;
|
|
max-width: 200px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.transfer-progress .progress {
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.transfer-progress .progress-bar {
|
|
transition: width 0.3s ease;
|
|
font-size: 11px;
|
|
line-height: 20px;
|
|
text-align: center;
|
|
color: white;
|
|
background-color: #0d6efd;
|
|
}
|
|
|
|
/* 双面板容器 */
|
|
.panels-container {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 面板 */
|
|
.panel {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-right: 1px solid #dee2e6;
|
|
overflow: hidden;
|
|
min-width: 0;
|
|
}
|
|
|
|
.panel:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
/* 拖拽上传效果 */
|
|
.panel.drag-over {
|
|
background-color: #e7f3ff;
|
|
border: 2px dashed #0d6efd;
|
|
}
|
|
|
|
/* 面板头部 */
|
|
.panel-header {
|
|
flex-shrink: 0;
|
|
padding: 8px;
|
|
background-color: #e9ecef;
|
|
border-bottom: 1px solid #dee2e6;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.panel-mode {
|
|
flex: 1;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.connection-select {
|
|
flex: 2;
|
|
min-width: 120px;
|
|
}
|
|
|
|
/* 连接状态指示器 */
|
|
.connection-status {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.status-dot[data-status="connected"] {
|
|
background-color: #198754;
|
|
}
|
|
|
|
.status-dot[data-status="disconnected"] {
|
|
background-color: #dc3545;
|
|
}
|
|
|
|
.status-dot[data-status="connecting"] {
|
|
background-color: #ffc107;
|
|
animation: pulse 1s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
.connection-status .status-text {
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
.connection-status.connected .status-text {
|
|
color: #198754;
|
|
}
|
|
|
|
.connection-status.disconnected .status-text {
|
|
color: #dc3545;
|
|
}
|
|
|
|
.connection-status.connecting .status-text {
|
|
color: #ffc107;
|
|
}
|
|
|
|
/* 路径栏 */
|
|
.path-bar {
|
|
flex-shrink: 0;
|
|
padding: 8px;
|
|
display: flex;
|
|
gap: 8px;
|
|
background-color: #fff;
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
.path-input {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* 文件列表 */
|
|
.file-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
background-color: #fff;
|
|
}
|
|
|
|
/* 文件列表拖拽悬停效果 */
|
|
.file-list.drag-over {
|
|
background-color: #e7f3ff;
|
|
outline: 2px dashed #0d6efd;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* 文件项拖拽中 */
|
|
.file-item.dragging {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* 文件项 */
|
|
.file-item {
|
|
padding: 8px 12px;
|
|
min-height: 44px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
transition: background-color 0.15s;
|
|
user-select: none;
|
|
}
|
|
|
|
.file-item:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.file-item.selected {
|
|
background-color: #0d6efd;
|
|
color: white;
|
|
}
|
|
|
|
.file-icon {
|
|
margin-right: 10px;
|
|
width: 24px;
|
|
text-align: center;
|
|
font-size: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.file-name {
|
|
flex: 1;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.file-size {
|
|
margin-left: 10px;
|
|
min-width: 80px;
|
|
text-align: right;
|
|
font-size: 12px;
|
|
color: #666;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.file-date {
|
|
margin-left: 10px;
|
|
min-width: 140px;
|
|
text-align: right;
|
|
font-size: 12px;
|
|
color: #666;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 选中状态下的文件大小和日期 */
|
|
.file-item.selected .file-size,
|
|
.file-item.selected .file-date {
|
|
color: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
/* 状态栏 */
|
|
.status-bar {
|
|
flex-shrink: 0;
|
|
padding: 4px 16px;
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
/* 上下文菜单 */
|
|
.context-menu {
|
|
position: absolute;
|
|
background-color: #fff;
|
|
border: 1px solid #ccc;
|
|
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
|
|
z-index: 1000;
|
|
min-width: 120px;
|
|
}
|
|
|
|
.menu-item {
|
|
padding: 8px 12px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.menu-item:hover {
|
|
background-color: #0d6efd;
|
|
color: white;
|
|
}
|
|
|
|
/* 连接列表 */
|
|
.connection-item {
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.connection-item:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.connection-name {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.connection-info {
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
.connection-actions {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.connection-actions button {
|
|
padding: 2px 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* 新建文件夹项(内联编辑) */
|
|
.new-folder {
|
|
background-color: #e7f3ff;
|
|
}
|
|
|
|
.new-folder-input {
|
|
width: 100%;
|
|
padding: 2px 4px;
|
|
border: 1px solid #0d6efd;
|
|
outline: none;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.panels-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.panel {
|
|
height: 50%;
|
|
border-right: none;
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
.file-size,
|
|
.file-date {
|
|
display: none;
|
|
}
|
|
|
|
.toolbar {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.toolbar button {
|
|
padding: 2px 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.file-item {
|
|
padding: 6px 8px;
|
|
}
|
|
}
|