fix(app): refine account progress and screenshots
This commit is contained in:
@@ -126,6 +126,9 @@ function showRuntimeProgress(acc) {
|
||||
|
||||
if (!statusText || statusText === '未开始') return false
|
||||
|
||||
// 仅在“运行中”展示进度;排队/等待等非执行阶段不展示
|
||||
if (!statusText.includes('运行')) return false
|
||||
|
||||
// 浏览完成后(包含等待截图/截图中等阶段)不再展示进度条与内容/附件
|
||||
if (statusText.includes('截图') || statusText.includes('等待截图')) return false
|
||||
if (detailText.includes('截图') || detailText.includes('等待截图')) return false
|
||||
|
||||
@@ -86,16 +86,6 @@ async function onDelete(item) {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyLink(item) {
|
||||
const url = `${window.location.origin}${buildUrl(item.filename)}`
|
||||
try {
|
||||
await navigator.clipboard.writeText(url)
|
||||
ElMessage.success('链接已复制')
|
||||
} catch {
|
||||
ElMessage.warning('复制失败,请手动复制链接')
|
||||
}
|
||||
}
|
||||
|
||||
async function copyImage(item) {
|
||||
const url = buildUrl(item.filename)
|
||||
if (
|
||||
@@ -103,7 +93,7 @@ async function copyImage(item) {
|
||||
typeof navigator.clipboard.write !== 'function' ||
|
||||
typeof window.ClipboardItem === 'undefined'
|
||||
) {
|
||||
ElMessage.warning('当前环境不支持复制图片(建议使用 Chrome/Edge 并通过 HTTPS 访问);可用“复制链接/下载”。')
|
||||
ElMessage.warning('当前环境不支持复制图片(建议使用 Chrome/Edge 并通过 HTTPS 访问);可用“下载”。')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -116,7 +106,7 @@ async function copyImage(item) {
|
||||
await navigator.clipboard.write([new ClipboardItem({ [blob.type]: blob })])
|
||||
ElMessage.success('图片已复制')
|
||||
} catch {
|
||||
ElMessage.warning('复制图片失败:请确认允许剪贴板权限;可用“复制链接/下载”。')
|
||||
ElMessage.warning('复制图片失败:请确认允许剪贴板权限;可用“下载”。')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +144,6 @@ onMounted(load)
|
||||
<div class="shot-meta app-muted">{{ item.created || '' }}</div>
|
||||
<div class="shot-actions">
|
||||
<el-button size="small" text type="primary" @click="copyImage(item)">复制图片</el-button>
|
||||
<el-button size="small" text @click="copyLink(item)">复制链接</el-button>
|
||||
<el-button size="small" text @click="download(item)">下载</el-button>
|
||||
<el-button size="small" text type="danger" @click="onDelete(item)">删除</el-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user