disk.css 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. /* 素材管理 - 磁盘样式(复制自 client/css/disk/disk.css) */
  2. /* 全局样式 */
  3. * {
  4. margin: 0;
  5. padding: 0;
  6. box-sizing: border-box;
  7. }
  8. body {
  9. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  10. background: #f5f5f5;
  11. color: #333;
  12. }
  13. /* 主容器 */
  14. .disk-container {
  15. display: flex;
  16. flex-direction: column;
  17. height: 100vh;
  18. background: white;
  19. }
  20. /* 文件列表容器 */
  21. .file-list-container {
  22. position: relative;
  23. flex: 1;
  24. overflow-y: auto;
  25. padding: 24px;
  26. }
  27. /* 拖拽提示 */
  28. .drop-hint {
  29. display: none;
  30. flex-direction: column;
  31. justify-content: center;
  32. align-items: center;
  33. position: absolute;
  34. top: 24px;
  35. left: 24px;
  36. right: 24px;
  37. bottom: 24px;
  38. background: rgba(24, 144, 255, 0.05);
  39. border: 2px dashed #1890ff;
  40. border-radius: 8px;
  41. color: #1890ff;
  42. z-index: 10;
  43. pointer-events: none;
  44. }
  45. .drop-hint svg {
  46. margin-bottom: 16px;
  47. opacity: 0.6;
  48. }
  49. .drop-hint p {
  50. font-size: 16px;
  51. font-weight: 500;
  52. }
  53. .file-list-container.drag-over .drop-hint {
  54. display: flex;
  55. }
  56. /* 文件列表 */
  57. .file-list {
  58. display: flex;
  59. flex-wrap: wrap;
  60. gap: 16px;
  61. padding: 8px;
  62. }
  63. /* 文件项 */
  64. .file-item {
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. width: calc((100% - 32px) / 3);
  69. min-width: 120px;
  70. max-width: 180px;
  71. padding: 16px 8px;
  72. border-radius: 8px;
  73. cursor: pointer;
  74. transition: background 0.2s;
  75. user-select: none;
  76. position: relative;
  77. }
  78. .file-item:hover {
  79. background: #f5f5f5;
  80. }
  81. .file-item.selected {
  82. background: rgba(82, 196, 26, 0.1);
  83. }
  84. .file-item.dragging {
  85. opacity: 0.5;
  86. background: #e6f7ff;
  87. }
  88. .file-item.cut {
  89. opacity: 0.6;
  90. filter: grayscale(0.3);
  91. }
  92. .file-item.drag-target {
  93. background: rgba(24, 144, 255, 0.15);
  94. outline: 2px dashed #1890ff;
  95. outline-offset: -2px;
  96. }
  97. /* 拖拽排序指示器 */
  98. .file-item.drag-over-left::before,
  99. .file-item.drag-over-right::after {
  100. content: '';
  101. position: absolute;
  102. top: 0;
  103. bottom: 0;
  104. width: 3px;
  105. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  106. border-radius: 2px;
  107. box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
  108. }
  109. .file-item.drag-over-left::before {
  110. left: -8px;
  111. }
  112. .file-item.drag-over-right::after {
  113. right: -8px;
  114. }
  115. /* 选中状态勾选标记 */
  116. .file-item .check-mark {
  117. position: absolute;
  118. top: 4px;
  119. left: 4px;
  120. width: 20px;
  121. height: 20px;
  122. background: #52c41a;
  123. border-radius: 50%;
  124. display: none;
  125. align-items: center;
  126. justify-content: center;
  127. color: white;
  128. z-index: 5;
  129. }
  130. .file-item.selected .check-mark {
  131. display: flex;
  132. }
  133. /* 框选区域 */
  134. .selection-box {
  135. position: fixed;
  136. border: 1px solid #1890ff;
  137. background: rgba(24, 144, 255, 0.1);
  138. pointer-events: none;
  139. z-index: 1000;
  140. display: none;
  141. }
  142. .file-icon {
  143. display: flex;
  144. justify-content: center;
  145. align-items: center;
  146. width: 100%;
  147. max-width: 140px;
  148. aspect-ratio: 1;
  149. margin: 0 auto 8px;
  150. }
  151. .file-icon svg {
  152. width: 60%;
  153. height: 60%;
  154. }
  155. /* 图片缩略图 */
  156. .file-thumbnail {
  157. display: flex;
  158. justify-content: center;
  159. align-items: center;
  160. width: 100%;
  161. max-width: 140px;
  162. aspect-ratio: 1;
  163. margin: 0 auto 8px;
  164. border-radius: 6px;
  165. overflow: hidden;
  166. /* 棋盘格背景用于显示透明部分 */
  167. background-color: #ffffff;
  168. background-image:
  169. linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
  170. linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
  171. linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
  172. linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
  173. background-size: 16px 16px;
  174. background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  175. border: 1px solid #e5e5e5;
  176. position: relative;
  177. }
  178. .file-thumbnail img {
  179. width: 100%;
  180. height: 100%;
  181. object-fit: contain;
  182. }
  183. /* 文件夹预览徽章 */
  184. .folder-preview {
  185. border: 2px solid #fbbf24;
  186. background: #ffffff !important;
  187. background-image: none !important;
  188. }
  189. .folder-badge {
  190. position: absolute;
  191. bottom: 4px;
  192. right: 4px;
  193. width: 24px;
  194. height: 24px;
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. background: rgba(255, 255, 255, 0.95);
  199. border-radius: 6px;
  200. font-size: 14px;
  201. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  202. }
  203. /* 文件夹图标 */
  204. .folder-icon {
  205. color: #ffc107;
  206. }
  207. /* 文件图标 */
  208. .file-icon-default {
  209. color: #90caf9;
  210. }
  211. .file-icon-image {
  212. color: #81c784;
  213. }
  214. .file-icon-video {
  215. color: #e57373;
  216. }
  217. .file-icon-audio {
  218. color: #ba68c8;
  219. }
  220. .file-icon-zip {
  221. color: #ff8a65;
  222. }
  223. .file-icon-document {
  224. color: #64b5f6;
  225. }
  226. /* 文件名 */
  227. .file-name {
  228. width: 100%;
  229. font-size: 13px;
  230. text-align: center;
  231. word-break: break-all;
  232. color: #333;
  233. line-height: 1.4;
  234. max-height: 2.8em;
  235. overflow: hidden;
  236. display: -webkit-box;
  237. -webkit-line-clamp: 2;
  238. line-clamp: 2;
  239. -webkit-box-orient: vertical;
  240. padding: 2px 4px;
  241. border-radius: 4px;
  242. cursor: text;
  243. }
  244. .file-name:hover {
  245. background: rgba(24, 144, 255, 0.1);
  246. }
  247. /* 重命名输入框 */
  248. .rename-input {
  249. width: 100%;
  250. font-size: 13px;
  251. text-align: center;
  252. padding: 2px 4px;
  253. border: 1px solid #1890ff;
  254. border-radius: 4px;
  255. outline: none;
  256. background: white;
  257. }
  258. /* 文件信息 */
  259. .file-info {
  260. font-size: 11px;
  261. color: #999;
  262. margin-top: 4px;
  263. }
  264. /* 空状态 */
  265. .empty-state {
  266. display: none;
  267. flex-direction: column;
  268. justify-content: center;
  269. align-items: center;
  270. height: 100%;
  271. color: #999;
  272. }
  273. .empty-state svg {
  274. margin-bottom: 24px;
  275. }
  276. .empty-state p {
  277. font-size: 16px;
  278. margin-bottom: 8px;
  279. }
  280. .empty-state .hint {
  281. font-size: 13px;
  282. color: #bbb;
  283. }
  284. .empty-state.show {
  285. display: flex;
  286. }
  287. /* 加载状态 */
  288. .loading {
  289. display: none;
  290. flex-direction: column;
  291. justify-content: center;
  292. align-items: center;
  293. position: absolute;
  294. top: 0;
  295. left: 0;
  296. right: 0;
  297. bottom: 0;
  298. background: rgba(255, 255, 255, 0.9);
  299. z-index: 20;
  300. }
  301. .loading.show {
  302. display: flex;
  303. }
  304. .spinner {
  305. width: 40px;
  306. height: 40px;
  307. border: 3px solid #f3f3f3;
  308. border-top: 3px solid #1890ff;
  309. border-radius: 50%;
  310. animation: spin 1s linear infinite;
  311. }
  312. @keyframes spin {
  313. 0% { transform: rotate(0deg); }
  314. 100% { transform: rotate(360deg); }
  315. }
  316. .loading p {
  317. margin-top: 16px;
  318. color: #666;
  319. font-size: 14px;
  320. }
  321. /* 上传进度 */
  322. .upload-progress {
  323. display: none;
  324. position: fixed;
  325. bottom: 24px;
  326. right: 24px;
  327. background: white;
  328. border-radius: 8px;
  329. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  330. padding: 16px;
  331. min-width: 300px;
  332. max-width: 400px;
  333. z-index: 1000;
  334. }
  335. .upload-progress.show {
  336. display: block;
  337. }
  338. .upload-progress-header {
  339. display: flex;
  340. justify-content: space-between;
  341. align-items: center;
  342. margin-bottom: 12px;
  343. }
  344. .upload-progress-title {
  345. font-size: 14px;
  346. font-weight: 500;
  347. color: #333;
  348. }
  349. .upload-progress-close {
  350. background: none;
  351. border: none;
  352. color: #999;
  353. cursor: pointer;
  354. padding: 4px;
  355. display: flex;
  356. align-items: center;
  357. }
  358. .upload-progress-item {
  359. display: flex;
  360. align-items: center;
  361. gap: 12px;
  362. padding: 8px 0;
  363. border-top: 1px solid #f0f0f0;
  364. }
  365. .upload-progress-icon {
  366. flex-shrink: 0;
  367. color: #1890ff;
  368. }
  369. .upload-progress-info {
  370. flex: 1;
  371. min-width: 0;
  372. }
  373. .upload-progress-name {
  374. font-size: 13px;
  375. color: #333;
  376. white-space: nowrap;
  377. overflow: hidden;
  378. text-overflow: ellipsis;
  379. }
  380. .upload-progress-status {
  381. font-size: 12px;
  382. color: #999;
  383. margin-top: 2px;
  384. }
  385. .upload-progress-bar {
  386. width: 100%;
  387. height: 4px;
  388. background: #f0f0f0;
  389. border-radius: 2px;
  390. margin-top: 4px;
  391. overflow: hidden;
  392. }
  393. .upload-progress-bar-fill {
  394. height: 100%;
  395. background: #1890ff;
  396. transition: width 0.3s;
  397. }
  398. .upload-progress-list {
  399. max-height: 320px;
  400. overflow-y: auto;
  401. }
  402. /* 响应式 */
  403. @media (max-width: 768px) {
  404. .header {
  405. flex-direction: column;
  406. gap: 12px;
  407. align-items: stretch;
  408. }
  409. .breadcrumb {
  410. justify-content: flex-start;
  411. }
  412. .actions {
  413. justify-content: flex-end;
  414. }
  415. .file-list {
  416. gap: 12px;
  417. }
  418. .file-item {
  419. width: calc((100% - 24px) / 3);
  420. min-width: 100px;
  421. max-width: none;
  422. }
  423. }
  424. @media (max-width: 650px) {
  425. .file-item {
  426. width: calc((100% - 12px) / 2);
  427. min-width: 100px;
  428. }
  429. }