feat(video): implement swipeable vertical feed like TikTok
parent
387ef7875b
commit
dcd4d62c0f
|
|
@ -13,8 +13,8 @@ Promise.resolve().then(async () => {
|
|||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infinite Image Browsing</title>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-5b5fdd56.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-3112bec6.css">
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-40ac36f2.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-07a5c810.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import{d as E,bx as $,r as f,m as M,_ as T,a as c,al as W,h as m,c as v,P as z}from"./index-5b5fdd56.js";var G=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],H={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:z.any,required:Boolean};const L=E({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:$(H,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(a,d){var t=d.attrs,h=d.emit,x=d.expose,o=f(a.checked===void 0?a.defaultChecked:a.checked),i=f();M(function(){return a.checked},function(){o.value=a.checked}),x({focus:function(){var e;(e=i.value)===null||e===void 0||e.focus()},blur:function(){var e;(e=i.value)===null||e===void 0||e.blur()}});var l=f(),g=function(e){if(!a.disabled){a.checked===void 0&&(o.value=e.target.checked),e.shiftKey=l.value;var r={target:c(c({},a),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e};a.checked!==void 0&&(i.value.checked=!!a.checked),h("change",r),l.value=!1}},C=function(e){h("click",e),l.value=e.shiftKey};return function(){var n,e=a.prefixCls,r=a.name,s=a.id,p=a.type,b=a.disabled,K=a.readonly,P=a.tabindex,B=a.autofocus,S=a.value,N=a.required,_=T(a,G),q=t.class,D=t.onFocus,j=t.onBlur,w=t.onKeydown,A=t.onKeypress,F=t.onKeyup,y=c(c({},_),t),O=Object.keys(y).reduce(function(k,u){return(u.substr(0,5)==="aria-"||u.substr(0,5)==="data-"||u==="role")&&(k[u]=y[u]),k},{}),R=W(e,q,(n={},m(n,"".concat(e,"-checked"),o.value),m(n,"".concat(e,"-disabled"),b),n)),V=c(c({name:r,id:s,type:p,readonly:K,disabled:b,tabindex:P,class:"".concat(e,"-input"),checked:!!o.value,autofocus:B,value:S},O),{},{onChange:g,onClick:C,onFocus:D,onBlur:j,onKeydown:w,onKeypress:A,onKeyup:F,required:N});return v("span",{class:R},[v("input",c({ref:i},V),null),v("span",{class:"".concat(e,"-inner")},null)])}}});export{L as V};
|
||||
import{d as E,bB as $,r as f,m as M,_ as T,a as c,an as W,h as m,c as v,P as z}from"./index-40ac36f2.js";var G=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],H={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:z.any,required:Boolean};const L=E({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:$(H,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(a,d){var t=d.attrs,h=d.emit,g=d.expose,o=f(a.checked===void 0?a.defaultChecked:a.checked),i=f();M(function(){return a.checked},function(){o.value=a.checked}),g({focus:function(){var e;(e=i.value)===null||e===void 0||e.focus()},blur:function(){var e;(e=i.value)===null||e===void 0||e.blur()}});var l=f(),x=function(e){if(!a.disabled){a.checked===void 0&&(o.value=e.target.checked),e.shiftKey=l.value;var r={target:c(c({},a),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e};a.checked!==void 0&&(i.value.checked=!!a.checked),h("change",r),l.value=!1}},C=function(e){h("click",e),l.value=e.shiftKey};return function(){var n,e=a.prefixCls,r=a.name,s=a.id,p=a.type,b=a.disabled,K=a.readonly,P=a.tabindex,B=a.autofocus,S=a.value,N=a.required,_=T(a,G),q=t.class,D=t.onFocus,j=t.onBlur,w=t.onKeydown,A=t.onKeypress,F=t.onKeyup,y=c(c({},_),t),O=Object.keys(y).reduce(function(k,u){return(u.substr(0,5)==="aria-"||u.substr(0,5)==="data-"||u==="role")&&(k[u]=y[u]),k},{}),R=W(e,q,(n={},m(n,"".concat(e,"-checked"),o.value),m(n,"".concat(e,"-disabled"),b),n)),V=c(c({name:r,id:s,type:p,readonly:K,disabled:b,tabindex:P,class:"".concat(e,"-input"),checked:!!o.value,autofocus:B,value:S},O),{},{onChange:x,onClick:C,onFocus:D,onBlur:j,onKeydown:w,onKeypress:A,onKeyup:F,required:N});return v("span",{class:R},[v("input",c({ref:i},V),null),v("span",{class:"".concat(e,"-inner")},null)])}}});export{L as V};
|
||||
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{d as a,S as t,T as s,c as n,cx as _,Z as o}from"./index-5b5fdd56.js";const c={class:"img-sli-container"},i=a({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(l){return(e,r)=>(t(),s("div",c,[n(_,{left:e.left,right:e.right},null,8,["left","right"])]))}});const d=o(i,[["__scopeId","data-v-ae3fb9a8"]]);export{d as default};
|
||||
|
|
@ -0,0 +1 @@
|
|||
.img-sli-container[data-v-ec71de83]{position:relative;overflow-y:auto;height:calc(100vh - 40px)}
|
||||
|
|
@ -1 +0,0 @@
|
|||
.img-sli-container[data-v-ae3fb9a8]{position:relative;overflow-y:auto;height:calc(100vh - 40px)}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{d as a,U as t,V as s,c as n,cB as _,a0 as c}from"./index-40ac36f2.js";const o={class:"img-sli-container"},i=a({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(l){return(e,r)=>(t(),s("div",o,[n(_,{left:e.left,right:e.right},null,8,["left","right"])]))}});const p=c(i,[["__scopeId","data-v-ec71de83"]]);export{p as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{d as ce,m as F,ax as re,$ as pe,S as p,T as I,c as l,a2 as e,a1 as n,a4 as R,U as d,J as me,W as o,V as u,a0 as V,ad as ue,Y as _,ae as z,ag as ge,R as fe,ai as G,aN as ve,aO as he,bz as Ie,Z as _e}from"./index-5b5fdd56.js";import{S as ke}from"./index-b9a282d1.js";import{L as Ce,R as we,f as Se,_ as be}from"./MultiSelectKeep-72e9597f.js";import{c as xe,d as ye,F as Me}from"./FileItem-b2542180.js";import{c as Ae,u as Te}from"./hook-ba2adfba.js";import{a as $e}from"./functionalCallableComp-51195a3e.js";import"./shortcut-bdce38ed.js";import"./Checkbox-5fa7cbf6.js";/* empty css */import"./index-a0e30b33.js";import"./index-b6f2a43c.js";import"./_isIterateeCall-c830f443.js";import"./useGenInfoDiff-3e61c6d2.js";const De=c=>(ve("data-v-caebce58"),c=c(),he(),c),Fe={class:"hint"},Re={class:"action-bar"},Ve=De(()=>d("div",{style:{padding:"16px 0 512px"}},null,-1)),ze={key:1},Ge={class:"no-res-hint"},Be={class:"hint"},Ne={key:2,class:"preview-switch"},Ue=ce({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(c){const g=c,f=Ae(t=>Ie(g.selectedTagIds,t)),{queue:B,images:i,onContextMenuClickU:k,stackViewEl:N,previewIdx:r,previewing:C,onPreviewVisibleChange:U,previewImgMove:w,canPreview:S,itemSize:b,gridItems:J,showGenInfo:m,imageGenInfo:x,q:E,multiSelectedIdxs:v,onFileItemClick:L,scroller:y,showMenuIdx:h,onFileDragStart:O,onFileDragEnd:P,cellWidth:W,onScroll:M,saveAllFileAsJson:q,props:K,saveLoadedFileAsJson:Q,changeIndchecked:Y,seedChangeChecked:Z,getGenDiff:j,getGenDiffWatchDep:H}=Te(f);F(()=>g.selectedTagIds,async()=>{var t;await f.reset(),await re(),(t=y.value)==null||t.scrollToItem(0),M()},{immediate:!0}),F(()=>g,async t=>{K.value=t},{deep:!0,immediate:!0});const X=pe(),{onClearAllSelected:ee,onSelectAll:te,onReverseSelect:se}=xe();return(t,s)=>{const le=be,ne=ge,ae=fe,A=G,ie=G,oe=ke;return p(),I("div",{class:"container",ref_key:"stackViewEl",ref:N},[l(le,{show:!!e(v).length||e(X).keepMultiSelect,onClearAllSelected:e(ee),onSelectAll:e(te),onReverseSelect:e(se)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),l(oe,{size:"large",spinning:!e(B).isIdle},{default:n(()=>{var T,$;return[l(ae,{visible:e(m),"onUpdate:visible":s[1]||(s[1]=a=>R(m)?m.value=a:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=a=>m.value=!1)},{cancelText:n(()=>[]),default:n(()=>[l(ne,{active:"",loading:!e(E).isIdle},{default:n(()=>[d("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=a=>e(me)(e(x)))},[d("div",Fe,o(t.$t("doubleClickToCopy")),1),u(" "+o(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),d("div",Re,[l(A,{onClick:e(Q)},{default:n(()=>[u(o(t.$t("saveLoadedImageAsJson")),1)]),_:1},8,["onClick"]),l(A,{onClick:e(q)},{default:n(()=>[u(o(t.$t("saveAllAsJson")),1)]),_:1},8,["onClick"])]),(T=e(i))!=null&&T.length?(p(),V(e(ye),{key:0,ref_key:"scroller",ref:y,class:"file-list",items:e(i),"item-size":e(b).first,"key-field":"fullpath","item-secondary-size":e(b).second,gridItems:e(J),onScroll:e(M)},{after:n(()=>[Ve]),default:n(({item:a,index:D})=>[l(Me,{idx:D,file:a,"cell-width":e(W),"show-menu-idx":e(h),"onUpdate:showMenuIdx":s[3]||(s[3]=de=>R(h)?h.value=de:null),onDragstart:e(O),onDragend:e(P),onFileItemClick:e(L),"full-screen-preview-image-url":e(i)[e(r)]?e(ue)(e(i)[e(r)]):"",selected:e(v).includes(D),onContextMenuClick:e(k),onPreviewVisibleChange:e(U),"is-selected-mutil-files":e(v).length>1,"enable-change-indicator":e(Y),"seed-change-checked":e(Z),"get-gen-diff":e(j),"get-gen-diff-watch-dep":e(H)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):e(f).load&&t.selectedTagIds.and_tags.length===1&&!(($=t.selectedTagIds.folder_paths_str)!=null&&$.trim())?(p(),I("div",ze,[d("div",Ge,[d("p",Be,o(t.$t("tagSearchNoResultsMessage")),1),l(ie,{onClick:s[4]||(s[4]=a=>e($e)()),type:"primary"},{default:n(()=>[u(o(t.$t("rebuildImageIndex")),1)]),_:1})])])):_("",!0),e(C)?(p(),I("div",Ne,[l(e(Ce),{onClick:s[5]||(s[5]=a=>e(w)("prev")),class:z({disable:!e(S)("prev")})},null,8,["class"]),l(e(we),{onClick:s[6]||(s[6]=a=>e(w)("next")),class:z({disable:!e(S)("next")})},null,8,["class"])])):_("",!0)]}),_:1},8,["spinning"]),e(C)&&e(i)&&e(i)[e(r)]?(p(),V(Se,{key:0,file:e(i)[e(r)],idx:e(r),onContextMenuClick:e(k)},null,8,["file","idx","onContextMenuClick"])):_("",!0)],512)}}});const Xe=_e(Ue,[["__scopeId","data-v-caebce58"]]);export{Xe as default};
|
||||
|
|
@ -0,0 +1 @@
|
|||
.container[data-v-f0bfdd51]{background:var(--zp-secondary-background);position:relative}.container .action-bar[data-v-f0bfdd51]{display:flex;align-items:center;user-select:none;gap:4px;padding:4px}.container .action-bar>*[data-v-f0bfdd51]{flex-wrap:wrap}.container .file-list[data-v-f0bfdd51]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 40px);width:100%}.container .no-res-hint[data-v-f0bfdd51]{height:var(--pane-max-height);display:flex;align-items:center;flex-direction:column;justify-content:center}.container .no-res-hint .hint[data-v-f0bfdd51]{font-size:1.6em;margin-bottom:2em;text-align:center}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{d as pe,m as F,az as ue,a1 as me,U as p,V as I,c as s,a4 as e,a3 as i,a6 as R,W as d,K as ge,Y as o,X as u,a2 as z,af as fe,aS as ve,$ as _,ag as G,ai as he,T as ke,ak as B,aP as Ie,aQ as _e,bD as we,a0 as Ce}from"./index-40ac36f2.js";import{S as Se}from"./index-7e24fc24.js";import{L as be,R as xe,f as ye,o as Me,_ as Ae}from"./MultiSelectKeep-1264212b.js";import{c as Te,d as Ve,F as $e}from"./FileItem-0284048a.js";import{c as De,u as Fe}from"./hook-91a6d4b5.js";import"./shortcut-8a584dd4.js";import"./Checkbox-15fcde4f.js";/* empty css */import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js";import"./index-819118ae.js";import"./index-79d0524b.js";import"./_isIterateeCall-2083df16.js";import"./useGenInfoDiff-28140e55.js";const Re=r=>(Ie("data-v-f0bfdd51"),r=r(),_e(),r),ze={class:"hint"},Ge={class:"action-bar"},Be=Re(()=>d("div",{style:{padding:"16px 0 512px"}},null,-1)),Ue={key:1},Ne={class:"no-res-hint"},Pe={class:"hint"},Ee={key:2,class:"preview-switch"},Je=pe({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(r){const g=r,f=De(t=>we(g.selectedTagIds,t)),{queue:U,images:n,onContextMenuClickU:w,stackViewEl:N,previewIdx:c,previewing:C,onPreviewVisibleChange:P,previewImgMove:S,canPreview:b,itemSize:x,gridItems:E,showGenInfo:m,imageGenInfo:y,q:J,multiSelectedIdxs:v,onFileItemClick:L,scroller:M,showMenuIdx:h,onFileDragStart:W,onFileDragEnd:K,cellWidth:O,onScroll:A,saveAllFileAsJson:q,props:Q,saveLoadedFileAsJson:X,changeIndchecked:Y,seedChangeChecked:j,getGenDiff:H,getGenDiffWatchDep:Z}=Fe(f);F(()=>g.selectedTagIds,async()=>{var t;await f.reset(),await ue(),(t=M.value)==null||t.scrollToItem(0),A()},{immediate:!0}),F(()=>g,async t=>{Q.value=t},{deep:!0,immediate:!0});const ee=me(),{onClearAllSelected:te,onSelectAll:le,onReverseSelect:se}=Te(),ne=()=>{n.value.length!==0&&Me(n.value,0)};return(t,l)=>{const ie=Ae,ae=he,oe=ke,k=B,de=B,re=Se;return p(),I("div",{class:"container",ref_key:"stackViewEl",ref:N},[s(ie,{show:!!e(v).length||e(ee).keepMultiSelect,onClearAllSelected:e(te),onSelectAll:e(le),onReverseSelect:e(se)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),s(re,{size:"large",spinning:!e(U).isIdle},{default:i(()=>{var T,V,$;return[s(oe,{visible:e(m),"onUpdate:visible":l[1]||(l[1]=a=>R(m)?m.value=a:null),width:"70vw","mask-closable":"",onOk:l[2]||(l[2]=a=>m.value=!1)},{cancelText:i(()=>[]),default:i(()=>[s(ae,{active:"",loading:!e(J).isIdle},{default:i(()=>[d("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:l[0]||(l[0]=a=>e(ge)(e(y)))},[d("div",ze,o(t.$t("doubleClickToCopy")),1),u(" "+o(e(y)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),d("div",Ge,[s(k,{onClick:ne,type:"primary",disabled:!((T=e(n))!=null&&T.length)},{default:i(()=>[u(o(t.$t("tiktokView")),1)]),_:1},8,["disabled"]),s(k,{onClick:e(X)},{default:i(()=>[u(o(t.$t("saveLoadedImageAsJson")),1)]),_:1},8,["onClick"]),s(k,{onClick:e(q)},{default:i(()=>[u(o(t.$t("saveAllAsJson")),1)]),_:1},8,["onClick"])]),(V=e(n))!=null&&V.length?(p(),z(e(Ve),{key:0,ref_key:"scroller",ref:M,class:"file-list",items:e(n),"item-size":e(x).first,"key-field":"fullpath","item-secondary-size":e(x).second,gridItems:e(E),onScroll:e(A)},{after:i(()=>[Be]),default:i(({item:a,index:D})=>[s($e,{idx:D,file:a,"cell-width":e(O),"show-menu-idx":e(h),"onUpdate:showMenuIdx":l[3]||(l[3]=ce=>R(h)?h.value=ce:null),onDragstart:e(W),onDragend:e(K),onFileItemClick:e(L),"full-screen-preview-image-url":e(n)[e(c)]?e(fe)(e(n)[e(c)]):"",selected:e(v).includes(D),onContextMenuClick:e(w),onPreviewVisibleChange:e(P),"is-selected-mutil-files":e(v).length>1,"enable-change-indicator":e(Y),"seed-change-checked":e(j),"get-gen-diff":e(H),"get-gen-diff-watch-dep":e(Z)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange","is-selected-mutil-files","enable-change-indicator","seed-change-checked","get-gen-diff","get-gen-diff-watch-dep"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):e(f).load&&t.selectedTagIds.and_tags.length===1&&!(($=t.selectedTagIds.folder_paths_str)!=null&&$.trim())?(p(),I("div",Ue,[d("div",Ne,[d("p",Pe,o(t.$t("tagSearchNoResultsMessage")),1),s(de,{onClick:l[4]||(l[4]=a=>e(ve)()),type:"primary"},{default:i(()=>[u(o(t.$t("rebuildImageIndex")),1)]),_:1})])])):_("",!0),e(C)?(p(),I("div",Ee,[s(e(be),{onClick:l[5]||(l[5]=a=>e(S)("prev")),class:G({disable:!e(b)("prev")})},null,8,["class"]),s(e(xe),{onClick:l[6]||(l[6]=a=>e(S)("next")),class:G({disable:!e(b)("next")})},null,8,["class"])])):_("",!0)]}),_:1},8,["spinning"]),e(C)&&e(n)&&e(n)[e(c)]?(p(),z(ye,{key:0,file:e(n)[e(c)],idx:e(c),onContextMenuClick:e(w)},null,8,["file","idx","onContextMenuClick"])):_("",!0)],512)}}});const lt=Ce(Je,[["__scopeId","data-v-f0bfdd51"]]);export{lt as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container[data-v-caebce58]{background:var(--zp-secondary-background);position:relative}.container .action-bar[data-v-caebce58]{display:flex;align-items:center;user-select:none;gap:4px;padding:4px}.container .action-bar>*[data-v-caebce58]{flex-wrap:wrap}.container .file-list[data-v-caebce58]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 40px);width:100%}.container .no-res-hint[data-v-caebce58]{height:var(--pane-max-height);display:flex;align-items:center;flex-direction:column;justify-content:center}.container .no-res-hint .hint[data-v-caebce58]{font-size:1.6em;margin-bottom:2em;text-align:center}
|
||||
|
|
@ -0,0 +1 @@
|
|||
.full-screen-menu[data-v-bdff5e8a]{position:fixed;z-index:9999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-bdff5e8a]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-bdff5e8a]{margin-right:4px;margin-bottom:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-bdff5e8a]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-bdff5e8a]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-bdff5e8a]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info code[data-v-bdff5e8a]{font-size:.9em;display:block;padding:4px;background:var(--zp-primary-background);border-radius:4px;margin-right:20px;white-space:pre-wrap;word-break:break-word;line-height:1.78em}.full-screen-menu .gen-info code[data-v-bdff5e8a] .short-tag{word-break:break-all;white-space:nowrap}.full-screen-menu .gen-info code[data-v-bdff5e8a] span.tag{background:var(--zp-secondary-variant-background);color:var(--zp-primary);padding:2px 4px;border-radius:6px;margin-right:6px;margin-top:4px;line-height:1.3em;display:inline-block}.full-screen-menu .gen-info code[data-v-bdff5e8a] .has-parentheses.tag{background:rgba(255,100,100,.14)}.full-screen-menu .gen-info code[data-v-bdff5e8a] span.tag:hover{background:rgba(120,0,0,.15)}.full-screen-menu .gen-info table[data-v-bdff5e8a]{font-size:1em;border-radius:4px;border-collapse:separate;margin-bottom:3em}.full-screen-menu .gen-info table tr td[data-v-bdff5e8a]:first-child{white-space:nowrap}.full-screen-menu .gen-info table td[data-v-bdff5e8a]{padding-right:14px;padding-left:4px;border-bottom:1px solid var(--zp-secondary);border-collapse:collapse}.full-screen-menu .gen-info .info-tags .info-tag[data-v-bdff5e8a]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-bdff5e8a]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px;border-bottom-right-radius:4px}.full-screen-menu .gen-info .info-tags .value[data-v-bdff5e8a]{padding:4px}.full-screen-menu.unset-size[data-v-bdff5e8a]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-bdff5e8a]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-bdff5e8a]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-bdff5e8a]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-bdff5e8a]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-bdff5e8a]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-bdff5e8a]{flex-wrap:wrap}.full-screen-menu.lr[data-v-bdff5e8a]{top:var(--5fcd4629)!important;right:0!important;bottom:0!important;left:100vw!important;height:unset!important;width:var(--a6e55e48)!important;transition:left ease .3s}.full-screen-menu.lr.always-on[data-v-bdff5e8a],.full-screen-menu.lr.mouse-in[data-v-bdff5e8a]{left:var(--0cfa8da0)!important}.tag-alpha-item[data-v-bdff5e8a]{display:flex;margin-top:4px}.tag-alpha-item h4[data-v-bdff5e8a]{width:32px;flex-shrink:0}.sort-tag-switch[data-v-bdff5e8a]{display:inline-block;padding-right:16px;padding-left:8px;cursor:pointer;user-select:none}.sort-tag-switch span[data-v-bdff5e8a]{transition:all ease .3s;transform:scale(1.2)}.sort-tag-switch:hover span[data-v-bdff5e8a]{transform:scale(1.3)}.lr-layout-control[data-v-bdff5e8a]{display:flex;align-items:center;gap:16px;padding:4px 8px;flex-wrap:wrap;border-radius:2px;border-left:3px solid var(--zp-luminous);background-color:var(--zp-secondary-background)}.lr-layout-control .ctrl-item[data-v-bdff5e8a]{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}.select-actions[data-v-b6f9a67c]>:not(:last-child){margin-right:4px}.float-panel[data-v-b6f9a67c]{position:absolute;bottom:32px;right:32px;background:var(--zp-primary-background);border-radius:4px;z-index:1000;padding:8px;box-shadow:0 0 4px var(--zp-secondary)}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
.full-screen-menu[data-v-9ad72ee9]{position:fixed;z-index:9999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-9ad72ee9]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-9ad72ee9]{margin-right:4px;margin-bottom:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-9ad72ee9]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-9ad72ee9]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-9ad72ee9]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info code[data-v-9ad72ee9]{font-size:.9em;display:block;padding:4px;background:var(--zp-primary-background);border-radius:4px;margin-right:20px;white-space:pre-wrap;word-break:break-word;line-height:1.78em}.full-screen-menu .gen-info code[data-v-9ad72ee9] .short-tag{word-break:break-all;white-space:nowrap}.full-screen-menu .gen-info code[data-v-9ad72ee9] span.tag{background:var(--zp-secondary-variant-background);color:var(--zp-primary);padding:2px 4px;border-radius:6px;margin-right:6px;margin-top:4px;line-height:1.3em;display:inline-block}.full-screen-menu .gen-info code[data-v-9ad72ee9] .has-parentheses.tag{background:rgba(255,100,100,.14)}.full-screen-menu .gen-info code[data-v-9ad72ee9] span.tag:hover{background:rgba(120,0,0,.15)}.full-screen-menu .gen-info table[data-v-9ad72ee9]{font-size:1em;border-radius:4px;border-collapse:separate;margin-bottom:3em}.full-screen-menu .gen-info table tr td[data-v-9ad72ee9]:first-child{white-space:nowrap}.full-screen-menu .gen-info table td[data-v-9ad72ee9]{padding-right:14px;padding-left:4px;border-bottom:1px solid var(--zp-secondary);border-collapse:collapse}.full-screen-menu .gen-info .info-tags .info-tag[data-v-9ad72ee9]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-9ad72ee9]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px;border-bottom-right-radius:4px}.full-screen-menu .gen-info .info-tags .value[data-v-9ad72ee9]{padding:4px}.full-screen-menu.unset-size[data-v-9ad72ee9]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-9ad72ee9]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-9ad72ee9]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-9ad72ee9]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-9ad72ee9]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-9ad72ee9]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-9ad72ee9]{flex-wrap:wrap}.full-screen-menu.lr[data-v-9ad72ee9]{top:var(--d25885fc)!important;right:0!important;bottom:0!important;left:100vw!important;height:unset!important;width:var(--3bd17575)!important;transition:left ease .3s}.full-screen-menu.lr.always-on[data-v-9ad72ee9],.full-screen-menu.lr.mouse-in[data-v-9ad72ee9]{left:var(--24523279)!important}.tag-alpha-item[data-v-9ad72ee9]{display:flex;margin-top:4px}.tag-alpha-item h4[data-v-9ad72ee9]{width:32px;flex-shrink:0}.sort-tag-switch[data-v-9ad72ee9]{display:inline-block;padding-right:16px;padding-left:8px;cursor:pointer;user-select:none}.sort-tag-switch span[data-v-9ad72ee9]{transition:all ease .3s;transform:scale(1.2)}.sort-tag-switch:hover span[data-v-9ad72ee9]{transform:scale(1.3)}.lr-layout-control[data-v-9ad72ee9]{display:flex;align-items:center;gap:16px;padding:4px 8px;flex-wrap:wrap;border-radius:2px;border-left:3px solid var(--zp-luminous);background-color:var(--zp-secondary-background)}.lr-layout-control .ctrl-item[data-v-9ad72ee9]{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}.select-actions[data-v-b04c3508]>:not(:last-child){margin-right:4px}.float-panel[data-v-b04c3508]{position:absolute;bottom:32px;right:32px;background:var(--zp-primary-background);border-radius:4px;z-index:1000;padding:8px;box-shadow:0 0 4px var(--zp-secondary)}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
[data-v-127e6fd2] .float-panel{position:fixed}.regex-icon[data-v-127e6fd2]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-127e6fd2]{height:1.5em}.regex-icon[data-v-127e6fd2]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-127e6fd2]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-127e6fd2]{padding:8px 8px 0;display:flex}.search-bar.last[data-v-127e6fd2]{padding-bottom:8px}.search-bar .form-name[data-v-127e6fd2]{flex-shrink:0;padding:4px 8px}.search-bar .actions>*[data-v-127e6fd2]{margin-right:4px}.container[data-v-127e6fd2]{background:var(--zp-secondary-background);position:relative}.container .file-list[data-v-127e6fd2]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%}
|
||||
|
|
@ -0,0 +1 @@
|
|||
[data-v-5145f12c] .float-panel{position:fixed}.regex-icon[data-v-5145f12c]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-5145f12c]{height:1.5em}.regex-icon[data-v-5145f12c]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-5145f12c]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-5145f12c]{padding:8px 8px 0;display:flex}.search-bar.last[data-v-5145f12c]{padding-bottom:8px}.search-bar .form-name[data-v-5145f12c]{flex-shrink:0;padding:4px 8px}.search-bar .actions>*[data-v-5145f12c]{margin-right:4px}.container[data-v-5145f12c]{background:var(--zp-secondary-background);position:relative}.container .file-list[data-v-5145f12c]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%}
|
||||
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
|
|
@ -0,0 +1 @@
|
|||
import{bT as i,b0 as t,dU as f,bK as n}from"./index-40ac36f2.js";function u(e,s,r){if(!i(r))return!1;var a=typeof s;return(a=="number"?t(r)&&f(s,r.length):a=="string"&&s in r)?n(r[s],e):!1}export{u as i};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{bP as i,aY as t,dI as f,bG as n}from"./index-5b5fdd56.js";function u(e,a,r){if(!i(r))return!1;var s=typeof a;return(s=="number"?t(r)&&f(a,r.length):s=="string"&&a in r)?n(r[a],e):!1}export{u as i};
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container[data-v-a2642a17]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-a2642a17]{padding:8px;background-color:var(--zp-primary-background)}.container .actions-panel.actions[data-v-a2642a17]{display:flex;align-items:center;gap:16px;z-index:333}.container .file-list[data-v-a2642a17]{flex:1;z-index:222;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-a2642a17]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{d as F,$,cy as S,c6 as B,S as _,T as w,U as f,c as l,a1 as d,V as p,W as c,a2 as s,a0 as A,ad as R,cz as T,cA as y,y as V,z as x,ai as E,Z as U}from"./index-5b5fdd56.js";import{_ as N}from"./index-a0e30b33.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-b2542180.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./_isIterateeCall-c830f443.js";import"./index-b6f2a43c.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},Z=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(J){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=$(),m=O(),{selectdFiles:a}=S(m),r=B(),v=async e=>{const t=T(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=E,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:K=>z(k),"full-screen-preview-image-url":s(R)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const ae=U(Z,[["__scopeId","data-v-a2642a17"]]);export{ae as default};
|
||||
|
|
@ -0,0 +1 @@
|
|||
.container[data-v-3d7e6f2d]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-3d7e6f2d]{padding:8px;background-color:var(--zp-primary-background)}.container .actions-panel.actions[data-v-3d7e6f2d]{display:flex;align-items:center;gap:16px;z-index:333}.container .file-list[data-v-3d7e6f2d]{flex:1;z-index:222;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-3d7e6f2d]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{d as F,a1 as B,cC as $,ca as S,U as _,V as w,W as f,c as l,a3 as d,X as p,Y as c,a4 as s,a2 as A,af as E,cD as R,cE as y,z as V,B as x,ak as T,a0 as U}from"./index-40ac36f2.js";import{_ as N}from"./index-819118ae.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-0284048a.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js";/* empty css */import"./_isIterateeCall-2083df16.js";import"./index-79d0524b.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},X=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(Y){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=B(),m=O(),{selectdFiles:a}=$(m),r=S(),v=async e=>{const t=R(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=T,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:J=>z(k),"full-screen-preview-image-url":s(E)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const ae=U(X,[["__scopeId","data-v-3d7e6f2d"]]);export{ae 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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-checkbox{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";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner,.ant-checkbox-input:focus+.ant-checkbox-inner{border-color:#d03f0a}.ant-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #d03f0a;border-radius:2px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-checkbox:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox:after{visibility:visible}.ant-checkbox-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;border-collapse:separate;transition:all .3s}.ant-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:5.71428571px;height:9.14285714px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-checkbox-checked .ant-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-checkbox-checked .ant-checkbox-inner{background-color:#d03f0a;border-color:#d03f0a}.ant-checkbox-disabled{cursor:not-allowed}.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-checkbox-disabled .ant-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-checkbox-disabled .ant-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-checkbox-disabled:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox-disabled:after{visibility:hidden}.ant-checkbox-wrapper{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";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-checkbox-wrapper.ant-checkbox-wrapper-disabled{cursor:not-allowed}.ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:8px}.ant-checkbox+span{padding-right:8px;padding-left:8px}.ant-checkbox-group{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";display:inline-block}.ant-checkbox-group-item{margin-right:8px}.ant-checkbox-group-item:last-child{margin-right:0}.ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:0}.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-checkbox-indeterminate .ant-checkbox-inner:after{top:50%;left:50%;width:8px;height:8px;background-color:#d03f0a;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-checkbox-rtl{direction:rtl}.ant-checkbox-group-rtl .ant-checkbox-group-item{margin-right:0;margin-left:8px}.ant-checkbox-group-rtl .ant-checkbox-group-item:last-child{margin-left:0!important}.ant-checkbox-group-rtl .ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:8px}.panel[data-v-6af57e34]{padding:8px;margin:16px;border-radius:8px;background:var(--zp-primary-background);overflow:auto;height:calc(100% - 32px)}.panel[data-v-6af57e34]>:not(:first-child){margin-left:16px}.lang-select-wrap[data-v-6af57e34]{width:128px;display:inline-block;padding-right:16px}h2[data-v-6af57e34]{margin:64px 0 16px;font-weight:700}.row[data-v-6af57e34]{margin-top:16px;padding:0 16px}.col[data-v-6af57e34]{display:flex}.col.conflict[data-v-6af57e34]{border-bottom:1px solid red;position:relative}.col.conflict[data-v-6af57e34]:after{position:absolute;top:-16px;left:0;background:white;color:red;content:"conflict"}.clear-btn[data-v-6af57e34]{margin-left:16px}
|
||||
@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-checkbox{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";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner,.ant-checkbox-input:focus+.ant-checkbox-inner{border-color:#d03f0a}.ant-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #d03f0a;border-radius:2px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-checkbox:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox:after{visibility:visible}.ant-checkbox-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;border-collapse:separate;transition:all .3s}.ant-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:5.71428571px;height:9.14285714px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-checkbox-checked .ant-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-checkbox-checked .ant-checkbox-inner{background-color:#d03f0a;border-color:#d03f0a}.ant-checkbox-disabled{cursor:not-allowed}.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-checkbox-disabled .ant-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-checkbox-disabled .ant-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-checkbox-disabled:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox-disabled:after{visibility:hidden}.ant-checkbox-wrapper{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";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-checkbox-wrapper.ant-checkbox-wrapper-disabled{cursor:not-allowed}.ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:8px}.ant-checkbox+span{padding-right:8px;padding-left:8px}.ant-checkbox-group{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";display:inline-block}.ant-checkbox-group-item{margin-right:8px}.ant-checkbox-group-item:last-child{margin-right:0}.ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:0}.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-checkbox-indeterminate .ant-checkbox-inner:after{top:50%;left:50%;width:8px;height:8px;background-color:#d03f0a;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-checkbox-rtl{direction:rtl}.ant-checkbox-group-rtl .ant-checkbox-group-item{margin-right:0;margin-left:8px}.ant-checkbox-group-rtl .ant-checkbox-group-item:last-child{margin-left:0!important}.ant-checkbox-group-rtl .ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:8px}.panel[data-v-770b7036]{padding:8px;margin:16px;border-radius:8px;background:var(--zp-primary-background);overflow:auto;height:calc(100% - 32px)}.panel[data-v-770b7036]>:not(:first-child){margin-left:16px}.lang-select-wrap[data-v-770b7036]{width:128px;display:inline-block;padding-right:16px}h2[data-v-770b7036]{margin:64px 0 16px;font-weight:700}.row[data-v-770b7036]{margin-top:16px;padding:0 16px}.col[data-v-770b7036]{display:flex}.col.conflict[data-v-770b7036]{border-bottom:1px solid red;position:relative}.col.conflict[data-v-770b7036]:after{position:absolute;top:-16px;left:0;background:white;color:red;content:"conflict"}.clear-btn[data-v-770b7036]{margin-left:16px}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{u as w,a as k,F as y,d as b}from"./FileItem-0284048a.js";import{d as x,a1 as F,c7 as D,r as h,bg as I,bk as C,U as V,V as E,c as n,a3 as z,a4 as e,af as S,cD as B,cF as R,a0 as A}from"./index-40ac36f2.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js";/* empty css */import"./_isIterateeCall-2083df16.js";import"./index-79d0524b.js";const K=x({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,d=F(),{stackViewEl:m}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=k(),g=D(),a=h(o.files??[]),_=async s=>{const l=B(s);o.allowDragAndDrop&&l&&(a.value=R([...a.value,...l.nodes]))},v=s=>{a.value.splice(s,1)};return I(()=>{d.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(V(),E("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[n(e(b),{ref:"scroller",class:"file-list",items:a.value.slice(),"item-size":e(i).first,"key-field":"fullpath","item-secondary-size":e(i).second,gridItems:e(u)},{default:z(({item:t,index:r})=>{var c;return[n(y,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:T=>v(r),"full-screen-preview-image-url":e(S)(t),"extra-tags":(c=t==null?void 0:t.tags)==null?void 0:c.map(e(g).tagConvert),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","enable-close-icon","onCloseIconClick","full-screen-preview-image-url","extra-tags"])]}),_:1},8,["items","item-size","item-secondary-size","gridItems"])],544))}});const N=A(K,[["__scopeId","data-v-0c31f6b2"]]);export{N as default};
|
||||
|
|
@ -0,0 +1 @@
|
|||
.container[data-v-0c31f6b2]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-0c31f6b2]{padding:8px;background-color:var(--zp-primary-background)}.container .file-list[data-v-0c31f6b2]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-0c31f6b2]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{u as w,a as y,F as k,d as x}from"./FileItem-b2542180.js";import{d as F,$ as b,c3 as h,r as D,bc as I,bg as C,S as z,T as E,c as n,a1 as S,a2 as e,ad as V,cz as B,cB as R,Z as T}from"./index-5b5fdd56.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./_isIterateeCall-c830f443.js";import"./index-b6f2a43c.js";const $=F({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,d=b(),{stackViewEl:m}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=y(),g=h(),a=D(o.files??[]),_=async s=>{const l=B(s);o.allowDragAndDrop&&l&&(a.value=R([...a.value,...l.nodes]))},v=s=>{a.value.splice(s,1)};return I(()=>{d.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(z(),E("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[n(e(x),{ref:"scroller",class:"file-list",items:a.value.slice(),"item-size":e(i).first,"key-field":"fullpath","item-secondary-size":e(i).second,gridItems:e(u)},{default:S(({item:t,index:r})=>{var c;return[n(k,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:A=>v(r),"full-screen-preview-image-url":e(V)(t),"extra-tags":(c=t==null?void 0:t.tags)==null?void 0:c.map(e(g).tagConvert),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","enable-close-icon","onCloseIconClick","full-screen-preview-image-url","extra-tags"])]}),_:1},8,["items","item-size","item-secondary-size","gridItems"])],544))}});const U=T($,[["__scopeId","data-v-f35f4802"]]);export{U as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container[data-v-f35f4802]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-f35f4802]{padding:8px;background-color:var(--zp-primary-background)}.container .file-list[data-v-f35f4802]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-f35f4802]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{am as F,r as g,l as P,k as A,N as b,G as R,ca as q,cl as z,cp as L}from"./index-40ac36f2.js";import{u as O,a as Q,b as j,e as H}from"./FileItem-0284048a.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-1264212b.js";import{u as B}from"./useGenInfoDiff-28140e55.js";let K=0;const V=()=>++K,X=(n,i,{dataUpdateStrategy:l="replace"}={})=>{const o=F([""]),c=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,w=e=>{var s;l==="replace"?t.value=e:l==="merge"&&(b((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(s=t==null?void 0:t.value)!==null&&s!==void 0?s:[],...e])},d=e=>A(void 0,void 0,void 0,function*(){if(a.value||c.value&&typeof e>"u")return!1;a.value=!0;const s=V();f.value=s;try{let r;if(typeof e=="number"){if(r=o[e],typeof r!="string")return!1}else r=o[o.length-1];const h=yield n(r);if(v.has(s))return v.delete(s),!1;w(i(h));const u=h.cursor;if((e===o.length-1||typeof e!="number")&&(c.value=!u.has_next,u.has_next)){const m=u.next_cursor||u.next;b(typeof m=="string"),o.push(m)}}finally{f.value===s&&(a.value=!1)}return!0}),y=()=>{v.add(f.value),a.value=!1},x=(e=!1)=>A(void 0,void 0,void 0,function*(){const{refetch:s,force:r}=typeof e=="object"?e:{refetch:e};r&&y(),b(!a.value),o.splice(0,o.length,""),a.value=!1,t.value=void 0,c.value=!1,s&&(yield d())}),I=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return P({abort:y,load:c,next:d,res:t,loading:a,cursorStack:o,reset:x,[Symbol.asyncIterator]:I,iter:{[Symbol.asyncIterator]:I}})},se=n=>F(X(n,i=>i.files,{dataUpdateStrategy:"merge"})),ne=n=>{const i=F(new Set),l=R(()=>(n.res??[]).filter(p=>!i.has(p.fullpath))),o=q(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=O({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:y,onScroll:x}=Q({fetchNext:()=>n.next()}),{showMenuIdx:I}=j(),{onFileDragStart:e,onFileDragEnd:s}=T(),{showGenInfo:r,imageGenInfo:h,q:u,onContextMenuClick:m,onFileItemClick:C}=U({openNext:z}),{previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:N,canPreview:D}=W({loadNext:()=>n.next()}),G=async(p,S,J)=>{a.value=[{curr:"",files:l.value}],await m(p,S,J)};H("removeFiles",async({paths:p})=>{p.forEach(S=>i.add(S))});const k=()=>{L(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:G,stackViewEl:c,previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:N,canPreview:D,itemSize:w,gridItems:d,showGenInfo:r,imageGenInfo:h,q:u,onContextMenuClick:m,onFileItemClick:C,showMenuIdx:I,multiSelectedIdxs:t,onFileDragStart:e,onFileDragEnd:s,cellWidth:y,onScroll:x,saveLoadedFileAsJson:k,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();k()},props:v,...B()}};export{se as c,ne as u};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{ak as k,r as g,l as R,k as A,L as b,E as q,c6 as G,ch as L,cl as z}from"./index-5b5fdd56.js";import{u as O,a as Q,b as j,e as H}from"./FileItem-b2542180.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-72e9597f.js";import{u as B}from"./useGenInfoDiff-3e61c6d2.js";let K=0;const V=()=>++K,X=(n,i,{dataUpdateStrategy:l="replace"}={})=>{const o=k([""]),c=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,w=e=>{var s;l==="replace"?t.value=e:l==="merge"&&(b((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(s=t==null?void 0:t.value)!==null&&s!==void 0?s:[],...e])},d=e=>A(void 0,void 0,void 0,function*(){if(a.value||c.value&&typeof e>"u")return!1;a.value=!0;const s=V();f.value=s;try{let r;if(typeof e=="number"){if(r=o[e],typeof r!="string")return!1}else r=o[o.length-1];const I=yield n(r);if(v.has(s))return v.delete(s),!1;w(i(I));const u=I.cursor;if((e===o.length-1||typeof e!="number")&&(c.value=!u.has_next,u.has_next)){const y=u.next_cursor||u.next;b(typeof y=="string"),o.push(y)}}finally{f.value===s&&(a.value=!1)}return!0}),p=()=>{v.add(f.value),a.value=!1},x=(e=!1)=>A(void 0,void 0,void 0,function*(){const{refetch:s,force:r}=typeof e=="object"?e:{refetch:e};r&&p(),b(!a.value),o.splice(0,o.length,""),a.value=!1,t.value=void 0,c.value=!1,s&&(yield d())}),h=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return R({abort:p,load:c,next:d,res:t,loading:a,cursorStack:o,reset:x,[Symbol.asyncIterator]:h,iter:{[Symbol.asyncIterator]:h}})},se=n=>k(X(n,i=>i.files,{dataUpdateStrategy:"merge"})),ne=n=>{const i=k(new Set),l=q(()=>(n.res??[]).filter(m=>!i.has(m.fullpath))),o=G(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=O({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:p,onScroll:x}=Q({fetchNext:()=>n.next()}),{showMenuIdx:h}=j(),{onFileDragStart:e,onFileDragEnd:s}=T(),{showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C}=U({openNext:L}),{previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J}=W({loadNext:()=>n.next()}),N=async(m,S,P)=>{a.value=[{curr:"",files:l.value}],await y(m,S,P)};H("removeFiles",async({paths:m})=>{m.forEach(S=>i.add(S))});const F=()=>{z(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:N,stackViewEl:c,previewIdx:E,previewing:_,onPreviewVisibleChange:M,previewImgMove:D,canPreview:J,itemSize:w,gridItems:d,showGenInfo:r,imageGenInfo:I,q:u,onContextMenuClick:y,onFileItemClick:C,showMenuIdx:h,multiSelectedIdxs:t,onFileDragStart:e,onFileDragEnd:s,cellWidth:p,onScroll:x,saveLoadedFileAsJson:F,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();F()},props:v,...B()}};export{se as c,ne as u};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{r as F,o as P,cq as K,at as L,E as i,av as T,aw as I,d as E,u as $,cr as _,b as y,bf as V,cs as A,al as B,h as c,c as M,a as G}from"./index-5b5fdd56.js";const W=function(){var o=F(!1);return P(function(){o.value=K()}),o};var D=Symbol("rowContextKey"),q=function(r){T(D,r)},U=function(){return L(D,{gutter:i(function(){}),wrap:i(function(){}),supportFlexGap:i(function(){})})};I("top","middle","bottom","stretch");I("start","end","center","space-around","space-between");var k=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},H=E({compatConfig:{MODE:3},name:"ARow",props:k(),setup:function(r,N){var m=N.slots,v=$("row",r),d=v.prefixCls,h=v.direction,j,x=F({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=W();P(function(){j=_.subscribe(function(e){var t=r.gutter||0;(!Array.isArray(t)&&y(t)==="object"||Array.isArray(t)&&(y(t[0])==="object"||y(t[1])==="object"))&&(x.value=e)})}),V(function(){_.unsubscribe(j)});var S=i(function(){var e=[0,0],t=r.gutter,n=t===void 0?0:t,s=Array.isArray(n)?n:[n,0];return s.forEach(function(l,b){if(y(l)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&l[p]!==void 0){e[b]=l[p];break}}else e[b]=l||0}),e});q({gutter:S,supportFlexGap:w,wrap:i(function(){return r.wrap})});var R=i(function(){var e;return B(d.value,(e={},c(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),c(e,"".concat(d.value,"-").concat(r.justify),r.justify),c(e,"".concat(d.value,"-").concat(r.align),r.align),c(e,"".concat(d.value,"-rtl"),h.value==="rtl"),e))}),O=i(function(){var e=S.value,t={},n=e[0]>0?"".concat(e[0]/-2,"px"):void 0,s=e[1]>0?"".concat(e[1]/-2,"px"):void 0;return n&&(t.marginLeft=n,t.marginRight=n),w.value?t.rowGap="".concat(e[1],"px"):s&&(t.marginTop=s,t.marginBottom=s),t});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});const Y=H;function J(o){return typeof o=="number"?"".concat(o," ").concat(o," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(o)?"0 0 ".concat(o):o}var Q=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Z=E({compatConfig:{MODE:3},name:"ACol",props:Q(),setup:function(r,N){var m=N.slots,v=U(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=$("col",r),w=x.prefixCls,S=x.direction,R=i(function(){var e,t=r.span,n=r.order,s=r.offset,l=r.push,b=r.pull,a=w.value,p={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(g){var f,u={},C=r[g];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},c(f,"".concat(a,"-").concat(g,"-").concat(u.span),u.span!==void 0),c(f,"".concat(a,"-").concat(g,"-order-").concat(u.order),u.order||u.order===0),c(f,"".concat(a,"-").concat(g,"-offset-").concat(u.offset),u.offset||u.offset===0),c(f,"".concat(a,"-").concat(g,"-push-").concat(u.push),u.push||u.push===0),c(f,"".concat(a,"-").concat(g,"-pull-").concat(u.pull),u.pull||u.pull===0),c(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),B(a,(e={},c(e,"".concat(a,"-").concat(t),t!==void 0),c(e,"".concat(a,"-order-").concat(n),n),c(e,"".concat(a,"-offset-").concat(s),s),c(e,"".concat(a,"-push-").concat(l),l),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=i(function(){var e=r.flex,t=d.value,n={};if(t&&t[0]>0){var s="".concat(t[0]/2,"px");n.paddingLeft=s,n.paddingRight=s}if(t&&t[1]>0&&!h.value){var l="".concat(t[1]/2,"px");n.paddingTop=l,n.paddingBottom=l}return e&&(n.flex=J(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});export{Z as C,Y as R};
|
||||
import{r as F,o as P,cu as K,av as L,G as i,ax as T,ay as I,d as $,u as B,cv as _,b as y,bj as V,cw as A,an as E,h as c,c as M,a as G}from"./index-40ac36f2.js";const W=function(){var o=F(!1);return P(function(){o.value=K()}),o};var D=Symbol("rowContextKey"),U=function(r){T(D,r)},k=function(){return L(D,{gutter:i(function(){}),wrap:i(function(){}),supportFlexGap:i(function(){})})};I("top","middle","bottom","stretch");I("start","end","center","space-around","space-between");var q=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},H=$({compatConfig:{MODE:3},name:"ARow",props:q(),setup:function(r,N){var m=N.slots,v=B("row",r),d=v.prefixCls,h=v.direction,j,x=F({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=W();P(function(){j=_.subscribe(function(e){var t=r.gutter||0;(!Array.isArray(t)&&y(t)==="object"||Array.isArray(t)&&(y(t[0])==="object"||y(t[1])==="object"))&&(x.value=e)})}),V(function(){_.unsubscribe(j)});var S=i(function(){var e=[0,0],t=r.gutter,n=t===void 0?0:t,s=Array.isArray(n)?n:[n,0];return s.forEach(function(l,b){if(y(l)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&l[p]!==void 0){e[b]=l[p];break}}else e[b]=l||0}),e});U({gutter:S,supportFlexGap:w,wrap:i(function(){return r.wrap})});var R=i(function(){var e;return E(d.value,(e={},c(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),c(e,"".concat(d.value,"-").concat(r.justify),r.justify),c(e,"".concat(d.value,"-").concat(r.align),r.align),c(e,"".concat(d.value,"-rtl"),h.value==="rtl"),e))}),O=i(function(){var e=S.value,t={},n=e[0]>0?"".concat(e[0]/-2,"px"):void 0,s=e[1]>0?"".concat(e[1]/-2,"px"):void 0;return n&&(t.marginLeft=n,t.marginRight=n),w.value?t.rowGap="".concat(e[1],"px"):s&&(t.marginTop=s,t.marginBottom=s),t});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});const Y=H;function J(o){return typeof o=="number"?"".concat(o," ").concat(o," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(o)?"0 0 ".concat(o):o}var Q=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Z=$({compatConfig:{MODE:3},name:"ACol",props:Q(),setup:function(r,N){var m=N.slots,v=k(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=B("col",r),w=x.prefixCls,S=x.direction,R=i(function(){var e,t=r.span,n=r.order,s=r.offset,l=r.push,b=r.pull,a=w.value,p={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(g){var f,u={},C=r[g];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},c(f,"".concat(a,"-").concat(g,"-").concat(u.span),u.span!==void 0),c(f,"".concat(a,"-").concat(g,"-order-").concat(u.order),u.order||u.order===0),c(f,"".concat(a,"-").concat(g,"-offset-").concat(u.offset),u.offset||u.offset===0),c(f,"".concat(a,"-").concat(g,"-push-").concat(u.push),u.push||u.push===0),c(f,"".concat(a,"-").concat(g,"-pull-").concat(u.pull),u.pull||u.pull===0),c(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),E(a,(e={},c(e,"".concat(a,"-").concat(t),t!==void 0),c(e,"".concat(a,"-order-").concat(n),n),c(e,"".concat(a,"-offset-").concat(s),s),c(e,"".concat(a,"-push-").concat(l),l),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=i(function(){var e=r.flex,t=d.value,n={};if(t&&t[0]>0){var s="".concat(t[0]/2,"px");n.paddingLeft=s,n.paddingRight=s}if(t&&t[1]>0&&!h.value){var l="".concat(t[1]/2,"px");n.paddingTop=l,n.paddingBottom=l}return e&&(n.flex=J(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return M("div",{class:R.value,style:O.value},[(e=m.default)===null||e===void 0?void 0:e.call(m)])}}});export{Z as C,Y as R};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
import{d as x,a1 as $,aK as g,cG as b,r as w,U as p,V as i,W as a,c as r,a3 as d,X as u,Y as n,Z as B,a8 as I,a4 as m,y as V,z as _,B as v,aj as W,ak as D,cH as N,a0 as R}from"./index-40ac36f2.js";/* empty css */const F={class:"container"},G={class:"actions"},K={class:"uni-desc"},L={class:"snapshot"},U=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(j){const h=$(),t=g(),f=e=>{h.tabList=V(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=W,l=D;return p(),i("div",F,[a("div",G,[r(C,{value:o.value,"onUpdate:value":c[0]||(c[0]=s=>o.value=s),placeholder:e.$t("name"),style:{"max-width":"300px"}},null,8,["value","placeholder"]),r(l,{type:"primary",onClick:y},{default:d(()=>[u(n(e.$t("saveWorkspaceSnapshot")),1)]),_:1})]),a("p",K,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",L,[(p(!0),i(B,null,I(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const A=R(U,[["__scopeId","data-v-e55e3025"]]);export{A as default};
|
||||
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{d as z,bx as D,at as A,ct as j,ax as k,n as V,cu as B,cv as y,e as $,c as a,_ as T,h as r,a as P,cw as M,P as b}from"./index-5b5fdd56.js";var O=["class","style"],W=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:b.any,delay:Number,indicator:b.any}},p=null;function q(t,n){return!!t&&!!n&&!isNaN(Number(n))}function G(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const H=z({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:D(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:A("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=q(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=B(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,x=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,N=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=T(l,O),S=this.configProvider,U=S.getPrefixCls,w=S.direction,s=U("spin",x),u=this.sSpinning,E=(i={},r(i,s,!0),r(i,"".concat(s,"-sm"),f==="small"),r(i,"".concat(s,"-lg"),f==="large"),r(i,"".concat(s,"-spinning"),u),r(i,"".concat(s,"-show-text"),!!d),r(i,"".concat(s,"-rtl"),w==="rtl"),r(i,v,!!v),i),m=a("div",P(P({},C),{},{style:_,class:E}),[this.renderIndicator(s),d?a("div",{class:"".concat(s,"-text")},[d]):null]),g=M(this);if(g&&g.length){var c,I=(c={},r(c,"".concat(s,"-container"),!0),r(c,"".concat(s,"-blur"),u),c);return a("div",{class:["".concat(s,"-nested-loading"),N]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{H as S,G as s};
|
||||
import{d as w,bB as A,av as D,cx as j,az as k,n as B,cy as V,cz as y,e as $,c as a,_ as T,h as r,a as P,cA as M,P as b}from"./index-40ac36f2.js";var O=["class","style"],W=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:b.any,delay:Number,indicator:b.any}},p=null;function q(t,n){return!!t&&!!n&&!isNaN(Number(n))}function G(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const H=w({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:A(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:D("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=q(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=B(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=V(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,x=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,N=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=T(l,O),S=this.configProvider,U=S.getPrefixCls,z=S.direction,s=U("spin",x),u=this.sSpinning,E=(i={},r(i,s,!0),r(i,"".concat(s,"-sm"),f==="small"),r(i,"".concat(s,"-lg"),f==="large"),r(i,"".concat(s,"-spinning"),u),r(i,"".concat(s,"-show-text"),!!d),r(i,"".concat(s,"-rtl"),z==="rtl"),r(i,v,!!v),i),m=a("div",P(P({},C),{},{style:_,class:E}),[this.renderIndicator(s),d?a("div",{class:"".concat(s,"-text")},[d]):null]),g=M(this);if(g&&g.length){var c,I=(c={},r(c,"".concat(s,"-container"),!0),r(c,"".concat(s,"-blur"),u),c);return a("div",{class:["".concat(s,"-nested-loading"),N]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{H as S,G as s};
|
||||
|
|
@ -0,0 +1 @@
|
|||
.container[data-v-e55e3025]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column;padding:16px}.container .actions[data-v-e55e3025]{margin-bottom:16px}.container .actions *[data-v-e55e3025]{margin-right:10px}.snapshot[data-v-e55e3025]{list-style:none;padding:0;margin:0;width:512px}.snapshot li[data-v-e55e3025]{display:flex;justify-content:space-between;align-items:center;padding:10px;background-color:var(--zp-secondary-variant-background);border-radius:4px;margin-bottom:10px;transition:all .3s ease;border-bottom:2px solid var(--zp-luminous-deep)}.snapshot li[data-v-e55e3025]:hover{border-bottom:2px solid var(--zp-luminous)}.snapshot li div[data-v-e55e3025]:first-child{flex-grow:1;font-weight:700}.snapshot li div[data-v-e55e3025]:last-child{display:flex;gap:10px}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{ct as j,ay as z,d as K,j as U,dd as $,w,r as b,G as S,m as A,u as D,o as E,az as G,h as d,c as s,a as C,aw as H,be as L,g as _,de as W,P as c,df as x}from"./index-40ac36f2.js";var R=z("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=K({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var o=r.attrs,y=r.slots,B=r.expose,l=r.emit,m=U();$(function(){w(!("defaultChecked"in o),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),w(!("value"in o),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:o.defaultChecked),f=S(function(){return h.value===n.checkedValue});A(function(){return n.checked},function(){h.value=n.checked});var v=D("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),g=function(){var e;(e=i.value)===null||e===void 0||e.focus()},V=function(){var e;(e=i.value)===null||e===void 0||e.blur()};B({focus:g,blur:V}),E(function(){G(function(){n.autofocus&&!n.disabled&&i.value.focus()})});var k=function(e,t){n.disabled||(l("update:checked",e),l("change",e,t),m.onFieldChange())},I=function(e){l("blur",e)},N=function(e){g();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===x.LEFT?k(n.unCheckedValue,e):e.keyCode===x.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},d(a,"".concat(u.value,"-small"),T.value==="small"),d(a,"".concat(u.value,"-loading"),n.loading),d(a,"".concat(u.value,"-checked"),f.value),d(a,"".concat(u.value,"-disabled"),n.disabled),d(a,u.value,!0),d(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(W,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},H(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),o),{},{id:(a=n.id)!==null&&a!==void 0?a:m.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[o.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(L,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?_(y,n,"checkedChildren"):_(y,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{cp as j,aw as K,d as $,j as z,c_ as E,w,r as b,E as S,m as U,u as A,o as D,ax as H,h as o,c as s,a as C,au as L,ba as W,g as _,c$ as G,P as c,d0 as x}from"./index-5b5fdd56.js";var R=K("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=$({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var d=r.attrs,m=r.slots,B=r.expose,l=r.emit,y=z();E(function(){w(!("defaultChecked"in d),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),w(!("value"in d),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:d.defaultChecked),f=S(function(){return h.value===n.checkedValue});U(function(){return n.checked},function(){h.value=n.checked});var v=A("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),g=function(){var e;(e=i.value)===null||e===void 0||e.focus()},V=function(){var e;(e=i.value)===null||e===void 0||e.blur()};B({focus:g,blur:V}),D(function(){H(function(){n.autofocus&&!n.disabled&&i.value.focus()})});var k=function(e,t){n.disabled||(l("update:checked",e),l("change",e,t),y.onFieldChange())},I=function(e){l("blur",e)},N=function(e){g();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===x.LEFT?k(n.unCheckedValue,e):e.keyCode===x.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},o(a,"".concat(u.value,"-small"),T.value==="small"),o(a,"".concat(u.value,"-loading"),n.loading),o(a,"".concat(u.value,"-checked"),f.value),o(a,"".concat(u.value,"-disabled"),n.disabled),o(a,u.value,!0),o(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(G,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},L(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),d),{},{id:(a=n.id)!==null&&a!==void 0?a:y.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[d.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(W,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?_(m,n,"checkedChildren"):_(m,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{cj as e,ck as i,cl as r,cm as n,b0 as a}from"./index-40ac36f2.js";function o(s,t){return e(i(s,t,r),s+"")}function b(s){return n(s)&&a(s)}export{o as b,b as i};
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container[data-v-2c44013c]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column;padding:16px}.container .actions[data-v-2c44013c]{margin-bottom:16px}.container .actions *[data-v-2c44013c]{margin-right:10px}.snapshot[data-v-2c44013c]{list-style:none;padding:0;margin:0;width:512px}.snapshot li[data-v-2c44013c]{display:flex;justify-content:space-between;align-items:center;padding:10px;background-color:var(--zp-secondary-variant-background);border-radius:4px;margin-bottom:10px;transition:all .3s ease;border-bottom:2px solid var(--zp-luminous-deep)}.snapshot li[data-v-2c44013c]:hover{border-bottom:2px solid var(--zp-luminous)}.snapshot li div[data-v-2c44013c]:first-child{flex-grow:1;font-weight:700}.snapshot li div[data-v-2c44013c]:last-child{display:flex;gap:10px}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{cf as t,cg as e,ch as r,ci as n,aY as a}from"./index-5b5fdd56.js";function o(i,s){return t(e(i,s,r),i+"")}function b(i){return n(i)&&a(i)}export{o as b,b as i};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{d as x,$,aI as g,cC as b,r as w,S as p,T as i,U as a,c as r,a1 as d,V as u,W as n,X as I,a6 as B,a2 as m,x as D,y as _,z as v,ah as V,ai as W,cD as N,Z as R}from"./index-5b5fdd56.js";/* empty css */const F={class:"container"},L={class:"actions"},T={class:"uni-desc"},U={class:"snapshot"},q=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(z){const h=$(),t=g(),f=e=>{h.tabList=D(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=V,l=W;return p(),i("div",F,[a("div",L,[r(C,{value:o.value,"onUpdate:value":c[0]||(c[0]=s=>o.value=s),placeholder:e.$t("name"),style:{"max-width":"300px"}},null,8,["value","placeholder"]),r(l,{type:"primary",onClick:y},{default:d(()=>[u(n(e.$t("saveWorkspaceSnapshot")),1)]),_:1})]),a("p",T,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",U,[(p(!0),i(I,null,B(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const G=R(q,[["__scopeId","data-v-2c44013c"]]);export{G as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
vue/dist/assets/numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js
vendored
Normal file
1
vue/dist/assets/numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
|
|
@ -0,0 +1 @@
|
|||
import{d as q,a1 as H,r as y,o as J,U as p,V as b,c as t,a4 as e,W as f,a3 as r,X as M,Y as v,K as Q,a6 as X,af as Y,ag as V,$ as A,a2 as j,cI as Z,z as ee,cJ as le,ak as te,ai as se,T as ie,a0 as ne}from"./index-40ac36f2.js";import{a as ae,b as oe,c as re,L as ce,R as de,f as ue,_ as me}from"./MultiSelectKeep-1264212b.js";import{u as pe,c as fe,a as ve,F as ge,d as _e}from"./FileItem-0284048a.js";import"./shortcut-8a584dd4.js";import"./Checkbox-15fcde4f.js";/* empty css */import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-a3eed423.js";import"./index-819118ae.js";import"./index-79d0524b.js";import"./_isIterateeCall-2083df16.js";const ke={class:"refresh-button"},we={class:"hint"},Ce={key:0,class:"preview-switch"},Ie=q({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Se){const F=H(),d=y(!1),n=y([]),a=n,g=async()=>{try{d.value=!0;const s=await Z();s.length===0&&ee.warn("No data, please generate index in image search page first"),n.value=s}finally{d.value=!1,k()}};J(g);const{stackViewEl:R,multiSelectedIdxs:u,stack:$,scroller:z}=pe({images:n}).toRefs(),{onClearAllSelected:N,onSelectAll:B,onReverseSelect:P}=fe();ae();const{itemSize:_,gridItems:T,cellWidth:K,onScroll:k}=ve(),{showGenInfo:c,imageGenInfo:w,q:U,onContextMenuClick:D,onFileItemClick:E}=oe({openNext:le}),{previewIdx:o,previewing:C,onPreviewVisibleChange:G,previewImgMove:I,canPreview:S}=re(),h=async(s,l,m)=>{$.value=[{curr:"",files:n.value}],await D(s,l,m)};return(s,l)=>{const m=me,O=te,L=se,W=ie;return p(),b("div",{class:"container",ref_key:"stackViewEl",ref:R},[t(m,{show:!!e(u).length||e(F).keepMultiSelect,onClearAllSelected:e(N),onSelectAll:e(B),onReverseSelect:e(P)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),f("div",ke,[t(O,{onClick:g,type:"primary",loading:d.value,shape:"round"},{default:r(()=>[M(v(s.$t("shuffle")),1)]),_:1},8,["loading"])]),t(W,{visible:e(c),"onUpdate:visible":l[1]||(l[1]=i=>X(c)?c.value=i:null),width:"70vw","mask-closable":"",onOk:l[2]||(l[2]=i=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[t(L,{active:"",loading:!e(U).isIdle},{default:r(()=>[f("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:l[0]||(l[0]=i=>e(Q)(e(w)))},[f("div",we,v(s.$t("doubleClickToCopy")),1),M(" "+v(e(w)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),t(e(_e),{ref_key:"scroller",ref:z,class:"file-list",items:n.value.slice(),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(T),onScroll:e(k)},{default:r(({item:i,index:x})=>[t(ge,{idx:x,file:i,"cell-width":e(K),"full-screen-preview-image-url":e(a)[e(o)]?e(Y)(e(a)[e(o)]):"",onContextMenuClick:h,onPreviewVisibleChange:e(G),"is-selected-mutil-files":e(u).length>1,selected:e(u).includes(x),onFileItemClick:e(E)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(C)?(p(),b("div",Ce,[t(e(ce),{onClick:l[3]||(l[3]=i=>e(I)("prev")),class:V({disable:!e(S)("prev")})},null,8,["class"]),t(e(de),{onClick:l[4]||(l[4]=i=>e(I)("next")),class:V({disable:!e(S)("next")})},null,8,["class"])])):A("",!0),e(C)&&e(a)&&e(a)[e(o)]?(p(),j(ue,{key:1,file:e(a)[e(o)],idx:e(o),onContextMenuClick:h},null,8,["file","idx"])):A("",!0)],512)}}});const ze=ne(Ie,[["__scopeId","data-v-633f5db9"]]);export{ze as default};
|
||||
|
|
@ -1 +1 @@
|
|||
.container[data-v-571ca593]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-571ca593]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-571ca593]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary)}.container .file-list[data-v-571ca593]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-571ca593]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
.container[data-v-633f5db9]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-633f5db9]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-633f5db9]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary)}.container .file-list[data-v-633f5db9]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-633f5db9]{text-align:center;font-size:2em;padding:30vh 128px 0}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{d as q,$ as H,r as x,o as J,S as p,T as b,c as t,a2 as e,U as f,a1 as r,V as M,W as v,J as Q,a4 as Y,ad as Z,ae as F,Y as R,a0 as j,cE as X,y as ee,cF as le,ai as te,ag as se,R as ie,Z as ne}from"./index-5b5fdd56.js";import{a as ae,b as oe,c as re,L as ce,R as de,f as ue,_ as me}from"./MultiSelectKeep-72e9597f.js";import{u as pe,c as fe,a as ve,F as ge,d as _e}from"./FileItem-b2542180.js";import"./functionalCallableComp-51195a3e.js";/* empty css */import"./shortcut-bdce38ed.js";import"./Checkbox-5fa7cbf6.js";import"./index-a0e30b33.js";import"./index-b6f2a43c.js";import"./_isIterateeCall-c830f443.js";const ke={class:"refresh-button"},we={class:"hint"},Ce={key:0,class:"preview-switch"},Se=q({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(he){const V=H(),d=x(!1),n=x([]),a=n,g=async()=>{try{d.value=!0;const s=await X();s.length===0&&ee.warn("No data, please generate index in image search page first"),n.value=s}finally{d.value=!1,k()}};J(g);const{stackViewEl:A,multiSelectedIdxs:u,stack:$,scroller:z}=pe({images:n}).toRefs(),{onClearAllSelected:N,onSelectAll:B,onReverseSelect:P}=fe();ae();const{itemSize:_,gridItems:T,cellWidth:E,onScroll:k}=ve(),{showGenInfo:c,imageGenInfo:w,q:U,onContextMenuClick:D,onFileItemClick:G}=oe({openNext:le}),{previewIdx:o,previewing:C,onPreviewVisibleChange:K,previewImgMove:S,canPreview:h}=re(),y=async(s,l,m)=>{$.value=[{curr:"",files:n.value}],await D(s,l,m)};return(s,l)=>{const m=me,O=te,L=se,W=ie;return p(),b("div",{class:"container",ref_key:"stackViewEl",ref:A},[t(m,{show:!!e(u).length||e(V).keepMultiSelect,onClearAllSelected:e(N),onSelectAll:e(B),onReverseSelect:e(P)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),f("div",ke,[t(O,{onClick:g,type:"primary",loading:d.value,shape:"round"},{default:r(()=>[M(v(s.$t("shuffle")),1)]),_:1},8,["loading"])]),t(W,{visible:e(c),"onUpdate:visible":l[1]||(l[1]=i=>Y(c)?c.value=i:null),width:"70vw","mask-closable":"",onOk:l[2]||(l[2]=i=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[t(L,{active:"",loading:!e(U).isIdle},{default:r(()=>[f("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:l[0]||(l[0]=i=>e(Q)(e(w)))},[f("div",we,v(s.$t("doubleClickToCopy")),1),M(" "+v(e(w)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),t(e(_e),{ref_key:"scroller",ref:z,class:"file-list",items:n.value.slice(),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(T),onScroll:e(k)},{default:r(({item:i,index:I})=>[t(ge,{idx:I,file:i,"cell-width":e(E),"full-screen-preview-image-url":e(a)[e(o)]?e(Z)(e(a)[e(o)]):"",onContextMenuClick:y,onPreviewVisibleChange:e(K),"is-selected-mutil-files":e(u).length>1,selected:e(u).includes(I),onFileItemClick:e(G)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(C)?(p(),b("div",Ce,[t(e(ce),{onClick:l[3]||(l[3]=i=>e(S)("prev")),class:F({disable:!e(h)("prev")})},null,8,["class"]),t(e(de),{onClick:l[4]||(l[4]=i=>e(S)("next")),class:F({disable:!e(h)("next")})},null,8,["class"])])):R("",!0),e(C)&&e(a)&&e(a)[e(o)]?(p(),j(ue,{key:1,file:e(a)[e(o)],idx:e(o),onContextMenuClick:y},null,8,["file","idx"])):R("",!0)],512)}}});const ze=ne(Se,[["__scopeId","data-v-571ca593"]]);export{ze as default};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{R as y,C as v}from"./index-2869601c.js";import{cp as f,c as d,A as P,d as w,S as o,T as c,U as r,X as S,a6 as O,aE as V,a1 as b,V as u,W as p,a2 as R,ai as $,Z as x,O as H,I as _,Q as m}from"./index-5b5fdd56.js";const A=f(y),E=f(v);var L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]},name:"pushpin",theme:"filled"};const C=L;function h(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){N(t,i,s[i])})}return t}function N(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var l=function(e,s){var n=h({},e,s.attrs);return d(P,h({},n,{icon:C}),null)};l.displayName="PushpinFilled";l.inheritAttrs=!1;const z=l,F={class:"record-container"},I={style:{flex:"1"}},k={class:"rec-actions"},B=["onClick"],j=w({__name:"HistoryRecord",props:{records:{}},emits:["reuseRecord"],setup(t){return(e,s)=>{const n=$;return o(),c("div",null,[r("ul",F,[(o(!0),c(S,null,O(e.records.getRecords(),i=>(o(),c("li",{key:i.id,class:"record"},[r("div",I,[V(e.$slots,"default",{record:i},void 0,!0)]),r("div",k,[d(n,{onClick:g=>e.$emit("reuseRecord",i),type:"primary"},{default:b(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(R(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const T=x(j,[["__scopeId","data-v-834a248f"]]);class a{constructor(e=128,s=[],n=[]){this.maxLength=e,this.records=s,this.pinnedValues=n}isPinned(e){return this.pinnedValues.some(s=>s.id===e.id)}add(e){this.records.length>=this.maxLength&&this.records.pop(),this.records.unshift({...e,id:H()+Date.now(),time:new Date().toLocaleString()})}pin(e){const s=this.records.findIndex(n=>n.id===e.id);s!==-1&&this.records.splice(s,1),this.pinnedValues.push(e)}unpin(e){const s=this.pinnedValues.findIndex(n=>n.id===e.id);s!==-1&&this.pinnedValues.splice(s,1),this.records.unshift(e)}switchPin(e){this.isPinned(e)?this.unpin(e):this.pin(e)}getRecords(){return[...this.pinnedValues,...this.records]}getPinnedValues(){return this.pinnedValues}}const q=_(`${m}fuzzy-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}}),M=_(`${m}tag-search-HistoryRecord`,new a,{serializer:{read:t=>{const e=JSON.parse(t);return new a(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}});export{T as H,E as _,A as a,q as f,M as t};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{R as y,C as v}from"./index-2c318140.js";import{ct as f,c as d,A as P,d as w,U as a,V as c,W as r,Z as S,a8 as V,aG as O,a3 as b,X as u,Y as p,a4 as R,ak as $,a0 as x,Q as H,J as _,S as m}from"./index-40ac36f2.js";const A=f(y),E=f(v);var L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3-15.4 12.3-16.6 35.4-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8z"}}]},name:"pushpin",theme:"filled"};const C=L;function h(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){N(t,i,s[i])})}return t}function N(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var l=function(e,s){var n=h({},e,s.attrs);return d(P,h({},n,{icon:C}),null)};l.displayName="PushpinFilled";l.inheritAttrs=!1;const z=l,F={class:"record-container"},k={style:{flex:"1"}},I={class:"rec-actions"},B=["onClick"],J=w({__name:"HistoryRecord",props:{records:{}},emits:["reuseRecord"],setup(t){return(e,s)=>{const n=$;return a(),c("div",null,[r("ul",F,[(a(!0),c(S,null,V(e.records.getRecords(),i=>(a(),c("li",{key:i.id,class:"record"},[r("div",k,[O(e.$slots,"default",{record:i},void 0,!0)]),r("div",I,[d(n,{onClick:g=>e.$emit("reuseRecord",i),type:"primary"},{default:b(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(R(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const q=x(J,[["__scopeId","data-v-fff181dd"]]);class o{constructor(e=128,s=[],n=[]){this.maxLength=e,this.records=s,this.pinnedValues=n}isPinned(e){return this.pinnedValues.some(s=>s.id===e.id)}add(e){this.records.length>=this.maxLength&&this.records.pop(),this.records.unshift({...e,id:H()+Date.now(),time:new Date().toLocaleString()})}pin(e){const s=this.records.findIndex(n=>n.id===e.id);s!==-1&&this.records.splice(s,1),this.pinnedValues.push(e)}unpin(e){const s=this.pinnedValues.findIndex(n=>n.id===e.id);s!==-1&&this.pinnedValues.splice(s,1),this.records.unshift(e)}switchPin(e){this.isPinned(e)?this.unpin(e):this.pin(e)}getRecords(){return[...this.pinnedValues,...this.records]}getPinnedValues(){return this.pinnedValues}}const G=_(`${m}fuzzy-search-HistoryRecord`,new o,{serializer:{read:t=>{const e=JSON.parse(t);return new o(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}}),M=_(`${m}tag-search-HistoryRecord`,new o,{serializer:{read:t=>{const e=JSON.parse(t);return new o(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}});export{q as H,E as _,A as a,G as f,M as t};
|
||||
|
|
@ -0,0 +1 @@
|
|||
[data-v-fff181dd] .ant-row .ant-col:nth-child(1){font-weight:700}.record-container[data-v-fff181dd]{list-style:none;padding:8px;margin:16px;max-height:50vh;overflow:auto}.record[data-v-fff181dd]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid var(--zp-tertiary);position:relative;flex-wrap:nowrap;transition:all .3s ease}.record[data-v-fff181dd]:hover{background:var(--zp-secondary-background)}.record .rec-actions[data-v-fff181dd]{user-select:none;display:flex;gap:8px}.record .pin[data-v-fff181dd]{cursor:pointer;padding:4px 8px;border-radius:4px;transition:all .3s ease}.record .pin[data-v-fff181dd]:hover{background:var(--zp-primary-background)}
|
||||
|
|
@ -1 +0,0 @@
|
|||
[data-v-834a248f] .ant-row .ant-col:nth-child(1){font-weight:700}.record-container[data-v-834a248f]{list-style:none;padding:8px;margin:16px;max-height:50vh;overflow:auto}.record[data-v-834a248f]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid var(--zp-tertiary);position:relative;flex-wrap:nowrap;transition:all .3s ease}.record[data-v-834a248f]:hover{background:var(--zp-secondary-background)}.record .rec-actions[data-v-834a248f]{user-select:none;display:flex;gap:8px}.record .pin[data-v-834a248f]{cursor:pointer;padding:4px 8px;border-radius:4px;transition:all .3s ease}.record .pin[data-v-834a248f]:hover{background:var(--zp-primary-background)}
|
||||
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-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#de632f}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.nprogress{pointer-events:none}.nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}.nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}.nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent .nprogress .spinner,.nprogress-custom-parent .nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.base-info[data-v-afd25667]{position:absolute;padding:4px;font-size:.8em;background:var(--zp-primary-background);color:var(--zp-primary);left:0;bottom:0;border-top-right-radius:4px}.location-act[data-v-bd9da014]{margin-left:8px}.location-act .copy[data-v-bd9da014]{margin-right:4px}@media (max-width: 768px){.location-act[data-v-bd9da014]{display:flex;flex-direction:column}.location-act>*[data-v-bd9da014],.location-act .copy[data-v-bd9da014]{margin:2px}}.breadcrumb[data-v-bd9da014]{display:flex;align-items:center}.breadcrumb>*[data-v-bd9da014]{margin-right:4px}@media (max-width: 768px){.breadcrumb[data-v-bd9da014]{width:100%}.breadcrumb .ant-breadcrumb>*[data-v-bd9da014]{display:inline-block}}.container[data-v-bd9da014]{background:var(--zp-secondary-background);height:var(--pane-max-height)}.location-bar[data-v-bd9da014]{padding:4px 16px;background:var(--zp-primary-background);border-bottom:1px solid var(--zp-border);display:flex;align-items:center;justify-content:space-between}@media (max-width: 768px){.location-bar[data-v-bd9da014]{flex-direction:column}.location-bar[data-v-bd9da014] ::-webkit-scrollbar{height:2px;background-color:var(--zp-secondary-variant-background)}.location-bar .actions[data-v-bd9da014]{padding:4px 0;width:100%;overflow:auto;display:flex;align-items:center}.location-bar .actions>*[data-v-bd9da014]{flex-shrink:0}}.location-bar .actions[data-v-bd9da014]{display:flex;align-items:center;flex-shrink:0}.location-bar a.opt[data-v-bd9da014]{margin-left:8px}.view[data-v-bd9da014]{padding:8px;height:calc(100vh - 48px)}.view .file-list[data-v-bd9da014]{list-style:none;padding:8px;height:100%;overflow:auto}.hint[data-v-bd9da014]{padding:4px;border:4px;background:var(--zp-secondary-background);border:1px solid var(--zp-border)}
|
||||
.ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#de632f}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.nprogress{pointer-events:none}.nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}.nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}.nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent .nprogress .spinner,.nprogress-custom-parent .nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.base-info[data-v-7f9c0b15]{position:absolute;padding:4px;font-size:.8em;background:var(--zp-primary-background);color:var(--zp-primary);left:0;bottom:0;border-top-right-radius:4px}.location-act[data-v-552072f0]{margin-left:8px}.location-act .copy[data-v-552072f0]{margin-right:4px}@media (max-width: 768px){.location-act[data-v-552072f0]{display:flex;flex-direction:column}.location-act>*[data-v-552072f0],.location-act .copy[data-v-552072f0]{margin:2px}}.breadcrumb[data-v-552072f0]{display:flex;align-items:center}.breadcrumb>*[data-v-552072f0]{margin-right:4px}@media (max-width: 768px){.breadcrumb[data-v-552072f0]{width:100%}.breadcrumb .ant-breadcrumb>*[data-v-552072f0]{display:inline-block}}.container[data-v-552072f0]{background:var(--zp-secondary-background);height:var(--pane-max-height)}.location-bar[data-v-552072f0]{padding:4px 16px;background:var(--zp-primary-background);border-bottom:1px solid var(--zp-border);display:flex;align-items:center;justify-content:space-between}@media (max-width: 768px){.location-bar[data-v-552072f0]{flex-direction:column}.location-bar[data-v-552072f0] ::-webkit-scrollbar{height:2px;background-color:var(--zp-secondary-variant-background)}.location-bar .actions[data-v-552072f0]{padding:4px 0;width:100%;overflow:auto;display:flex;align-items:center}.location-bar .actions>*[data-v-552072f0]{flex-shrink:0}}.location-bar .actions[data-v-552072f0]{display:flex;align-items:center;flex-shrink:0}.location-bar a.opt[data-v-552072f0]{margin-left:8px}.view[data-v-552072f0]{padding:8px;height:calc(100vh - 48px)}.view .file-list[data-v-552072f0]{list-style:none;padding:8px;height:100%;overflow:auto}.hint[data-v-552072f0]{padding:4px;border:4px;background:var(--zp-secondary-background);border:1px solid var(--zp-border)}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
import{u as G,g as d}from"./FileItem-0284048a.js";import{r as b,t as j,cq as m,cr as y,cs as D}from"./index-40ac36f2.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:s,getViewableAreaFiles:w}=G().toRefs(),c=b(d.defaultChangeIndchecked),u=b(d.defaultSeedChangeChecked),g=async()=>{if(await j(100),!c.value)return;const o=w.value().filter(e=>m(e.fullpath)&&!e.gen_info_obj);if(!o.length)return;const t=await y(o.map(e=>e.fullpath).filter(e=>!r.has(e)));o.forEach(e=>{const i=t[e.fullpath]||r.get(e.fullpath)||"";r.set(e.fullpath,i),e.gen_info_obj=D(i),e.gen_info_raw=i})};k.value("viewableAreaFilesChange",g);const F=o=>{const t=s.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=s.value.length||s.value[t]==null||!("gen_info_obj"in s.value[t])||!("gen_info_obj"in s.value[t+e]))return a;const l=o,f=s.value[t+e].gen_info_obj;if(f==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=s.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in f)){a.diff[n]="+";continue}if(l[n]!=f[n])if(n.includes("rompt")&&l[n]!=""&&f[n]!=""){const p=l[n].split(","),C=f[n].split(",");let _=0;for(const v in p)p[v]!=C[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],f[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{u as C,g as d}from"./FileItem-b2542180.js";import{r as b,q as G,cm as j,cn as y,co as D}from"./index-5b5fdd56.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:f,getViewableAreaFiles:w}=C().toRefs(),c=b(d.defaultChangeIndchecked),u=b(d.defaultSeedChangeChecked),g=async()=>{if(await G(100),!c.value)return;const o=w.value().filter(e=>j(e.fullpath)&&!e.gen_info_obj);if(!o.length)return;const t=await y(o.map(e=>e.fullpath).filter(e=>!r.has(e)));o.forEach(e=>{const i=t[e.fullpath]||r.get(e.fullpath)||"";r.set(e.fullpath,i),e.gen_info_obj=D(i),e.gen_info_raw=i})};k.value("viewableAreaFilesChange",g);const F=o=>{const t=f.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=f.value.length||f.value[t]==null||!("gen_info_obj"in f.value[t])||!("gen_info_obj"in f.value[t+e]))return a;const l=o,s=f.value[t+e].gen_info_obj;if(s==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=f.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in s)){a.diff[n]="+";continue}if(l[n]!=s[n])if(n.includes("rompt")&&l[n]!=""&&s[n]!=""){const p=l[n].split(","),m=s[n].split(",");let _=0;for(const v in p)p[v]!=m[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],s[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};
|
||||
|
|
@ -7,8 +7,8 @@
|
|||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Infinite Image Browsing</title>
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-5b5fdd56.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-3112bec6.css">
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-40ac36f2.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-07a5c810.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const tags = computed(() => {
|
|||
<template v-if="file.type === 'file'">
|
||||
<template v-if="isMediaFile(file.name)">
|
||||
<a-menu-item key="viewGenInfo">{{ $t('viewGenerationInfo') }}</a-menu-item>
|
||||
<a-menu-item key="tiktokView">{{ $t('tiktokView') }}</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<template v-if="global.conf?.launch_mode !== 'server'">
|
||||
<a-menu-item key="send2txt2img">{{ $t('sendToTxt2img') }}</a-menu-item>
|
||||
|
|
|
|||
|
|
@ -126,4 +126,8 @@ export const de: Partial<IIBI18nMap> = {
|
|||
imgSearch: 'Bildsuche',
|
||||
send2savedDir: 'In den gespeicherten Ordner senden',
|
||||
promptcompare: 'Prompts vergleichen',
|
||||
'TikTok View': 'TikTok-Ansicht',
|
||||
rebuildImageIndex: 'Bildindex neu erstellen',
|
||||
tagSearchNoResultsMessage: 'Es scheint, als wären keine Ergebnisse gefunden worden. Versuchen Sie, den Index neu zu erstellen, um unbenutzte Tags zu entfernen?',
|
||||
tiktokView: 'TikTok-Ansicht'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,9 +314,10 @@ You can specify which snapshot to restore to when starting IIB in the global set
|
|||
send2savedDir: 'Send to saved folder',
|
||||
regexSearchEnabledHint:
|
||||
'(You can also enable regex search by clicking the regex icon on the right)',
|
||||
rebuildImageIndex: 'Rebuild image index',
|
||||
rebuildImageIndex: 'Rebuild Image Index',
|
||||
confirmRebuildImageIndex: 'Confirm rebuilding image index?',
|
||||
rebuildComplete: 'Rebuild complete',
|
||||
tagSearchNoResultsMessage:
|
||||
'It seems like no results were found. Try rebuilding the index to remove unused tags?'
|
||||
tagSearchNoResultsMessage: 'It looks like no results were matched, try rebuilding the index to remove useless tags?',
|
||||
'TikTok View': 'TikTok View',
|
||||
tiktokView: 'TikTok View'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export const zhHans = {
|
||||
tryMyLuck: '试试手气',
|
||||
randomImage: '随机图像',
|
||||
|
|
@ -198,7 +197,7 @@ export const zhHans = {
|
|||
copyPrompt: '复制提示',
|
||||
copyPositivePrompt: '复制正向提示',
|
||||
refreshCompleted: '刷新完成',
|
||||
'walk-mode-move-message': '在walk模式下仅允许使用“快速移动”移动位置',
|
||||
'walk-mode-move-message': '在walk模式下仅允许使用"快速移动"移动位置',
|
||||
manualExitFullScreen: '你删除了最后一张图片,也许需要你手动退出全屏查看',
|
||||
copied: '已复制!',
|
||||
'index.expired': '索引过期,正在自动更新',
|
||||
|
|
@ -270,7 +269,7 @@ export const zhHans = {
|
|||
livePreview: '实时预览',
|
||||
other: '其他',
|
||||
ImageBrowsingSettings: '图像浏览设置',
|
||||
majorUpdateCustomCellSizeTips: '重大更新:你可以自定义网格图像的大小了,在全局设置页或者右上角的“更多”里面进行调整',
|
||||
majorUpdateCustomCellSizeTips: '重大更新:你可以自定义网格图像的大小了,在全局设置页或者右上角的"更多"里面进行调整',
|
||||
desktop: '桌面',
|
||||
move: '移动',
|
||||
inputFolderName: '输入文件夹名',
|
||||
|
|
@ -278,7 +277,7 @@ export const zhHans = {
|
|||
sendToThirdPartyExtension: '发送到第三方拓展',
|
||||
lyco: 'LyCORIS',
|
||||
batchDownloaDDragAndDropHint:
|
||||
'使用拖拽或者右键菜单中的“发送到批量下载”将其他页面的图片添加到这里,支持多选',
|
||||
'使用拖拽或者右键菜单中的"发送到批量下载"将其他页面的图片添加到这里,支持多选',
|
||||
zipDownload: '打包成zip下载',
|
||||
archive: '归档',
|
||||
batchDownload: '批量下载',
|
||||
|
|
@ -292,10 +291,12 @@ export const zhHans = {
|
|||
dragToResizePanel: '按住并拖动来调整面板的大小',
|
||||
clickToToggleMaximizeMinimize: '单击切换最大化/最小化',
|
||||
dragToMovePanel: '按住并拖动来移动面板',
|
||||
imageCompareTips: '拖拽文件时也会出现这个面板,可以不需要打开 “图像对比” 功能',
|
||||
imageCompareTips: '拖拽文件时也会出现这个面板,可以不需要打开 "图像对比" 功能',
|
||||
regexSearchEnabledHint: '(你也可以通过点击右侧的正则式图标来启用正则式搜索)',
|
||||
confirmRebuildImageIndex: '确认重建图像索引?',
|
||||
rebuildComplete: '重新构建完成',
|
||||
rebuildImageIndex: '重新构建图像索引',
|
||||
tagSearchNoResultsMessage: '看起来没匹配到任何结果,尝试通过重新构建索引来去掉无用的tag?'
|
||||
tagSearchNoResultsMessage: '看起来没匹配到任何结果,尝试通过重新构建索引来去掉无用的tag?',
|
||||
'TikTok View': '抖音式浏览',
|
||||
tiktokView: '抖音式观看'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ export const zhHant: Partial<IIBI18nMap> = {
|
|||
copyPrompt: '複製提示',
|
||||
copyPositivePrompt: '複製正向提示',
|
||||
refreshCompleted: '重新整理完成',
|
||||
'walk-mode-move-message': '在walk模式下僅允許使用“快速移動”移動位置',
|
||||
'walk-mode-move-message': '在walk模式下僅允許使用"快速移動"移動位置',
|
||||
manualExitFullScreen: '你刪除了最後一張圖片,也許需要你手動退出全螢幕檢視',
|
||||
copied: '已複製!',
|
||||
'index.expired': '索引過期,正在自動更新',
|
||||
|
|
@ -274,7 +274,7 @@ export const zhHant: Partial<IIBI18nMap> = {
|
|||
|
||||
ImageBrowsingSettings: '圖片瀏覽設置',
|
||||
majorUpdateCustomCellSizeTips:
|
||||
'重大更新:你可以自定義網格圖像的大小了,在全域設置頁或者右上角的“更多”裡面進行調整',
|
||||
'重大更新:你可以自定義網格圖像的大小了,在全域設置頁或者右上角的"更多"裡面進行調整',
|
||||
desktop: '桌面',
|
||||
move: '移動',
|
||||
inputFolderName: '輸入文件夾名稱',
|
||||
|
|
@ -282,7 +282,7 @@ export const zhHant: Partial<IIBI18nMap> = {
|
|||
sendToThirdPartyExtension: '發送到第三方拓展',
|
||||
lyco: 'LyCORIS',
|
||||
batchDownloaDDragAndDropHint:
|
||||
'使用拖拽或者右鍵功能表中的“發送到批量下載”將其他頁面的圖片添加到這裡,支持多選',
|
||||
'使用拖拽或者右鍵功能表中的"發送到批量下載"將其他頁面的圖片添加到這裡,支持多選',
|
||||
zipDownload: '打包成zip下載',
|
||||
archive: '歸檔',
|
||||
batchDownload: '批量下載',
|
||||
|
|
@ -296,10 +296,12 @@ export const zhHant: Partial<IIBI18nMap> = {
|
|||
dragToResizePanel: '按住並拖動來調整面板的大小',
|
||||
clickToToggleMaximizeMinimize: '單擊切換最大化/最小化',
|
||||
dragToMovePanel: '按住並拖動來移動面板',
|
||||
imageCompareTips: '拖拽文件時也會出現這個面板,可以不需要打開 “圖片對比” 功能',
|
||||
imageCompareTips: '拖拽文件時也會出現這個面板,可以不需要打開 "圖片對比" 功能',
|
||||
regexSearchEnabledHint: '(你也可以通過點擊右側的正則式圖標來啟用正則式搜索)',
|
||||
confirmRebuildImageIndex: '確認重建圖像索引?',
|
||||
rebuildImageIndex: '重新構建圖像索引',
|
||||
rebuildComplete: '重新構建完成',
|
||||
tagSearchNoResultsMessage: '看起來沒有匹配到任何結果,嘗試通過重新構建索引來去除無用的標籤?'
|
||||
tagSearchNoResultsMessage: '看起來沒有匹配到任何結果,嘗試通過重新構建索引來去除無用的標籤?',
|
||||
'TikTok View': '抖音式瀏覽',
|
||||
tiktokView: '抖音式觀看'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import DraggingPort from './DraggingPort.vue'
|
||||
import TiktokViewer from './TiktokViewer.vue'
|
||||
import { useImgSliStore } from '@/store/useImgSli'
|
||||
import ImgSliSplitPane from './ImgSliComparePane.vue'
|
||||
import { ref } from 'vue'
|
||||
|
|
@ -20,6 +21,7 @@ const splitpane = ref<{ requestFullScreen (): void }>()
|
|||
</template>
|
||||
</ADrawer>
|
||||
<DraggingPort />
|
||||
<TiktokViewer />
|
||||
</template>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,811 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, onUnmounted, nextTick, watch } from 'vue'
|
||||
import { useTiktokStore, type TiktokMediaItem } from '@/store/useTiktokStore'
|
||||
import { useTagStore } from '@/store/useTagStore'
|
||||
import { useGlobalStore } from '@/store/useGlobalStore'
|
||||
import { isVideoFile } from '@/util'
|
||||
import { openAddNewTagModal } from '@/components/functionalCallableComp'
|
||||
import { toggleCustomTagToImg } from '@/api/db'
|
||||
import { message } from 'ant-design-vue'
|
||||
import {
|
||||
CloseOutlined,
|
||||
FullscreenOutlined,
|
||||
FullscreenExitOutlined,
|
||||
UpOutlined,
|
||||
DownOutlined,
|
||||
TagsOutlined
|
||||
} from '@/icon'
|
||||
import { t } from '@/i18n'
|
||||
import type { StyleValue } from 'vue'
|
||||
import { throttle } from 'lodash-es'
|
||||
import { delay } from 'vue3-ts-util'
|
||||
|
||||
const tiktokStore = useTiktokStore()
|
||||
const tagStore = useTagStore()
|
||||
const global = useGlobalStore()
|
||||
|
||||
// 设备检测
|
||||
const isMac = computed(() => {
|
||||
return /Mac|iPhone|iPad|iPod/.test(navigator.userAgent) ||
|
||||
navigator.platform.toUpperCase().indexOf('MAC') >= 0
|
||||
})
|
||||
|
||||
// 根据设备类型设置延迟时间
|
||||
const getAnimationDelay = (isTriggerByTouch: boolean) => {
|
||||
return isMac.value && !isTriggerByTouch ? 700 : 300 // Mac设备使用1000ms,其他设备300ms
|
||||
}
|
||||
|
||||
// 引用
|
||||
const containerRef = ref<HTMLElement>()
|
||||
const viewportRef = ref<HTMLElement>()
|
||||
const videoRefs = ref<(HTMLVideoElement | null)[]>([null, null, null]) // 视频元素引用
|
||||
|
||||
// 3位buffer状态管理
|
||||
const bufferItems = ref<(TiktokMediaItem | null)[]>([null, null, null]) // [prev, current, next]
|
||||
const bufferTransform = ref(0) // 当前显示位置的偏移
|
||||
const isAnimating = ref(false) // 是否正在动画中
|
||||
const touchStartY = ref(0)
|
||||
const touchCurrentY = ref(0)
|
||||
const isDragging = ref(false)
|
||||
const dragOffset = ref(0) // 拖拽偏移量
|
||||
|
||||
// TAG 相关状态
|
||||
const showTags = ref(false)
|
||||
|
||||
// 计算属性
|
||||
const currentItem = computed(() => bufferItems.value[1]) // 中间位置是当前显示的项目
|
||||
|
||||
const containerClass = computed(() => {
|
||||
return {
|
||||
'tiktok-viewer': true,
|
||||
'tiktok-viewer--fullscreen': tiktokStore.isFullscreen,
|
||||
'tiktok-viewer--floating': !tiktokStore.isFullscreen,
|
||||
'tiktok-viewer--mobile': tiktokStore.isMobile
|
||||
}
|
||||
})
|
||||
|
||||
// 计算每个buffer项的样式
|
||||
const getItemStyle = (index: number): StyleValue => {
|
||||
const baseTransform = (index - 1) * 100 // -100%, 0%, 100%
|
||||
const currentTransform = bufferTransform.value + dragOffset.value
|
||||
const totalTransform = baseTransform + currentTransform
|
||||
|
||||
return {
|
||||
transform: `translateY(${totalTransform}%)`,
|
||||
transition: isAnimating.value && !isDragging.value ? 'transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)' : 'none'
|
||||
}
|
||||
}
|
||||
|
||||
// 控制视频播放
|
||||
const controlVideoPlayback = async () => {
|
||||
await delay(30)
|
||||
for (let index = 0; index < videoRefs.value.length; index++) {
|
||||
const video = videoRefs.value[index]
|
||||
if (!video) continue
|
||||
|
||||
try {
|
||||
if (index === 1) {
|
||||
// 当前显示的视频:自动播放
|
||||
video.currentTime = 0 // 重置到开头
|
||||
video.muted = true // 确保静音以避免自动播放策略限制
|
||||
await video.play()
|
||||
} else {
|
||||
// 非当前显示的视频:暂停并重置
|
||||
video.pause()
|
||||
video.currentTime = 0
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn(`视频播放控制失败 (index: ${index}):`, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 更新buffer内容
|
||||
const updateBuffer = () => {
|
||||
const currentIndex = tiktokStore.currentIndex
|
||||
const list = tiktokStore.mediaList
|
||||
|
||||
bufferItems.value = [
|
||||
currentIndex > 0 ? list[currentIndex - 1] : null, // prev
|
||||
list[currentIndex] || null, // current
|
||||
currentIndex < list.length - 1 ? list[currentIndex + 1] : null // next
|
||||
]
|
||||
|
||||
// 等待DOM更新后控制视频播放
|
||||
nextTick(() => {
|
||||
controlVideoPlayback()
|
||||
})
|
||||
}
|
||||
|
||||
// TAG 相关功能
|
||||
const isTagSelected = (tagId: string | number) => {
|
||||
const currentUrl = currentItem.value?.url
|
||||
if (!currentUrl) return false
|
||||
|
||||
const fullpath = (currentItem.value as any)?.fullpath || currentItem.value?.id
|
||||
return !!tagStore.tagMap.get(fullpath)?.some(v => v.id === tagId)
|
||||
}
|
||||
|
||||
const onTagClick = async (tagId: string | number) => {
|
||||
const currentUrl = currentItem.value?.url
|
||||
if (!currentUrl) return
|
||||
|
||||
try {
|
||||
const fullpath = (currentItem.value as any)?.fullpath || currentItem.value?.id
|
||||
|
||||
const { is_remove } = await toggleCustomTagToImg({
|
||||
tag_id: Number(tagId),
|
||||
img_path: fullpath
|
||||
})
|
||||
|
||||
const tag = global.conf?.all_custom_tags.find((v) => v.id === tagId)?.name || '标签'
|
||||
await tagStore.refreshTags([fullpath])
|
||||
|
||||
message.success(t(is_remove ? 'removedTagFromImage' : 'addedTagToImage', { tag }))
|
||||
} catch (error) {
|
||||
console.error('Toggle tag error:', error)
|
||||
message.error('标签操作失败')
|
||||
}
|
||||
}
|
||||
|
||||
const tagBaseStyle: StyleValue = {
|
||||
margin: '4px',
|
||||
padding: '8px 16px',
|
||||
borderRadius: '20px',
|
||||
display: 'inline-block',
|
||||
cursor: 'pointer',
|
||||
fontWeight: 'bold',
|
||||
transition: '0.3s all ease',
|
||||
userSelect: 'none',
|
||||
fontSize: '14px'
|
||||
}
|
||||
|
||||
// 滑动到上一个
|
||||
const goToPrev = (isTriggerByTouch: boolean = false) => {
|
||||
if (isAnimating.value || !tiktokStore.hasPrev) return
|
||||
|
||||
isAnimating.value = true
|
||||
bufferTransform.value = 100 // 向下移动
|
||||
|
||||
setTimeout(() => {
|
||||
tiktokStore.prev()
|
||||
updateBuffer()
|
||||
bufferTransform.value = 0
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
}, getAnimationDelay(isTriggerByTouch)) // Mac需要更长延迟避免触摸板惯性滚动
|
||||
}, 200) // 动画一半时间后更新内容
|
||||
}
|
||||
|
||||
// 滑动到下一个
|
||||
const goToNext = (isTriggerByTouch: boolean = false) => {
|
||||
if (isAnimating.value || !tiktokStore.hasNext) return
|
||||
|
||||
isAnimating.value = true
|
||||
bufferTransform.value = -100 // 向上移动
|
||||
|
||||
setTimeout(() => {
|
||||
tiktokStore.next()
|
||||
updateBuffer()
|
||||
bufferTransform.value = 0
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
}, getAnimationDelay(isTriggerByTouch)) // Mac需要更长延迟避免触摸板惯性滚动
|
||||
}, 200) // 动画一半时间后更新内容
|
||||
}
|
||||
|
||||
|
||||
// 触摸事件处理
|
||||
const handleTouchStart = (e: TouchEvent) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
touchStartY.value = e.touches[0].clientY
|
||||
touchCurrentY.value = e.touches[0].clientY
|
||||
isDragging.value = true
|
||||
dragOffset.value = 0
|
||||
}
|
||||
|
||||
const handleTouchMove = (e: TouchEvent) => {
|
||||
if (!isDragging.value || isAnimating.value) return
|
||||
|
||||
touchCurrentY.value = e.touches[0].clientY
|
||||
const deltaY = touchCurrentY.value - touchStartY.value
|
||||
const maxDrag = window.innerHeight * 0.5 // 最大拖拽距离为屏幕高度的50%
|
||||
|
||||
// 限制拖拽范围并添加阻尼效果
|
||||
dragOffset.value = Math.max(-maxDrag, Math.min(maxDrag, deltaY * 0.5))
|
||||
|
||||
// 阻止页面滚动
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
const handleTouchEnd = () => {
|
||||
if (!isDragging.value || isAnimating.value) return
|
||||
|
||||
isDragging.value = false
|
||||
const deltaY = touchCurrentY.value - touchStartY.value
|
||||
const threshold = 80 // 滑动阈值
|
||||
|
||||
if (Math.abs(deltaY) > threshold) {
|
||||
if (deltaY > 0 && tiktokStore.hasPrev) {
|
||||
// 向下滑动,上一个
|
||||
goToPrev()
|
||||
} else if (deltaY < 0 && tiktokStore.hasNext) {
|
||||
// 向上滑动,下一个
|
||||
goToNext()
|
||||
} else {
|
||||
// 回弹动画
|
||||
dragOffset.value = 0
|
||||
}
|
||||
} else {
|
||||
// 回弹动画
|
||||
dragOffset.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
// 鼠标滚轮事件
|
||||
const handleWheel = throttle((e: WheelEvent) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
if (e.deltaY > 0 && tiktokStore.hasNext) {
|
||||
goToNext()
|
||||
} else if (e.deltaY < 0 && tiktokStore.hasPrev) {
|
||||
goToPrev()
|
||||
}
|
||||
}, 500)
|
||||
|
||||
|
||||
// 键盘事件
|
||||
const handleKeydown = (e: KeyboardEvent) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
switch (e.key) {
|
||||
case 'ArrowUp':
|
||||
e.preventDefault()
|
||||
if (tiktokStore.hasPrev) goToPrev()
|
||||
break
|
||||
case 'ArrowDown':
|
||||
e.preventDefault()
|
||||
if (tiktokStore.hasNext) goToNext()
|
||||
break
|
||||
case 'Escape':
|
||||
e.preventDefault()
|
||||
tiktokStore.closeView()
|
||||
break
|
||||
case 'F11':
|
||||
e.preventDefault()
|
||||
handleFullscreenToggle()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 全屏切换处理
|
||||
const handleFullscreenToggle = async () => {
|
||||
if (tiktokStore.isFullscreen) {
|
||||
await exitFullscreen()
|
||||
} else {
|
||||
await requestFullscreen()
|
||||
}
|
||||
}
|
||||
|
||||
// 请求全屏
|
||||
const requestFullscreen = async () => {
|
||||
if (containerRef.value && !document.fullscreenElement) {
|
||||
try {
|
||||
await containerRef.value.requestFullscreen()
|
||||
tiktokStore.isFullscreen = true
|
||||
} catch (err) {
|
||||
console.warn('无法进入全屏模式:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 退出全屏
|
||||
const exitFullscreen = async () => {
|
||||
if (document.fullscreenElement) {
|
||||
try {
|
||||
await document.exitFullscreen()
|
||||
tiktokStore.isFullscreen = false
|
||||
} catch (err) {
|
||||
console.warn('无法退出全屏模式:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 监听全屏状态变化
|
||||
const handleFullscreenChange = () => {
|
||||
tiktokStore.isFullscreen = !!document.fullscreenElement
|
||||
}
|
||||
|
||||
// 预加载相邻媒体
|
||||
const preloadMedia = () => {
|
||||
bufferItems.value.forEach(item => {
|
||||
if (!item) return
|
||||
|
||||
if (isVideoFile(item.url)) {
|
||||
const video = document.createElement('video')
|
||||
video.preload = 'metadata'
|
||||
video.src = item.url
|
||||
} else {
|
||||
const img = new Image()
|
||||
img.src = item.url
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 加载当前项的标签
|
||||
const loadCurrentItemTags = async () => {
|
||||
const currentItem = tiktokStore.currentItem
|
||||
if (!currentItem) return
|
||||
|
||||
const fullpath = (currentItem as any)?.fullpath || currentItem.id
|
||||
if (fullpath) {
|
||||
await tagStore.fetchImageTags([fullpath])
|
||||
}
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
document.addEventListener('keydown', handleKeydown)
|
||||
document.addEventListener('fullscreenchange', handleFullscreenChange)
|
||||
updateBuffer()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('keydown', handleKeydown)
|
||||
document.removeEventListener('fullscreenchange', handleFullscreenChange)
|
||||
|
||||
// 清理:停止所有视频播放
|
||||
videoRefs.value.forEach(video => {
|
||||
if (video) {
|
||||
video.pause()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 监听当前项变化
|
||||
watch(() => tiktokStore.currentIndex, () => {
|
||||
updateBuffer()
|
||||
nextTick(() => {
|
||||
preloadMedia()
|
||||
loadCurrentItemTags()
|
||||
})
|
||||
}, { immediate: true })
|
||||
|
||||
// 监听媒体列表变化
|
||||
watch(() => tiktokStore.mediaList, () => {
|
||||
updateBuffer()
|
||||
}, { deep: true })
|
||||
|
||||
// 监听组件可见性变化
|
||||
watch(() => tiktokStore.visible, (visible) => {
|
||||
if (!visible) {
|
||||
// 组件隐藏时停止所有视频
|
||||
videoRefs.value.forEach(video => {
|
||||
if (video) {
|
||||
video.pause()
|
||||
}
|
||||
})
|
||||
|
||||
// 如果当前是全屏状态,退出全屏
|
||||
if (document.fullscreenElement) {
|
||||
exitFullscreen()
|
||||
}
|
||||
} else {
|
||||
// 组件显示时重新控制视频播放
|
||||
nextTick(() => {
|
||||
controlVideoPlayback()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div
|
||||
v-if="tiktokStore.visible"
|
||||
ref="containerRef"
|
||||
:class="containerClass"
|
||||
@touchstart="handleTouchStart"
|
||||
@touchmove="handleTouchMove"
|
||||
@touchend="handleTouchEnd"
|
||||
@wheel="handleWheel"
|
||||
>
|
||||
<!-- 媒体内容区域 -->
|
||||
<div ref="viewportRef" class="tiktok-viewport">
|
||||
<!-- 3位buffer渲染 -->
|
||||
<div
|
||||
v-for="(item, index) in bufferItems"
|
||||
:key="item?.id || `empty-${index}`"
|
||||
class="tiktok-media-item"
|
||||
:style="getItemStyle(index)"
|
||||
>
|
||||
<div v-if="item" class="media-content">
|
||||
<!-- 视频 -->
|
||||
<video
|
||||
v-if="isVideoFile(item.url)"
|
||||
class="tiktok-media"
|
||||
:src="item.url"
|
||||
:controls="index === 1"
|
||||
muted
|
||||
:loop="index === 1"
|
||||
playsinline
|
||||
preload="metadata"
|
||||
:ref="(el) => { if (el) videoRefs[index] = el as HTMLVideoElement }"
|
||||
/>
|
||||
|
||||
<!-- 图片 -->
|
||||
<img
|
||||
v-else
|
||||
class="tiktok-media"
|
||||
:src="item.url"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 控制按钮区域 -->
|
||||
<div class="tiktok-controls">
|
||||
<!-- 关闭按钮 -->
|
||||
<button
|
||||
class="control-btn close-btn"
|
||||
@click="tiktokStore.closeView"
|
||||
:title="$t('close')"
|
||||
>
|
||||
<CloseOutlined />
|
||||
</button>
|
||||
|
||||
<!-- 全屏切换按钮 -->
|
||||
<button
|
||||
class="control-btn fullscreen-btn"
|
||||
@click="handleFullscreenToggle"
|
||||
:title="tiktokStore.isFullscreen ? $t('exitFullscreen') : $t('fullscreen')"
|
||||
>
|
||||
<FullscreenExitOutlined v-if="tiktokStore.isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
</button>
|
||||
|
||||
<!-- TAG 按钮 -->
|
||||
<button
|
||||
class="control-btn tags-btn"
|
||||
@click="showTags = !showTags"
|
||||
:title="$t('tags')"
|
||||
>
|
||||
<TagsOutlined />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 导航指示器 -->
|
||||
<div class="tiktok-navigation">
|
||||
<!-- 上一个指示器 -->
|
||||
<div
|
||||
v-if="tiktokStore.hasPrev"
|
||||
class="nav-indicator nav-prev"
|
||||
@click="goToPrev(false)"
|
||||
>
|
||||
<UpOutlined />
|
||||
</div>
|
||||
|
||||
<!-- 下一个指示器 -->
|
||||
<div
|
||||
v-if="tiktokStore.hasNext"
|
||||
class="nav-indicator nav-next"
|
||||
@click="goToNext(false)"
|
||||
>
|
||||
<DownOutlined />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 进度指示器 -->
|
||||
<div class="tiktok-progress">
|
||||
<div class="progress-bar">
|
||||
<div
|
||||
class="progress-fill"
|
||||
:style="{
|
||||
width: `${((tiktokStore.currentIndex + 1) / tiktokStore.mediaList.length) * 100}%`
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<span class="progress-text">
|
||||
{{ tiktokStore.currentIndex + 1 }} / {{ tiktokStore.mediaList.length }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- TAG 面板 -->
|
||||
<Transition name="slide-up">
|
||||
<div v-if="showTags" class="tiktok-tags-panel">
|
||||
<div class="tags-header">
|
||||
<h3>{{ $t('tags') }}</h3>
|
||||
<button @click="showTags = false" class="close-tags">
|
||||
<CloseOutlined />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="tags-content">
|
||||
<!-- 添加新标签 -->
|
||||
<div
|
||||
@click="openAddNewTagModal"
|
||||
:style="{
|
||||
background: 'var(--zp-primary-background)',
|
||||
color: 'var(--zp-luminous)',
|
||||
border: '2px solid var(--zp-luminous)',
|
||||
...tagBaseStyle
|
||||
}"
|
||||
>
|
||||
{{ $t('addNewCustomTag') }}
|
||||
</div>
|
||||
|
||||
<!-- 现有标签 -->
|
||||
<div
|
||||
v-for="tag in global.conf?.all_custom_tags || []"
|
||||
:key="tag.id"
|
||||
@click="onTagClick(tag.id)"
|
||||
:style="{
|
||||
background: isTagSelected(tag.id) ? tagStore.getColor(tag) : 'var(--zp-primary-background)',
|
||||
color: !isTagSelected(tag.id) ? tagStore.getColor(tag) : 'white',
|
||||
border: `2px solid ${tagStore.getColor(tag)}`,
|
||||
...tagBaseStyle
|
||||
}"
|
||||
>
|
||||
{{ tag.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</Teleport>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tiktok-viewer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9999;
|
||||
background: #000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
|
||||
&--floating {
|
||||
background: rgba(0, 0, 0, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
&--mobile {
|
||||
.tiktok-controls {
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tiktok-viewport {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tiktok-media-item {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.media-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tiktok-media {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.tiktok-controls {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
backdrop-filter: blur(10px);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.tiktok-navigation {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.nav-indicator {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
backdrop-filter: blur(10px);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
.tiktok-progress {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
flex: 1;
|
||||
height: 4px;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
min-width: 60px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tiktok-tags-panel {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
backdrop-filter: blur(20px);
|
||||
border-radius: 20px 20px 0 0;
|
||||
padding: 20px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.tags-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
color: white;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.close-tags {
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.tags-content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
// 动画
|
||||
.slide-up-enter-active,
|
||||
.slide-up-leave-active {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.slide-up-enter-from {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.slide-up-leave-to {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// 移动端适配
|
||||
@media (max-width: 768px) {
|
||||
.tiktok-controls {
|
||||
top: 40px;
|
||||
right: 15px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.tiktok-navigation {
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.nav-indicator {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.tiktok-progress {
|
||||
bottom: 80px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.tiktok-tags-panel {
|
||||
padding: 15px;
|
||||
max-height: 50vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -13,6 +13,7 @@ import { useImageSearch, createImageSearchIter } from './hook'
|
|||
import { openRebuildImageIndexModal } from '@/components/functionalCallableComp'
|
||||
import { useGlobalStore } from '@/store/useGlobalStore'
|
||||
import { useKeepMultiSelect } from '../fileTransfer/hook'
|
||||
import { openTiktokViewWithFiles } from '@/util/tiktokHelper'
|
||||
|
||||
const props = defineProps<{
|
||||
tabIdx: number
|
||||
|
|
@ -78,6 +79,15 @@ watch(
|
|||
|
||||
const g = useGlobalStore()
|
||||
const { onClearAllSelected, onSelectAll, onReverseSelect } = useKeepMultiSelect()
|
||||
|
||||
// TikTok View 按钮点击处理
|
||||
const onTiktokViewClick = () => {
|
||||
if (images.value.length === 0) {
|
||||
return
|
||||
}
|
||||
// 从第一张图片开始播放
|
||||
openTiktokViewWithFiles(images.value, 0)
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="container" ref="stackViewEl">
|
||||
|
|
@ -104,6 +114,7 @@ const { onClearAllSelected, onSelectAll, onReverseSelect } = useKeepMultiSelect(
|
|||
</ASkeleton>
|
||||
</AModal>
|
||||
<div class="action-bar">
|
||||
<a-button @click="onTiktokViewClick" type="primary" :disabled="!images?.length">{{ $t('tiktokView') }}</a-button>
|
||||
<a-button @click="saveLoadedFileAsJson">{{ $t('saveLoadedImageAsJson') }}</a-button>
|
||||
<a-button @click="saveAllFileAsJson">{{ $t('saveAllAsJson') }}</a-button>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import { getShortcutStrFromEvent } from '@/util/shortcut'
|
|||
import { MultiSelectTips, openAddNewTagModal, openRenameFileModal } from '@/components/functionalCallableComp'
|
||||
import { batchDownload, events, imgTransferBus, stackCache, tagStore, useEventListen, useHookShareState, global } from '.'
|
||||
import { closeImageFullscreenPreview, openImageFullscreenPreview } from '@/util/imagePreviewOperation'
|
||||
import { openTiktokViewWithFiles } from '@/util/tiktokHelper'
|
||||
|
||||
|
||||
export function useFileItemActions (
|
||||
|
|
@ -304,6 +305,11 @@ export function useFileItemActions (
|
|||
imageGenInfo.value = await q.pushAction(() => getImageGenerationInfo(file.fullpath)).res
|
||||
break
|
||||
}
|
||||
case 'tiktokView': {
|
||||
// 打开 TikTok 式观看,从当前文件开始
|
||||
openTiktokViewWithFiles(sortedFiles.value, idx)
|
||||
break
|
||||
}
|
||||
case 'openWithLocalFileBrowser': {
|
||||
await openFolder(file.fullpath)
|
||||
break
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import {
|
|||
} from './hook'
|
||||
import { SearchSelect } from 'vue3-ts-util'
|
||||
import { toRawFileUrl } from '@/util/file'
|
||||
import { openTiktokViewWithFiles } from '@/util/tiktokHelper'
|
||||
|
||||
import 'multi-nprogress/nprogress.css'
|
||||
// @ts-ignore
|
||||
|
|
@ -78,6 +79,15 @@ const { showMenuIdx } = useMobileOptimization()
|
|||
const { onClearAllSelected, onReverseSelect, onSelectAll } = useKeepMultiSelect()
|
||||
const { getGenDiff, changeIndchecked, seedChangeChecked, getRawGenParams, getGenDiffWatchDep } = useGenInfoDiff()
|
||||
|
||||
// TikTok View 按钮点击处理
|
||||
const onTiktokViewClick = () => {
|
||||
if (sortedFiles.value.length === 0) {
|
||||
return
|
||||
}
|
||||
// 只传入图片和视频文件,从当前预览索引开始
|
||||
openTiktokViewWithFiles(sortedFiles.value, previewIdx.value || 0)
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
() => {
|
||||
|
|
@ -135,6 +145,7 @@ watch(
|
|||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a class="opt" @click.prevent="onTiktokViewClick">{{ $t('TikTok View') }}</a>
|
||||
<a class="opt" @click.prevent="refresh"> {{ $t('refresh') }} </a>
|
||||
<a class="opt" @click.prevent="onPollRefreshClick"> {{ polling ? $t('stopPollRefresh') : $t('pollRefresh') }} </a>
|
||||
<a-dropdown>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
export interface TiktokMediaItem {
|
||||
url: string
|
||||
type: 'image' | 'video'
|
||||
id: string
|
||||
[key: string]: any // 允许额外的属性
|
||||
}
|
||||
|
||||
export const useTiktokStore = defineStore('useTiktokStore', () => {
|
||||
|
||||
|
||||
// 基本状态
|
||||
const visible = ref(false)
|
||||
const isFullscreen = ref(false)
|
||||
const mediaList = ref<TiktokMediaItem[]>([])
|
||||
const currentIndex = ref(0)
|
||||
|
||||
// 计算属性
|
||||
const currentItem = computed(() => {
|
||||
return mediaList.value[currentIndex.value] || null
|
||||
})
|
||||
|
||||
const hasNext = computed(() => {
|
||||
return currentIndex.value < mediaList.value.length - 1
|
||||
})
|
||||
|
||||
const hasPrev = computed(() => {
|
||||
return currentIndex.value > 0
|
||||
})
|
||||
|
||||
// 检测是否为移动设备
|
||||
const isMobile = computed(() => {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
|
||||
window.innerWidth <= 768
|
||||
})
|
||||
|
||||
// 动作
|
||||
const openTiktokView = (items: TiktokMediaItem[], startIndex = 0) => {
|
||||
mediaList.value = items
|
||||
currentIndex.value = Math.max(0, Math.min(startIndex, items.length - 1))
|
||||
visible.value = true
|
||||
|
||||
// 移动设备自动全屏
|
||||
if (isMobile.value) {
|
||||
isFullscreen.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const closeView = () => {
|
||||
visible.value = false
|
||||
isFullscreen.value = false
|
||||
mediaList.value = []
|
||||
currentIndex.value = 0
|
||||
}
|
||||
|
||||
const next = () => {
|
||||
if (hasNext.value) {
|
||||
currentIndex.value++
|
||||
}
|
||||
}
|
||||
|
||||
const prev = () => {
|
||||
if (hasPrev.value) {
|
||||
currentIndex.value--
|
||||
}
|
||||
}
|
||||
|
||||
const goToIndex = (index: number) => {
|
||||
if (index >= 0 && index < mediaList.value.length) {
|
||||
currentIndex.value = index
|
||||
}
|
||||
}
|
||||
|
||||
const toggleFullscreen = () => {
|
||||
isFullscreen.value = !isFullscreen.value
|
||||
}
|
||||
|
||||
return {
|
||||
// 状态
|
||||
visible,
|
||||
isFullscreen,
|
||||
mediaList,
|
||||
currentIndex,
|
||||
|
||||
// 计算属性
|
||||
currentItem,
|
||||
hasNext,
|
||||
hasPrev,
|
||||
isMobile,
|
||||
|
||||
// 动作
|
||||
openTiktokView,
|
||||
closeView,
|
||||
next,
|
||||
prev,
|
||||
goToIndex,
|
||||
toggleFullscreen
|
||||
}
|
||||
})
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
import type { FileNodeInfo } from '@/api/files'
|
||||
import type { TiktokMediaItem } from '@/store/useTiktokStore'
|
||||
import { useTiktokStore } from '@/store/useTiktokStore'
|
||||
import { isVideoFile, isImageFile } from '@/util'
|
||||
import { toRawFileUrl, toStreamVideoUrl } from '@/util/file'
|
||||
|
||||
/**
|
||||
* 将 FileNodeInfo 转换为 TiktokMediaItem
|
||||
*/
|
||||
export const fileToTiktokItem = (file: FileNodeInfo): TiktokMediaItem => {
|
||||
const isVideo = isVideoFile(file.name)
|
||||
|
||||
return {
|
||||
id: file.fullpath,
|
||||
url: isVideo ? toStreamVideoUrl(file) : toRawFileUrl(file),
|
||||
type: isVideo ? 'video' : 'image',
|
||||
// 保留原始文件信息以供后续使用
|
||||
originalFile: file,
|
||||
name: file.name,
|
||||
fullpath: file.fullpath
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 FileNodeInfo 数组转换为 TiktokMediaItem 数组,只包含媒体文件
|
||||
*/
|
||||
export const filesToTiktokItems = (files: FileNodeInfo[]): TiktokMediaItem[] => {
|
||||
return files
|
||||
.filter(file => file.type === 'file' && (isImageFile(file.name) || isVideoFile(file.name)))
|
||||
.map(fileToTiktokItem)
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 URL 列表直接创建 TiktokMediaItem 数组
|
||||
*/
|
||||
export const urlsToTiktokItems = (urls: string[]): TiktokMediaItem[] => {
|
||||
return urls.map((url) => ({
|
||||
id: url,
|
||||
url: url,
|
||||
type: isVideoFile(url) ? 'video' : 'image'
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* 便捷函数:打开抖音式浏览器查看文件列表
|
||||
*/
|
||||
export const openTiktokViewWithFiles = (files: FileNodeInfo[], startIndex = 0) => {
|
||||
startIndex = Math.min(startIndex, files.length - 1)
|
||||
startIndex = Math.max(startIndex, 0)
|
||||
const tiktokStore = useTiktokStore()
|
||||
const items = filesToTiktokItems(files)
|
||||
|
||||
if (items.length === 0) {
|
||||
console.warn('没有找到可以显示的媒体文件')
|
||||
return
|
||||
}
|
||||
|
||||
// 调整起始索引,确保对应正确的媒体文件
|
||||
let adjustedStartIndex = 0
|
||||
if (startIndex < files.length) {
|
||||
const targetFile = files[startIndex]
|
||||
adjustedStartIndex = items.findIndex(item => item.id === targetFile.fullpath)
|
||||
if (adjustedStartIndex === -1) {
|
||||
adjustedStartIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
tiktokStore.openTiktokView(items, adjustedStartIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
* 便捷函数:打开抖音式浏览器查看 URL 列表
|
||||
*/
|
||||
export const openTiktokViewWithUrls = (urls: string[], startIndex = 0) => {
|
||||
const tiktokStore = useTiktokStore()
|
||||
const items = urlsToTiktokItems(urls)
|
||||
|
||||
if (items.length === 0) {
|
||||
console.warn('没有找到可以显示的媒体URL')
|
||||
return
|
||||
}
|
||||
|
||||
tiktokStore.openTiktokView(items, startIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
* 便捷函数:打开抖音式浏览器查看单个文件
|
||||
*/
|
||||
export const openTiktokViewWithFile = (file: FileNodeInfo) => {
|
||||
openTiktokViewWithFiles([file], 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* 便捷函数:打开抖音式浏览器查看单个 URL
|
||||
*/
|
||||
export const openTiktokViewWithUrl = (url: string) => {
|
||||
openTiktokViewWithUrls([url], 0)
|
||||
}
|
||||
Loading…
Reference in New Issue