fix 百度云fullpath错误,自动上传不能点击关闭
parent
c162c7f383
commit
77a0d70570
|
|
@ -1,20 +1,24 @@
|
|||
;(() => {
|
||||
const html = `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
<script type="module" crossorigin src="/baidu_netdisk/fe-static/assets/index-ca58e7a1.js"></script>
|
||||
<link rel="stylesheet" href="/baidu_netdisk/fe-static/assets/index-a2045d1f.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
<script type="module" crossorigin src="/baidu_netdisk/fe-static/assets/index-db76c961.js"></script>
|
||||
<link rel="stylesheet" href="/baidu_netdisk/fe-static/assets/index-a2045d1f.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>`
|
||||
const asyncCheck = async (getter, checkSize = 100, timeout = 1000) => {
|
||||
return new Promise((x) => {
|
||||
const check = (num = 0) => {
|
||||
|
|
|
|||
|
|
@ -78,13 +78,14 @@ def list_file(cwd="/"):
|
|||
name = match.group(4).strip()
|
||||
f_type = "dir" if name.endswith("/") else "file"
|
||||
size = match.group(2)
|
||||
name = name.strip("/")
|
||||
file_info = {
|
||||
"size": size,
|
||||
"date": match.group(3),
|
||||
"name": name.strip("/"),
|
||||
"name": name,
|
||||
"type": f_type,
|
||||
"bytes": convert_to_bytes(size) if size != "-" else size,
|
||||
"fullpath": os.path.normpath(os.path.join(cwd, name.strip("/"))),
|
||||
"fullpath": f"{cwd}/{name}",
|
||||
}
|
||||
files.append(file_info)
|
||||
return files
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
.ant-statistic{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-statistic-title{margin-bottom:4px;color:#00000073;font-size:14px}.ant-statistic-content{color:#000000d9;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.ant-statistic-content-value{display:inline-block;direction:ltr}.ant-statistic-content-prefix,.ant-statistic-content-suffix{display:inline-block}.ant-statistic-content-prefix{margin-right:4px}.ant-statistic-content-suffix{margin-left:4px}.ant-statistic-rtl{direction:rtl}.ant-statistic-rtl .ant-statistic-content-prefix{margin-right:0;margin-left:4px}.ant-statistic-rtl .ant-statistic-content-suffix{margin-right:4px;margin-left:0}.container[data-v-9eea5166]{margin:16px}.container>*[data-v-9eea5166]{margin:8px}
|
||||
.ant-statistic{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-statistic-title{margin-bottom:4px;color:#00000073;font-size:14px}.ant-statistic-content{color:#000000d9;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.ant-statistic-content-value{display:inline-block;direction:ltr}.ant-statistic-content-prefix,.ant-statistic-content-suffix{display:inline-block}.ant-statistic-content-prefix{margin-right:4px}.ant-statistic-content-suffix{margin-left:4px}.ant-statistic-rtl{direction:rtl}.ant-statistic-rtl .ant-statistic-content-prefix{margin-right:0;margin-left:4px}.ant-statistic-rtl .ant-statistic-content-suffix{margin-right:4px;margin-left:0}.container[data-v-d72d4be0]{margin:16px}.container>*[data-v-d72d4be0]{margin:8px}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{b as s}from"./index-e5afbac3.js";import{bB as n,aD as t}from"./index-ca58e7a1.js";function i(e,o){return e&&e.length?n(e,s(o)):[]}const r=(e,o)=>(t.success({content:o??`已复制内容 "${e}" 到粘贴板`}),navigator.clipboard.writeText(e));export{r as c,i as u};
|
||||
import{b as s}from"./index-62b9b247.js";import{bB as n,aF as t}from"./index-db76c961.js";function i(e,o){return e&&e.length?n(e,s(o)):[]}const r=(e,o)=>(t.success({content:o??`已复制内容 "${e}" 到粘贴板`}),navigator.clipboard.writeText(e));export{r as c,i as u};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
import{u as p}from"./useTaskListStore-f8760c3b.js";import{d as u,r as d,k as g,X as f,Y as m,n as t,p as s,aT as l,ad as k,b2 as x,x as y,q as D,A as L}from"./index-ca58e7a1.js";const v={class:"container"},h=u({__name:"logDetail",props:{logDetailId:null},setup(r){const n=r,c=p(),a=d(),o=g(()=>c.taskLogMap.get(n.logDetailId));return f(o,async()=>{await m();const e=a.value;e&&(e.scrollTop=e.scrollHeight)},{deep:!0}),(e,T)=>(t(),s("div",v,[l("ul",{class:"list",ref_key:"logListEl",ref:a},[(t(!0),s(k,null,x(D(o),(i,_)=>(t(),s("li",{key:_},[l("pre",null,y(i.log),1)]))),128))],512)]))}});const I=L(h,[["__scopeId","data-v-59148842"]]);export{I as default};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{u as p}from"./useTaskListStore-1884d2b8.js";import{d as u,r as d,k as g,$ as f,a0 as m,n as t,p as s,aV as l,ag as k,b2 as D,z as y,q as L,D as v}from"./index-db76c961.js";const x={class:"container"},h=u({__name:"logDetail",props:{logDetailId:null},setup(r){const n=r,c=p(),a=d(),o=g(()=>c.taskLogMap.get(n.logDetailId));return f(o,async()=>{await m();const e=a.value;e&&(e.scrollTop=e.scrollHeight)},{deep:!0}),(e,B)=>(t(),s("div",x,[l("ul",{class:"list",ref_key:"logListEl",ref:a},[(t(!0),s(k,null,D(L(o),(i,_)=>(t(),s("li",{key:_},[l("pre",null,y(i.log),1)]))),128))],512)]))}});const T=v(h,[["__scopeId","data-v-59148842"]]);export{T as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{cE as r,r as e,m as t,aF as i,cF as d}from"./index-ca58e7a1.js";const v=r("useTaskListStore",()=>{const a=e(new Map),n=t(new i),u=e(3),o=e([]),c=t([]),l=e(-1),s=e(null);return{checkBaiduyunInstalled:async()=>(s.value===null&&(s.value=d()),s.value),baiduyunInstalled:s,pollInterval:u,taskLogMap:a,queue:n,tasks:o,showDirAutoCompletedIdx:l,pendingBaiduyunTaskQueue:c}},{persist:{paths:["pollInterval","tasks"],key:"useTaskListStore-v0.0.1"}});export{v as u};
|
||||
import{cE as r,r as e,m as t,aH as i,cF as d}from"./index-db76c961.js";const v=r("useTaskListStore",()=>{const a=e(new Map),n=t(new i),u=e(3),o=e([]),c=t([]),l=e(-1),s=e(null);return{checkBaiduyunInstalled:async()=>(s.value===null&&(s.value=d()),s.value),baiduyunInstalled:s,pollInterval:u,taskLogMap:a,queue:n,tasks:o,showDirAutoCompletedIdx:l,pendingBaiduyunTaskQueue:c}},{persist:{paths:["pollInterval","tasks"],key:"useTaskListStore-v0.0.1"}});export{v as u};
|
||||
|
|
@ -1,15 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
<script type="module" crossorigin src="/baidu_netdisk/fe-static/assets/index-ca58e7a1.js"></script>
|
||||
<link rel="stylesheet" href="/baidu_netdisk/fe-static/assets/index-a2045d1f.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
<script type="module" crossorigin src="/baidu_netdisk/fe-static/assets/index-db76c961.js"></script>
|
||||
<link rel="stylesheet" href="/baidu_netdisk/fe-static/assets/index-a2045d1f.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,13 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="zanllp_dev_gradio_fe"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -4,6 +4,7 @@ import { autoUploadOutput, type UploadTaskSummary } from '@/api/index'
|
|||
import { delay, Task } from 'vue3-ts-util'
|
||||
import { useGlobalStore } from '@/store/useGlobalStore'
|
||||
import { onBeforeUnmount } from 'vue'
|
||||
import { Loading3QuartersOutlined } from '@/icon'
|
||||
|
||||
const emit = defineEmits<{ (e: 'runningChange', v: boolean): void }>()
|
||||
const global = useGlobalStore()
|
||||
|
|
@ -50,20 +51,25 @@ const onStart = async () => {
|
|||
<template>
|
||||
<div class="container">
|
||||
<AInput v-model:value="global.autoUploadRecvDir"></AInput>
|
||||
<AButton @click="onStart" :loading="running">{{ task ? '暂停' : '开始' }}</AButton>
|
||||
<AButton @click="onStart">
|
||||
<template v-if="task">
|
||||
<Loading3QuartersOutlined spin />
|
||||
</template>
|
||||
{{ task ? '暂停' : '开始' }}
|
||||
</AButton>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="等待上传数量" :value="pendingFiles.length" style="margin-right: 50px" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="上传失败数量" :value="failededFiles" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="已完成数量" :value="completedFiles" style="margin-right: 50px" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="等待上传数量" :value="pendingFiles.length" style="margin-right: 50px" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="上传失败数量" :value="failededFiles" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-statistic title="已完成数量" :value="completedFiles" style="margin-right: 50px" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue