diff --git a/package.json b/package.json index 73cf061..94b2d38 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "sortablejs": "^1.10.2", "spark-md5": "^3.0.0", "stompjs": "^2.3.3", + "tippy.js": "^6.3.7", "v-contextmenu": "^2.9.0", "v-viewer": "^1.5.1", "vditor": "3.10.4", 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/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..1a50cb9 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -89,6 +89,7 @@
    -
  • -
@@ -527,6 +529,7 @@ minHeight: gridMinHeight + 'px', rowGap: '10px', overflow: 'auto', + paddingBottom: '12px', 'box-shadow': fileListScrollTop > 0 ? '-1px -1px 4px #00152914' @@ -536,26 +539,6 @@
-

所选目录已存在下列文件

+

同名文件如何处理

@@ -854,7 +838,7 @@ 取 消 覆 盖 - 不覆盖 + 跳 过 @@ -1243,7 +1227,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('.'); @@ -1466,6 +1452,49 @@ export default { }, }, methods: { + tooltipConfig(item) { + // 使用模板字符串构建更清晰的 HTML + const contentHTML = ` +
+
+ 大小: + ${this.formatSize(item.size)} +
+ ${item.w && item.h ? ` +
+ 尺寸: + ${item.w}×${item.h} +
` : ''} +
+ 名称: + ${item.name} +
+
+ 上传时间: + ${item.uploadDate} +
+
+ 修改时间: + ${item.updateDate} +
+
+ 路径: + ${item.path} +
+ ${this.extendedInfo(item)} +
+ `; + + return { + content: contentHTML, + // trigger: 'click', + placement: 'left', + allowHTML: true, + theme: 'light', + // appendTo: 'parent', + arrow: true + }; + }, // 判断给定的字符是否是中文 isChineseChar(char) { return char.charCodeAt(0) > 255 @@ -2144,8 +2173,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' @@ -2397,7 +2426,7 @@ export default { if (!file.exif && !file.video) { return '' } - return "\r\n" + formatExif(file.exif) + formatVideo(file.video) + return formatExif(file.exif, '
') + formatVideo(file.video, '
') }, upload() { // 打开文件选择框 @@ -3286,35 +3315,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 +4695,7 @@ export default { .is-sortable:hover { background-color: #e0f3fc; - border-radius: 40px; + border-radius: 12px; } } diff --git a/src/components/Timeline/index.vue b/src/components/Timeline/index.vue new file mode 100644 index 0000000..4b78829 --- /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 c8de3ee..5dc6fb7 100644 --- a/src/components/preview/FileDetails.vue +++ b/src/components/preview/FileDetails.vue @@ -23,6 +23,7 @@ {{ file.name }} - - {{ - file.isFolder ? '文件夹' : file.contentType - }} - + + + + +
{{ file.music.singer }} @@ -80,13 +81,22 @@ {{ formatSize(file.size) }} - {{ filepath }} + {{ filepath }} {{ file.uploadDate }} - {{ file.updateDate }} + + + {{ file.updateDate }} + {{ formatExif(file.exif) }} @@ -98,12 +108,15 @@ 打开文件 使用OnlyOffice打开 +