diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user index 08b28f7..bb7dbf3 100644 --- a/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\ - True|2025-12-01T13:18:47.2119609Z||;True|2025-12-01T20:51:19.9948301+08:00||;True|2025-12-01T20:50:36.9904697+08:00||;True|2025-12-01T20:44:10.1695142+08:00||;True|2025-12-01T19:27:58.0479456+08:00||;True|2025-12-01T19:16:02.2288214+08:00||;False|2025-12-01T19:15:56.0372115+08:00||;True|2025-12-01T19:15:16.4854821+08:00||;False|2025-12-01T19:15:06.7001019+08:00||;True|2025-12-01T17:10:38.9739466+08:00||;False|2025-12-01T17:10:18.8928139+08:00||;True|2025-12-01T17:03:59.3171589+08:00||;True|2025-12-01T17:03:12.5681656+08:00||;True|2025-12-01T16:42:51.4415025+08:00||;True|2025-12-01T01:29:59.6975567+08:00||;True|2025-12-01T01:29:45.1898652+08:00||;False|2025-12-01T01:29:33.1787721+08:00||;True|2025-12-01T01:27:33.1297605+08:00||;True|2025-12-01T01:27:27.3976862+08:00||;False|2025-12-01T01:27:20.5193052+08:00||;True|2025-12-01T01:11:11.0210582+08:00||;True|2025-12-01T01:04:04.3307782+08:00||;True|2025-12-01T00:55:49.8018864+08:00||;True|2025-12-01T00:27:25.1323561+08:00||;True|2025-11-30T23:58:20.7284116+08:00||;True|2025-11-30T23:57:58.3027622+08:00||;True|2025-11-30T23:57:43.0829614+08:00||;False|2025-11-30T23:57:33.5606716+08:00||;True|2025-11-30T23:54:29.6203368+08:00||;True|2025-11-30T23:54:27.5383120+08:00||;False|2025-11-30T23:54:17.0823982+08:00||;True|2025-11-30T22:41:11.4538820+08:00||;True|2025-11-30T22:38:19.7064566+08:00||;True|2025-11-30T22:37:35.2889186+08:00||;True|2025-11-30T21:42:31.1408314+08:00||;True|2025-11-30T21:42:19.5385333+08:00||;False|2025-11-30T21:42:13.3290237+08:00||;True|2025-11-30T21:33:28.0806806+08:00||;True|2025-11-30T21:16:56.7088027+08:00||;False|2025-11-30T21:16:46.1444944+08:00||;True|2025-11-30T20:21:24.4059664+08:00||;False|2025-11-30T20:21:17.6006098+08:00||;True|2025-11-30T20:20:08.2030141+08:00||;False|2025-11-30T20:16:12.3608968+08:00||;True|2025-11-30T20:15:35.6048313+08:00||;True|2025-11-30T19:45:18.7229552+08:00||;True|2025-11-30T19:45:08.6083368+08:00||;False|2025-11-30T19:44:54.7824905+08:00||;True|2025-11-30T19:44:17.0179491+08:00||;True|2025-11-30T19:44:06.7073484+08:00||;False|2025-11-30T19:43:58.2896556+08:00||;True|2025-11-30T19:42:08.2261927+08:00||;True|2025-11-30T19:28:15.7115077+08:00||;False|2025-11-30T19:28:10.2280725+08:00||;True|2025-11-30T19:23:31.7859158+08:00||;True|2025-11-30T19:23:20.7788277+08:00||;True|2025-11-30T19:17:11.8583296+08:00||;False|2025-11-30T19:10:41.8369574+08:00||;True|2025-11-30T19:02:08.8184758+08:00||;False|2025-11-30T19:01:59.4711045+08:00||;True|2025-11-30T18:16:01.8372242+08:00||;True|2025-11-30T14:50:31.9356543+08:00||;True|2025-11-30T14:48:27.1833064+08:00||;True|2025-11-30T02:06:06.6099669+08:00||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||; + True|2025-12-01T13:44:28.1674315Z||;True|2025-12-01T21:18:47.2119609+08:00||;True|2025-12-01T20:51:19.9948301+08:00||;True|2025-12-01T20:50:36.9904697+08:00||;True|2025-12-01T20:44:10.1695142+08:00||;True|2025-12-01T19:27:58.0479456+08:00||;True|2025-12-01T19:16:02.2288214+08:00||;False|2025-12-01T19:15:56.0372115+08:00||;True|2025-12-01T19:15:16.4854821+08:00||;False|2025-12-01T19:15:06.7001019+08:00||;True|2025-12-01T17:10:38.9739466+08:00||;False|2025-12-01T17:10:18.8928139+08:00||;True|2025-12-01T17:03:59.3171589+08:00||;True|2025-12-01T17:03:12.5681656+08:00||;True|2025-12-01T16:42:51.4415025+08:00||;True|2025-12-01T01:29:59.6975567+08:00||;True|2025-12-01T01:29:45.1898652+08:00||;False|2025-12-01T01:29:33.1787721+08:00||;True|2025-12-01T01:27:33.1297605+08:00||;True|2025-12-01T01:27:27.3976862+08:00||;False|2025-12-01T01:27:20.5193052+08:00||;True|2025-12-01T01:11:11.0210582+08:00||;True|2025-12-01T01:04:04.3307782+08:00||;True|2025-12-01T00:55:49.8018864+08:00||;True|2025-12-01T00:27:25.1323561+08:00||;True|2025-11-30T23:58:20.7284116+08:00||;True|2025-11-30T23:57:58.3027622+08:00||;True|2025-11-30T23:57:43.0829614+08:00||;False|2025-11-30T23:57:33.5606716+08:00||;True|2025-11-30T23:54:29.6203368+08:00||;True|2025-11-30T23:54:27.5383120+08:00||;False|2025-11-30T23:54:17.0823982+08:00||;True|2025-11-30T22:41:11.4538820+08:00||;True|2025-11-30T22:38:19.7064566+08:00||;True|2025-11-30T22:37:35.2889186+08:00||;True|2025-11-30T21:42:31.1408314+08:00||;True|2025-11-30T21:42:19.5385333+08:00||;False|2025-11-30T21:42:13.3290237+08:00||;True|2025-11-30T21:33:28.0806806+08:00||;True|2025-11-30T21:16:56.7088027+08:00||;False|2025-11-30T21:16:46.1444944+08:00||;True|2025-11-30T20:21:24.4059664+08:00||;False|2025-11-30T20:21:17.6006098+08:00||;True|2025-11-30T20:20:08.2030141+08:00||;False|2025-11-30T20:16:12.3608968+08:00||;True|2025-11-30T20:15:35.6048313+08:00||;True|2025-11-30T19:45:18.7229552+08:00||;True|2025-11-30T19:45:08.6083368+08:00||;False|2025-11-30T19:44:54.7824905+08:00||;True|2025-11-30T19:44:17.0179491+08:00||;True|2025-11-30T19:44:06.7073484+08:00||;False|2025-11-30T19:43:58.2896556+08:00||;True|2025-11-30T19:42:08.2261927+08:00||;True|2025-11-30T19:28:15.7115077+08:00||;False|2025-11-30T19:28:10.2280725+08:00||;True|2025-11-30T19:23:31.7859158+08:00||;True|2025-11-30T19:23:20.7788277+08:00||;True|2025-11-30T19:17:11.8583296+08:00||;False|2025-11-30T19:10:41.8369574+08:00||;True|2025-11-30T19:02:08.8184758+08:00||;False|2025-11-30T19:01:59.4711045+08:00||;True|2025-11-30T18:16:01.8372242+08:00||;True|2025-11-30T14:50:31.9356543+08:00||;True|2025-11-30T14:48:27.1833064+08:00||;True|2025-11-30T02:06:06.6099669+08:00||;True|2025-11-30T01:49:46.4358206+08:00||;False|2025-11-30T01:49:34.4884036+08:00||;True|2025-11-30T01:43:41.1028753+08:00||;True|2025-11-30T01:38:18.2856609+08:00||;True|2025-11-30T01:23:02.4378259+08:00||;True|2025-11-30T01:08:29.4041159+08:00||;True|2025-11-30T00:56:33.4172007+08:00||;False|2025-11-30T00:56:21.2777389+08:00||;True|2025-11-27T13:37:08.6884390+08:00||;False|2025-11-27T13:36:54.2595622+08:00||;True|2025-11-27T11:03:33.8401644+08:00||;False|2025-11-27T11:02:48.8942827+08:00||;True|2025-11-26T23:48:02.3957186+08:00||;True|2025-11-26T23:43:06.8154188+08:00||;False|2025-11-26T23:42:05.9191485+08:00||;True|2025-11-26T23:30:11.1295861+08:00||;True|2025-11-26T00:00:42.1507258+08:00||;True|2025-11-26T00:00:17.0107229+08:00||;True|2025-11-25T23:42:07.4349629+08:00||;False|2025-11-25T23:41:56.9328658+08:00||;True|2025-11-25T23:19:32.5262917+08:00||;True|2025-11-25T14:08:53.3850967+08:00||;True|2025-11-24T23:53:54.4283003+08:00||;True|2025-11-24T23:41:15.8248332+08:00||;True|2025-11-24T23:33:57.1844427+08:00||;True|2025-11-24T23:31:54.9228836+08:00||;True|2025-11-24T23:24:15.8681502+08:00||;True|2025-11-24T23:22:57.9046229+08:00||;True|2025-11-24T23:18:04.1131647+08:00||;True|2025-11-24T22:47:54.1336448+08:00||;True|2025-11-24T22:47:18.3613833+08:00||;True|2025-11-24T08:17:50.3994607+08:00||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||; diff --git a/README.md b/README.md index 9df66c4..8807209 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,8 @@ Cookie 及 `sec_user_id` 是同步功能的核心,需严格按步骤获取, | 镜像标签 | 架构 | | ----------------- | -------------- | -| `beta_1.6.5` | x86_64 (amd64) | -| `arm_1.6.5` | ARM64 | +| `beta_1.6.7` | x86_64 (amd64) | +| `arm_1.6.7` | ARM64 | ### 最新镜像查看 [镜像列表](http://nas.synology2023.online:10108/api/docker/dysync/1) @@ -112,7 +112,7 @@ docker run -d --restart=always \ -v /opt/dysync/uper:/app/uper \ -p 10103:10101 \ --name dysync2025 \ - ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.6.5 + ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.6.7 # 注意:-p 后面的容器端口,可以用环境变量类似:ASPNETCORE_URLS = http://+:10108 指定 ``` @@ -126,7 +126,7 @@ version: '3.8' services: dysync: - image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.6.5 + image: ccr.ccs.tencentyun.com/jianzhichu/dysync:beta_1.6.7 container_name: dysync2025 # 容器名称 restart: unless-stopped # 始终重启容器,除非容器被手动停止或Docker服务停止 ports: diff --git a/app/src/components/layout/HeaderActions.vue b/app/src/components/layout/HeaderActions.vue index a715810..be61cdb 100644 --- a/app/src/components/layout/HeaderActions.vue +++ b/app/src/components/layout/HeaderActions.vue @@ -13,23 +13,54 @@ const copyLoading = ref>({}); // 复制按钮加载状 const notificationKey = ref('version-notification'); // 复制版本号方法(优化:去除“(当前版本)”标记,只复制纯版本号) +// 复制版本号方法(优化:兼容所有浏览器,修复 navigator.clipboard 不存在的问题) const copyVersion = (version: string) => { - const pureVersion = version.replace('(当前版本)', '').trim(); // 过滤标记 + const pureVersion = version.replace('(当前版本)', '').replace('(最新版)', '').trim(); // 过滤所有标记 copyLoading.value[version] = true; - navigator.clipboard - .writeText(pureVersion) - .then(() => { - message.success(`已复制版本: ${pureVersion}`); - }) - .catch(() => { - message.error('复制失败,请手动复制'); - }) - .finally(() => { + + // 兼容方案:优先使用现代 API,降级使用传统方法 + const doCopy = async () => { + try { + // 方案1:现代浏览器 + HTTPS 环境(优先) + if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') { + await navigator.clipboard.writeText(pureVersion); + message.success(`已复制版本: ${pureVersion}`); + return; + } + + // 方案2:降级使用 document.execCommand(兼容 HTTP/旧浏览器) + const textarea = document.createElement('textarea'); + // 隐藏文本域(避免影响页面) + textarea.style.position = 'absolute'; + textarea.style.top = '-9999px'; + textarea.style.left = '-9999px'; + textarea.value = pureVersion; + document.body.appendChild(textarea); + + // 选中并复制 + textarea.select(); + const success = document.execCommand('copy'); + document.body.removeChild(textarea); // 清理 DOM + + if (success) { + message.success(`已复制版本: ${pureVersion}`); + } else { + throw new Error('execCommand 复制失败'); + } + } catch (error) { + // 方案3:最终降级 - 提示手动复制 + message.warning(`复制失败,请手动复制:${pureVersion}`); + console.warn('复制版本号失败:', error); + } finally { copyLoading.value[version] = false; - }); + } + }; + + doCopy(); }; // 定义版本列表组件(移除所有额外当前版本标记) +// 定义版本列表组件(完整版本:保留所有原有逻辑+样式优化+单行显示) const renderVersionList = (): VNode => { return h( 'div', @@ -45,42 +76,57 @@ const renderVersionList = (): VNode => { [ dyVersions.value.length > 0 ? dyVersions.value.map((tag, index) => { - const isFirstWithCurrent = tag.includes('(当前版本)'); // 只通过文本判断是否为当前版本 + // 判断是否包含当前版本/最新版标记 + const isCurrentVersion = tag.includes('(当前版本)'); + const isLatestVersion = tag.includes('(最新版)'); + return h( 'div', { - class: ['custom-version-item', isFirstWithCurrent ? 'custom-current-version' : ''], + class: [ + 'custom-version-item', + isCurrentVersion ? 'custom-current-version' : '', + isLatestVersion ? 'custom-latest-version' : '', + ], key: index, - title: isFirstWithCurrent ? '当前使用版本 - 点击右侧按钮复制版本号' : '点击右侧按钮复制版本号', + title: isCurrentVersion + ? '当前使用版本 - 点击右侧按钮复制版本号' + : isLatestVersion + ? '最新版本 - 点击右侧按钮复制版本号' + : '点击右侧按钮复制版本号', style: { width: '100%', padding: '8px 12px', borderBottom: '1px solid #f0f0f0', borderRadius: '4px', - transition: 'all 0.2s', + transition: 'all 0.2s ease', boxSizing: 'border-box', - // 核心:块级Flex,强制内部(文字+按钮)一行 + // 核心:Flex布局确保文字+按钮一行显示 display: 'flex', alignItems: 'center', justifyContent: 'space-between', - whiteSpace: 'nowrap', - // 只保留轻微背景色(可选,可删除) - backgroundColor: isFirstWithCurrent ? 'rgba(24, 144, 255, 0.05)' : 'transparent', + whiteSpace: 'nowrap', // 禁止整行换行 + // 版本标记背景色(区分当前版和最新版) + backgroundColor: isCurrentVersion + ? 'rgba(24, 144, 255, 0.05)' + : isLatestVersion + ? 'rgba(46, 125, 50, 0.05)' + : 'transparent', }, }, [ - // 文本容器(单行+溢出省略) + // 文本容器(单行溢出省略+标记颜色区分) h( 'div', { style: { display: 'flex', alignItems: 'center', - // 给按钮留固定空间,文本超长时省略 + // 给复制按钮留固定宽度,避免文本挤压 maxWidth: 'calc(100% - 40px)', overflow: 'hidden', textOverflow: 'ellipsis', - whiteSpace: 'nowrap', + whiteSpace: 'nowrap', // 文本单行显示 }, }, [ @@ -89,17 +135,21 @@ const renderVersionList = (): VNode => { { style: { fontSize: '14px', - color: isFirstWithCurrent ? '#1890ff' : '#1f2937', // 当前版本文字变色(可选,可删除) + color: isCurrentVersion + ? '#1890ff' // 当前版本文字色 + : isLatestVersion + ? '#2e7d32' // 最新版本文字色 + : '#1f2937', // 普通版本文字色 overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', }, }, - tag // 直接显示带“(当前版本)”的文本 + tag // 显示带标记的完整文本(如:v1.0.0(当前版本)) ), ] ), - // 复制按钮(固定大小,不挤压) + // 复制按钮(固定大小+加载动画+hover效果) h( 'button', { @@ -109,18 +159,24 @@ const renderVersionList = (): VNode => { border: 'none', borderRadius: '4px', backgroundColor: 'transparent', - color: copyLoading.value[tag] ? '#d1d5db' : isFirstWithCurrent ? '#1890ff' : '#9ca3af', + color: copyLoading.value[tag] + ? '#d1d5db' // 加载中颜色 + : isCurrentVersion + ? '#1890ff' // 当前版本按钮色 + : isLatestVersion + ? '#2e7d32' // 最新版本按钮色 + : '#9ca3af', // 普通版本按钮色 cursor: copyLoading.value[tag] ? 'not-allowed' : 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', padding: '0', margin: '0', - flexShrink: '0', - transition: 'all 0.2s', + flexShrink: '0', // 禁止按钮收缩 + transition: 'all 0.2s ease', }, onClick: (e: Event) => { - e.stopPropagation(); + e.stopPropagation(); // 阻止事件冒泡 copyVersion(tag); }, disabled: copyLoading.value[tag], @@ -130,6 +186,7 @@ const renderVersionList = (): VNode => { h(CopyOutlined, { style: { fontSize: '14px', + // 加载时旋转动画 animation: copyLoading.value[tag] ? 'custom-spin 1s linear infinite' : 'none', }, }), diff --git a/appsettings.json b/appsettings.json index 5f6f58a..be7d0bf 100644 --- a/appsettings.json +++ b/appsettings.json @@ -1,5 +1,5 @@ { "dbconn": "", "dbtype": "Sqlite", - "tagName": "beta_1.6.6" + "tagName": "beta_1.6.7" } \ No newline at end of file