From 24bd725f15818a2ede112f07f58e7ca2e6402a85 Mon Sep 17 00:00:00 2001 From: jmal Date: Wed, 30 Apr 2025 16:36:16 +0800 Subject: [PATCH 1/4] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Icon/IconFile.vue | 24 ++++++++-- src/components/ShowFile/ShowFile.vue | 58 +++++++++++++------------ src/components/preview/FileDetails.vue | 3 +- src/layout/components/Sidebar/index.vue | 3 ++ src/styles/home-index.scss | 22 +++++++++- src/styles/index.scss | 10 ++++- 6 files changed, 86 insertions(+), 34 deletions(-) diff --git a/src/components/Icon/IconFile.vue b/src/components/Icon/IconFile.vue index 669bcd7..4dba7df 100644 --- a/src/components/Icon/IconFile.vue +++ b/src/components/Icon/IconFile.vue @@ -53,10 +53,10 @@
-
+
-
@@ -91,7 +91,7 @@
-
@@ -153,6 +153,24 @@ export default { mounted() { }, computed: { + videoImageHeight() { + if (this.details) { + return "110px" + } + if (this.item.video && this.item.video.width > this.item.video.height) { + return "" + } + return this.gridWidth - 35 + "px" + }, + imageHeightStyle() { + if (this.details) { + return "height: 110px;" + } + if (this.item.w > this.item.h) { + return `max-height: ${this.gridWidth - 35}px` + } + return `height: ${this.gridWidth - 35}px;` + }, findIconClass() { let suffix = this.item.suffix; if (!suffix && this.item.fileName) { diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 321e01f..1393588 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -89,6 +89,7 @@
    -
  • -
@@ -1243,7 +1245,9 @@ export default { if (item.isFolder || !this.grid) { return filename; } - const singleLine = (item.contentType && item.contentType.startsWith('image')) || item.showCover + const verticalImage = item.w && item.h && (item.w / item.h < 1.6) + const verticalVideo = item.video && (item.video.width / item.video.height < 1.6) + const singleLine = verticalImage || verticalVideo || item.showCover const gridFilenameLength = singleLine ? 13 : 28 // 分离文件名和后缀 let parts = filename.split('.'); @@ -2144,8 +2148,8 @@ export default { node.firstChild.style.marginRight = '20px' } if (index === 2) { - node.style.borderRadius = '0 5px 5px 0' - node.style.borderRight = '1px solid #409eff' + node.style.borderRadius = '0 12px 12px 0' + node.style.borderRight = 'solid 1px var(--apple-shadow-color)' node.firstChild.style.height = '44px' node.firstChild.style.lineHeight = '44px' node.firstChild.style.width = '80px' @@ -3286,35 +3290,35 @@ export default { if (columnIndex === 0) { return { backgroundColor: '#e0f3fc !important', - borderRadius: '50px 0 0 50px', - borderLeft: '1px solid #409eff', - borderTop: '1px solid #409eff', - borderBottom: '1px solid #409eff', + borderRadius: '12px 0 0 12px', + borderLeft: 'solid 1px var(--apple-shadow-color)', + borderTop: 'solid 1px var(--apple-shadow-color)', + borderBottom: 'solid 1px var(--apple-shadow-color)', } } if (columnIndex === 3) { return { backgroundColor: '#e0f3fc !important', - borderRadius: '0 50px 50px 0', - borderRight: '1px solid #409eff', - borderTop: '1px solid #409eff', - borderBottom: '1px solid #409eff', + borderRadius: '0 12px 12px 0', + borderRight: 'solid 1px var(--apple-shadow-color)', + borderTop: 'solid 1px var(--apple-shadow-color)', + borderBottom: 'solid 1px var(--apple-shadow-color)', } } return { backgroundColor: '#e0f3fc !important', - borderTop: '1px solid #409eff', - borderBottom: '1px solid #409eff', + borderTop: 'solid 1px var(--apple-shadow-color)', + borderBottom: 'solid 1px var(--apple-shadow-color)', } } else { if (columnIndex === 0) { return { - borderRadius: '50px 0 0 50px', + borderRadius: '12px 0 0 12px', } } if (columnIndex === 3) { return { - borderRadius: '0 50px 50px 0', + borderRadius: '0 12px 12px 0', } } } @@ -4666,7 +4670,7 @@ export default { .is-sortable:hover { background-color: #e0f3fc; - border-radius: 40px; + border-radius: 12px; } } diff --git a/src/components/preview/FileDetails.vue b/src/components/preview/FileDetails.vue index c8de3ee..e8e2f75 100644 --- a/src/components/preview/FileDetails.vue +++ b/src/components/preview/FileDetails.vue @@ -23,6 +23,7 @@ {{ formatSize(file.size) }} - {{ filepath }} + {{ filepath }} {{ file.uploadDate }} diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 677cd23..523ad91 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -445,6 +445,9 @@ $tagMenuBorderRadius: 8px; padding: 0; min-width: 110px; } +.tag-menu { + padding: 5px 5px; +} .tag-menu li:hover { cursor: pointer; border-radius: $tagMenuBorderRadius; diff --git a/src/styles/home-index.scss b/src/styles/home-index.scss index 09b3ce7..1bd4208 100644 --- a/src/styles/home-index.scss +++ b/src/styles/home-index.scss @@ -45,7 +45,6 @@ padding-inline-start: 0; margin-top: 0; margin-bottom: 0; - padding: 0 5px; } .newFileMenu li { cursor: pointer; @@ -63,7 +62,6 @@ .newFileMenu li > .menuitem { cursor: pointer; line-height: 38px; - margin-left: 10%; } .newFileMenu li > .menuitem > .text { cursor: pointer; @@ -137,6 +135,26 @@ border: 0 solid rgba(0, 0, 0, 0); min-width: 160px; border-radius: $dialogBorderRadius; + padding: 10px 10px; + box-shadow: 0 5px 12px #ccc; + + .home-contextmenu { + padding: 0 10px; + display: flex; + align-items: center; + justify-content: space-between; + + .svg-icon { + margin-right: 10px; + } + } + + .home-contextmenu-title { + width: 100%; + display: flex; + justify-content: space-between; + } + } .menu-triangle-bottom { diff --git a/src/styles/index.scss b/src/styles/index.scss index ed19748..3bef28c 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -28,10 +28,18 @@ body { border-radius: $popperBorderRadius; } - .el-message, .el-notification .el-popover, .el-tooltip__popper, .el-dropdown-menu, .el-select-dropdown, .el-picker-panel, .el-picker-panel__body, .el-picker-panel__sidebar { + .el-message, .el-notification, .el-popover, .el-tooltip__popper, .el-dropdown-menu, .el-select-dropdown, .el-picker-panel, .el-picker-panel__body, .el-picker-panel__sidebar { border-radius: $popperBorderRadius; } + .el-popover.el-popper.upload-file { + border-radius: 16px; + padding: 10px 10px; + li { + padding: 0 10px; + } + } + .v-contextmenu { border-radius: 8px; } From dacc585ea36bcc3dc71f1d75d29004ae6de730f2 Mon Sep 17 00:00:00 2001 From: jmal Date: Thu, 1 May 2025 21:33:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E6=96=87=E4=BB=B6=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E6=96=B0=E5=A2=9E=E6=93=8D=E4=BD=9C=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/log.js | 8 +- src/components/ShowFile/ShowFile.vue | 4 +- src/components/Timeline/index.vue | 175 +++++++++++++++++++++++++ src/components/preview/FileDetails.vue | 46 ++++++- src/styles/index.scss | 9 ++ 5 files changed, 232 insertions(+), 10 deletions(-) create mode 100644 src/components/Timeline/index.vue diff --git a/src/api/log.js b/src/api/log.js index f616bda..3194142 100644 --- a/src/api/log.js +++ b/src/api/log.js @@ -1,5 +1,4 @@ import request from '@/utils/request' -const qs = require('qs') export default { logList(params) { @@ -9,5 +8,12 @@ export default { params }) }, + getFileOperationHistory(params) { + return request({ + url: '/log/getFileOperationHistory', + method: 'get', + params + }) + }, } diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 1393588..cfd1719 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -848,7 +848,7 @@
-

所选目录已存在下列文件

+

同名文件如何处理

@@ -856,7 +856,7 @@ 取 消 覆 盖 - 不覆盖 + 跳 过 diff --git a/src/components/Timeline/index.vue b/src/components/Timeline/index.vue new file mode 100644 index 0000000..4df5c53 --- /dev/null +++ b/src/components/Timeline/index.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/components/preview/FileDetails.vue b/src/components/preview/FileDetails.vue index e8e2f75..dc440a2 100644 --- a/src/components/preview/FileDetails.vue +++ b/src/components/preview/FileDetails.vue @@ -54,11 +54,11 @@ {{ file.name }} - - {{ - file.isFolder ? '文件夹' : file.contentType - }} - + + + + +
{{ file.music.singer }} @@ -87,7 +87,16 @@ {{ file.uploadDate }} - {{ file.updateDate }} + + + {{ file.updateDate }} + {{ formatExif(file.exif) }} @@ -99,12 +108,14 @@ 打开文件 使用OnlyOffice打开 +