feat(ui): improve TikTok viewer UX
- Add toggle for navigation buttons in global settings - Add multi-language support for new settings (en, zh-hans, zh-hant, de) - Improve video display in TikTok view using fit-contentpull/840/head
parent
4e8ec92919
commit
dbf6e34ec0
|
|
@ -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-9ea28d47.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-727d406a.css">
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-b50c8b7b.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-a44325c7.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
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-9ea28d47.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};
|
||||
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-b50c8b7b.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
|
|
@ -1 +1 @@
|
|||
import{d as a,U as t,V as s,c as n,cC as _,a0 as o}from"./index-9ea28d47.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};
|
||||
import{d as a,U as t,V as s,c as n,cC as _,a0 as o}from"./index-b50c8b7b.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};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{bT as i,b0 as t,dZ as f,bK as n}from"./index-9ea28d47.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};
|
||||
import{bT as i,b0 as t,dZ as f,bK as n}from"./index-b50c8b7b.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 +1 @@
|
|||
import{d as z,a1 as B,cD 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,cE as R,cF as y,z as V,B as x,ak as T,a0 as U}from"./index-9ea28d47.js";import{_ as N}from"./index-2f7349b8.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-a5d8808c.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-1089a22e.js";/* empty css */import"./_isIterateeCall-c5995cdf.js";import"./index-336f750c.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},X=z({__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:o}=$(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:o.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=t,a.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(a),a.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:o.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},F=e=>{o.value.splice(e,1)};return(e,t)=>{const a=T,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(a,{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(a,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(a,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(o).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(o).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=>F(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 oe=U(X,[["__scopeId","data-v-a2642a17"]]);export{oe as default};
|
||||
import{d as z,a1 as B,cD 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,cE as R,cF as y,z as V,B as x,ak as T,a0 as U}from"./index-b50c8b7b.js";import{_ as N}from"./index-e0c17ac7.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-e4c04984.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-b4b06c0b.js";/* empty css */import"./_isIterateeCall-2b0aae0f.js";import"./index-abe7e4f3.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},X=z({__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:o}=$(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:o.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=t,a.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(a),a.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:o.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),V.success(x("success"))})},F=e=>{o.value.splice(e,1)};return(e,t)=>{const a=T,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(a,{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(a,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(a,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(o).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(o).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=>F(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 oe=U(X,[["__scopeId","data-v-a2642a17"]]);export{oe 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 @@
|
|||
@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-dd38255f]{padding:8px;margin:16px;border-radius:8px;background:var(--zp-primary-background);overflow:auto;height:calc(100% - 32px)}.panel[data-v-dd38255f]>:not(:first-child){margin-left:16px}.lang-select-wrap[data-v-dd38255f]{width:128px;display:inline-block;padding-right:16px}h2[data-v-dd38255f]{margin:64px 0 16px;font-weight:700}.row[data-v-dd38255f]{margin-top:16px;padding:0 16px}.col[data-v-dd38255f]{display:flex}.col.conflict[data-v-dd38255f]{border-bottom:1px solid red;position:relative}.col.conflict[data-v-dd38255f]:after{position:absolute;top:-16px;left:0;background:white;color:red;content:"conflict"}.clear-btn[data-v-dd38255f]{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-7cfe1ab7]{padding:8px;margin:16px;border-radius:8px;background:var(--zp-primary-background);overflow:auto;height:calc(100% - 32px)}.panel[data-v-7cfe1ab7]>:not(:first-child){margin-left:16px}.lang-select-wrap[data-v-7cfe1ab7]{width:128px;display:inline-block;padding-right:16px}h2[data-v-7cfe1ab7]{margin:64px 0 16px;font-weight:700}.row[data-v-7cfe1ab7]{margin-top:16px;padding:0 16px}.col[data-v-7cfe1ab7]{display:flex}.col.conflict[data-v-7cfe1ab7]{border-bottom:1px solid red;position:relative}.col.conflict[data-v-7cfe1ab7]:after{position:absolute;top:-16px;left:0;background:white;color:red;content:"conflict"}.clear-btn[data-v-7cfe1ab7]{margin-left:16px}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{u as w,a as k,F as y,d as x}from"./FileItem-a5d8808c.js";import{d as F,a1 as b,c7 as h,r as D,bg as I,bk as C,U as E,V,c,a3 as z,a4 as e,af as S,cE as B,cG as R,a0 as A}from"./index-9ea28d47.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-1089a22e.js";/* empty css */import"./_isIterateeCall-c5995cdf.js";import"./index-336f750c.js";const G=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}=k(),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)=>(E(),V("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[c(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:z(({item:t,index:r})=>{var n;return[c(y,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:K=>v(r),"full-screen-preview-image-url":e(S)(t),"extra-tags":(n=t==null?void 0:t.tags)==null?void 0:n.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(G,[["__scopeId","data-v-f35f4802"]]);export{N as default};
|
||||
import{u as w,a as k,F as y,d as x}from"./FileItem-e4c04984.js";import{d as F,a1 as b,c7 as h,r as D,bg as I,bk as C,U as E,V,c,a3 as z,a4 as e,af as S,cE as B,cG as R,a0 as A}from"./index-b50c8b7b.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-b4b06c0b.js";/* empty css */import"./_isIterateeCall-2b0aae0f.js";import"./index-abe7e4f3.js";const G=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}=k(),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)=>(E(),V("div",{class:"container",ref_key:"stackViewEl",ref:m,onDrop:_},[c(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:z(({item:t,index:r})=>{var n;return[c(y,{idx:r,file:t,"cell-width":e(f),"enable-close-icon":o.removable,onCloseIconClick:K=>v(r),"full-screen-preview-image-url":e(S)(t),"extra-tags":(n=t==null?void 0:t.tags)==null?void 0:n.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(G,[["__scopeId","data-v-f35f4802"]]);export{N as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{am as F,r as g,l as N,k as A,O as b,G as P,ca as R,cl as O,cq as z}from"./index-9ea28d47.js";import{u as L,a as Q,b as j,e as H}from"./FileItem-a5d8808c.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-dbeb969c.js";import{u as B}from"./useGenInfoDiff-2b0f1c22.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}),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())}),I=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return N({abort:p,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=P(()=>(n.res??[]).filter(y=>!i.has(y.fullpath))),o=R(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=L({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:p,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:O}),{previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:q,canPreview:D}=W({loadNext:()=>n.next()}),G=async(y,S,J)=>{a.value=[{curr:"",files:l.value}],await m(y,S,J)};H("removeFiles",async({paths:y})=>{y.forEach(S=>i.add(S))});const k=()=>{z(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:G,stackViewEl:c,previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:q,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:p,onScroll:x,saveLoadedFileAsJson:k,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();k()},props:v,...B()}};export{se as c,ne as u};
|
||||
import{am as F,r as g,l as N,k as A,O as b,G as P,ca as R,cl as O,cq as z}from"./index-b50c8b7b.js";import{u as L,a as Q,b as j,e as H}from"./FileItem-e4c04984.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-de67077c.js";import{u as B}from"./useGenInfoDiff-36092842.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}),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())}),I=()=>({next:()=>A(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return N({abort:p,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=P(()=>(n.res??[]).filter(y=>!i.has(y.fullpath))),o=R(),{stackViewEl:c,multiSelectedIdxs:t,stack:a,scroller:f,props:v}=L({images:l}).toRefs(),{itemSize:w,gridItems:d,cellWidth:p,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:O}),{previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:q,canPreview:D}=W({loadNext:()=>n.next()}),G=async(y,S,J)=>{a.value=[{curr:"",files:l.value}],await m(y,S,J)};H("removeFiles",async({paths:y})=>{y.forEach(S=>i.add(S))});const k=()=>{z(l.value)};return{images:l,scroller:f,queue:o,iter:n,onContextMenuClickU:G,stackViewEl:c,previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:q,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:p,onScroll:x,saveLoadedFileAsJson:k,saveAllFileAsJson:async()=>{for(;!n.load;)await n.next();k()},props:v,...B()}};export{se as c,ne as u};
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as x,a1 as $,aK as g,cH 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,cI as N,a0 as R}from"./index-9ea28d47.js";/* empty css */const F={class:"container"},K={class:"actions"},L={class:"uni-desc"},U={class:"snapshot"},j=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(q){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",K,[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",L,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",U,[(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 E=R(j,[["__scopeId","data-v-2c44013c"]]);export{E as default};
|
||||
import{d as x,a1 as $,aK as g,cH 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,cI as N,a0 as R}from"./index-b50c8b7b.js";/* empty css */const F={class:"container"},K={class:"actions"},L={class:"uni-desc"},U={class:"snapshot"},j=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(q){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",K,[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",L,n(e.$t("WorkspaceSnapshotDesc")),1),a("ul",U,[(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 E=R(j,[["__scopeId","data-v-2c44013c"]]);export{E as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{r as F,o as P,cv as K,av as L,G as l,ax as T,ay as $,d as I,u as B,cw as _,b as y,bj as V,cx as A,an as E,h as c,c as M,a as G}from"./index-9ea28d47.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:l(function(){}),wrap:l(function(){}),supportFlexGap:l(function(){})})};$("top","middle","bottom","stretch");$("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=I({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=l(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(i,b){if(y(i)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&i[p]!==void 0){e[b]=i[p];break}}else e[b]=i||0}),e});U({gutter:S,supportFlexGap:w,wrap:l(function(){return r.wrap})});var R=l(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=l(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=I({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=l(function(){var e,t=r.span,n=r.order,s=r.offset,i=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(i),i),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=l(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 i="".concat(t[1]/2,"px");n.paddingTop=i,n.paddingBottom=i}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,cv as K,av as L,G as l,ax as T,ay as $,d as I,u as B,cw as _,b as y,bj as V,cx as A,an as E,h as c,c as M,a as G}from"./index-b50c8b7b.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:l(function(){}),wrap:l(function(){}),supportFlexGap:l(function(){})})};$("top","middle","bottom","stretch");$("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=I({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=l(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(i,b){if(y(i)==="object")for(var a=0;a<A.length;a++){var p=A[a];if(x.value[p]&&i[p]!==void 0){e[b]=i[p];break}}else e[b]=i||0}),e});U({gutter:S,supportFlexGap:w,wrap:l(function(){return r.wrap})});var R=l(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=l(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=I({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=l(function(){var e,t=r.span,n=r.order,s=r.offset,i=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(i),i),c(e,"".concat(a,"-pull-").concat(b),b),e),p)}),O=l(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 i="".concat(t[1]/2,"px");n.paddingTop=i,n.paddingBottom=i}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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{cu as j,ay as z,d as K,j as U,dg 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 _,dh as W,P as u,di as x}from"./index-9ea28d47.js";var R=z("small","default"),q=function(){return{id:String,prefixCls:String,size:u.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:u.any,unCheckedChildren:u.any,tabindex:u.oneOfType([u.string,u.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:u.oneOfType([u.string,u.number,u.looseBool]),checkedValue:u.oneOfType([u.string,u.number,u.looseBool]).def(!0),unCheckedValue:u.oneOfType([u.string,u.number,u.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),c=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(c.value,"-small"),T.value==="small"),d(a,"".concat(c.value,"-loading"),n.loading),d(a,"".concat(c.value,"-checked"),f.value),d(a,"".concat(c.value,"-disabled"),n.disabled),d(a,c.value,!0),d(a,"".concat(c.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(c.value,"-handle")},[n.loading?s(L,{class:"".concat(c.value,"-loading-icon")},null):null]),s("span",{class:"".concat(c.value,"-inner")},[f.value?_(y,n,"checkedChildren"):_(y,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
import{cu as j,ay as z,d as K,j as U,dg 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 _,dh as W,P as u,di as x}from"./index-b50c8b7b.js";var R=z("small","default"),q=function(){return{id:String,prefixCls:String,size:u.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:u.any,unCheckedChildren:u.any,tabindex:u.oneOfType([u.string,u.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:u.oneOfType([u.string,u.number,u.looseBool]),checkedValue:u.oneOfType([u.string,u.number,u.looseBool]).def(!0),unCheckedValue:u.oneOfType([u.string,u.number,u.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),c=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(c.value,"-small"),T.value==="small"),d(a,"".concat(c.value,"-loading"),n.loading),d(a,"".concat(c.value,"-checked"),f.value),d(a,"".concat(c.value,"-disabled"),n.disabled),d(a,c.value,!0),d(a,"".concat(c.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(c.value,"-handle")},[n.loading?s(L,{class:"".concat(c.value,"-loading-icon")},null):null]),s("span",{class:"".concat(c.value,"-inner")},[f.value?_(y,n,"checkedChildren"):_(y,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
|
||||
|
|
@ -1 +1 @@
|
|||
import{d as w,bB as A,av as D,cy as B,az as j,n as k,cz as V,cA as y,e as $,c as a,_ as T,h as r,a as P,cB as M,P as b}from"./index-9ea28d47.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",B)}},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;j(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=k(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};
|
||||
import{d as w,bB as A,av as D,cy as B,az as j,n as k,cz as V,cA as y,e as $,c as a,_ as T,h as r,a as P,cB as M,P as b}from"./index-b50c8b7b.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",B)}},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;j(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=k(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};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{cj as e,ck as i,cl as r,cm as a,b0 as c}from"./index-9ea28d47.js";function o(s,t){return e(i(s,t,r),s+"")}function b(s){return a(s)&&c(s)}export{o as b,b as i};
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{cj as e,ck as i,cl as r,cm as a,b0 as c}from"./index-b50c8b7b.js";function o(s,t){return e(i(s,t,r),s+"")}function b(s){return a(s)&&c(s)}export{o as b,b as i};
|
||||
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,a1 as ee,r as F,J as te,K as le,o as ie,U as v,V as N,c as i,a4 as e,W as g,a3 as n,X as k,Y as u,a5 as R,L as se,a6 as ae,af as oe,ag as $,$ as A,a2 as ne,z as w,B as re,cJ as ce,cK as de,ak as ue,ai as me,T as fe,a0 as pe}from"./index-9ea28d47.js";import{u as ve,c as ge,a as ke,F as we,d as he}from"./FileItem-a5d8808c.js";import{a as Ce,b as Se,c as _e,M as Ie,o as z,L as ye,R as xe,f as be}from"./MultiSelectKeep-dbeb969c.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-1089a22e.js";/* empty css */import"./_isIterateeCall-c5995cdf.js";import"./index-336f750c.js";import"./shortcut-70212e50.js";import"./Checkbox-716ad574.js";import"./index-2f7349b8.js";const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=Z({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),K=()=>{h.value||(w.info({content:re("randomImageSettingNotification"),duration:6,key:"randomImageSetting"}),h.value=!0)},f=async()=>{try{m.value=!0;const s=await ce();s.length===0&&w.warn("No data, please generate index in image search page first"),l.value=s}finally{m.value=!1,_()}},C=()=>{if(l.value.length===0){w.warn("没有图片可以浏览");return}z(l.value,o.value||0)};ie(()=>{f(),setTimeout(()=>{K()},2e3)});const{stackViewEl:P,multiSelectedIdxs:p,stack:L,scroller:U}=ve({images:l}).toRefs(),{onClearAllSelected:D,onSelectAll:E,onReverseSelect:G}=ge();Ce();const{itemSize:S,gridItems:O,cellWidth:W,onScroll:_}=ke(),{showGenInfo:c,imageGenInfo:I,q:J,onContextMenuClick:q,onFileItemClick:H}=Se({openNext:de}),{previewIdx:o,previewing:y,onPreviewVisibleChange:Q,previewImgMove:x,canPreview:b}=_e(),V=async(s,t,d)=>{L.value=[{curr:"",files:l.value}],await q(s,t,d)};return(s,t)=>{var M;const d=ue,X=me,Y=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:P},[i(Ie,{show:!!e(p).length||e(B).keepMultiSelect,onClearAllSelected:e(D),onSelectAll:e(E),onReverseSelect:e(G)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),g("div",Ve,[i(d,{onClick:f,onTouchstart:R(f,["prevent"]),type:"primary",loading:m.value,shape:"round"},{default:n(()=>[k(u(s.$t("shuffle")),1)]),_:1},8,["onTouchstart","loading"]),i(d,{onClick:C,onTouchstart:R(C,["prevent"]),type:"default",disabled:!((M=l.value)!=null&&M.length),shape:"round"},{default:n(()=>[k(u(s.$t("tiktokView")),1)]),_:1},8,["onTouchstart","disabled"])]),i(Y,{visible:e(c),"onUpdate:visible":t[1]||(t[1]=a=>ae(c)?c.value=a:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=a=>c.value=!1)},{cancelText:n(()=>[]),default:n(()=>[i(X,{active:"",loading:!e(J).isIdle},{default:n(()=>[g("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=a=>e(se)(e(I)))},[g("div",Me,u(s.$t("doubleClickToCopy")),1),k(" "+u(e(I)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),i(e(he),{ref_key:"scroller",ref:U,class:"file-list",items:l.value.slice(),"item-size":e(S).first,"key-field":"fullpath","item-secondary-size":e(S).second,gridItems:e(O),onScroll:e(_)},{default:n(({item:a,index:T})=>[i(we,{idx:T,file:a,"cell-width":e(W),"full-screen-preview-image-url":e(r)[e(o)]?e(oe)(e(r)[e(o)]):"",onContextMenuClick:V,onPreviewVisibleChange:e(Q),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(H),onTiktokView:(Re,j)=>e(z)(l.value,j)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick","onTiktokView"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(y)?(v(),N("div",Te,[i(e(ye),{onClick:t[3]||(t[3]=a=>e(x)("prev")),class:$({disable:!e(b)("prev")})},null,8,["class"]),i(e(xe),{onClick:t[4]||(t[4]=a=>e(x)("next")),class:$({disable:!e(b)("next")})},null,8,["class"])])):A("",!0),e(y)&&e(r)&&e(r)[e(o)]?(v(),ne(be,{key:1,file:e(r)[e(o)],idx:e(o),onContextMenuClick:V},null,8,["file","idx"])):A("",!0)],512)}}});const Ge=pe(Fe,[["__scopeId","data-v-49082269"]]);export{Ge as default};
|
||||
import{d as Z,a1 as ee,r as F,J as te,K as le,o as ie,U as v,V as N,c as i,a4 as e,W as g,a3 as n,X as k,Y as u,a5 as R,L as se,a6 as ae,af as oe,ag as $,$ as A,a2 as ne,z as w,B as re,cJ as ce,cK as de,ak as ue,ai as me,T as fe,a0 as pe}from"./index-b50c8b7b.js";import{u as ve,c as ge,a as ke,F as we,d as he}from"./FileItem-e4c04984.js";import{a as Ce,b as Se,c as _e,M as Ie,o as z,L as ye,R as xe,f as be}from"./MultiSelectKeep-de67077c.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-b4b06c0b.js";/* empty css */import"./_isIterateeCall-2b0aae0f.js";import"./index-abe7e4f3.js";import"./shortcut-026044bc.js";import"./Checkbox-2256c39a.js";import"./index-e0c17ac7.js";const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=Z({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),K=()=>{h.value||(w.info({content:re("randomImageSettingNotification"),duration:6,key:"randomImageSetting"}),h.value=!0)},f=async()=>{try{m.value=!0;const s=await ce();s.length===0&&w.warn("No data, please generate index in image search page first"),l.value=s}finally{m.value=!1,_()}},C=()=>{if(l.value.length===0){w.warn("没有图片可以浏览");return}z(l.value,o.value||0)};ie(()=>{f(),setTimeout(()=>{K()},2e3)});const{stackViewEl:P,multiSelectedIdxs:p,stack:L,scroller:U}=ve({images:l}).toRefs(),{onClearAllSelected:D,onSelectAll:E,onReverseSelect:G}=ge();Ce();const{itemSize:S,gridItems:O,cellWidth:W,onScroll:_}=ke(),{showGenInfo:c,imageGenInfo:I,q:J,onContextMenuClick:q,onFileItemClick:H}=Se({openNext:de}),{previewIdx:o,previewing:y,onPreviewVisibleChange:Q,previewImgMove:x,canPreview:b}=_e(),V=async(s,t,d)=>{L.value=[{curr:"",files:l.value}],await q(s,t,d)};return(s,t)=>{var M;const d=ue,X=me,Y=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:P},[i(Ie,{show:!!e(p).length||e(B).keepMultiSelect,onClearAllSelected:e(D),onSelectAll:e(E),onReverseSelect:e(G)},null,8,["show","onClearAllSelected","onSelectAll","onReverseSelect"]),g("div",Ve,[i(d,{onClick:f,onTouchstart:R(f,["prevent"]),type:"primary",loading:m.value,shape:"round"},{default:n(()=>[k(u(s.$t("shuffle")),1)]),_:1},8,["onTouchstart","loading"]),i(d,{onClick:C,onTouchstart:R(C,["prevent"]),type:"default",disabled:!((M=l.value)!=null&&M.length),shape:"round"},{default:n(()=>[k(u(s.$t("tiktokView")),1)]),_:1},8,["onTouchstart","disabled"])]),i(Y,{visible:e(c),"onUpdate:visible":t[1]||(t[1]=a=>ae(c)?c.value=a:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=a=>c.value=!1)},{cancelText:n(()=>[]),default:n(()=>[i(X,{active:"",loading:!e(J).isIdle},{default:n(()=>[g("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=a=>e(se)(e(I)))},[g("div",Me,u(s.$t("doubleClickToCopy")),1),k(" "+u(e(I)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),i(e(he),{ref_key:"scroller",ref:U,class:"file-list",items:l.value.slice(),"item-size":e(S).first,"key-field":"fullpath","item-secondary-size":e(S).second,gridItems:e(O),onScroll:e(_)},{default:n(({item:a,index:T})=>[i(we,{idx:T,file:a,"cell-width":e(W),"full-screen-preview-image-url":e(r)[e(o)]?e(oe)(e(r)[e(o)]):"",onContextMenuClick:V,onPreviewVisibleChange:e(Q),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(H),onTiktokView:(Re,j)=>e(z)(l.value,j)},null,8,["idx","file","cell-width","full-screen-preview-image-url","onPreviewVisibleChange","is-selected-mutil-files","selected","onFileItemClick","onTiktokView"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"]),e(y)?(v(),N("div",Te,[i(e(ye),{onClick:t[3]||(t[3]=a=>e(x)("prev")),class:$({disable:!e(b)("prev")})},null,8,["class"]),i(e(xe),{onClick:t[4]||(t[4]=a=>e(x)("next")),class:$({disable:!e(b)("next")})},null,8,["class"])])):A("",!0),e(y)&&e(r)&&e(r)[e(o)]?(v(),ne(be,{key:1,file:e(r)[e(o)],idx:e(o),onContextMenuClick:V},null,8,["file","idx"])):A("",!0)],512)}}});const Ge=pe(Fe,[["__scopeId","data-v-49082269"]]);export{Ge as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{R as y,C as v}from"./index-f9446c9d.js";import{cu as f,c as d,A as P,d as w,U as o,V as c,W as r,Z as S,a8 as V,aG as O,a3 as R,X as u,Y as p,a4 as b,ak as $,a0 as x,R as H,J as _,K as m}from"./index-9ea28d47.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 o(),c("div",null,[r("ul",F,[(o(!0),c(S,null,V(e.records.getRecords(),i=>(o(),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:R(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(b(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const q=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 G=_(`${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{q as H,E as _,A as a,G as f,M as t};
|
||||
import{R as y,C as v}from"./index-9b5e5aaf.js";import{cu as f,c as d,A as P,d as w,U as o,V as c,W as r,Z as S,a8 as V,aG as O,a3 as R,X as u,Y as p,a4 as b,ak as $,a0 as x,R as H,J as _,K as m}from"./index-b50c8b7b.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 o(),c("div",null,[r("ul",F,[(o(!0),c(S,null,V(e.records.getRecords(),i=>(o(),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:R(()=>[u(p(e.$t("restore")),1)]),_:2},1032,["onClick"]),r("div",{class:"pin",onClick:g=>e.records.switchPin(i)},[d(b(z)),u(" "+p(e.records.isPinned(i)?e.$t("unpin"):e.$t("pin")),1)],8,B)])]))),128))])])}}});const q=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 G=_(`${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{q as H,E as _,A as a,G as f,M as t};
|
||||
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{u as G,g as d}from"./FileItem-a5d8808c.js";import{r as b,t as j,cr as m,cs as y,ct as D}from"./index-9ea28d47.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};
|
||||
import{u as G,g as d}from"./FileItem-e4c04984.js";import{r as b,t as j,cr as m,cs as y,ct as D}from"./index-b50c8b7b.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};
|
||||
|
|
@ -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-9ea28d47.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-727d406a.css">
|
||||
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-b50c8b7b.js"></script>
|
||||
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-a44325c7.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ export const de: Partial<IIBI18nMap> = {
|
|||
exactMatch: 'Exakte Übereinstimmung',
|
||||
anyMatch: 'Beliebige Übereinstimmung',
|
||||
exclude: 'Ausschliessen',
|
||||
showTiktokNavigator: 'Navigationsschaltflächen anzeigen',
|
||||
showTiktokNavigatorDesc: 'Zeigen Sie die Navigationstasten (Pfeile nach oben/unten) in der TikTok-Ansicht an',
|
||||
'auto.refreshed': 'Automatische Aktualisierung erfolgreich durchgeführt!',
|
||||
copied: 'In die Zwischenablage kopiert!',
|
||||
'index.expired': 'Index abgelaufen, automatische Aktualisierung wird durchgeführt',
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ export const en: IIBI18nMap = {
|
|||
pinnedSearchHistoryDesc: 'You can quickly restore to the previous search state by clicking the pinned search history.',
|
||||
addNewCustomTag: 'Add New Custom Tag',
|
||||
clearCacheIfNotTakeEffect: 'If the changes do not take effect, try clearing the page cache',
|
||||
showTiktokNavigator: 'Show Navigation Buttons',
|
||||
showTiktokNavigatorDesc: 'Show the navigation buttons (up/down arrows) in TikTok view',
|
||||
success: 'Success',
|
||||
setCurrFrameAsVideoPoster: 'Set Current Frame as Video Cover',
|
||||
sync: 'Sync',
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ export const zhHans = {
|
|||
pinnedSearchHistoryDesc: '你可以通过点击置顶的搜索历史来快速还原到之前的搜索状态',
|
||||
addNewCustomTag: '添加新的自定义标签',
|
||||
clearCacheIfNotTakeEffect: '如果更改没有生效,请尝试清理页面缓存',
|
||||
showTiktokNavigator: '显示导航按钮',
|
||||
showTiktokNavigatorDesc: '在 TikTok 视图中显示导航按钮(上/下箭头)',
|
||||
success: '成功',
|
||||
setCurrFrameAsVideoPoster: '设置当前帧为视频封面',
|
||||
sync: '同步',
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ export const zhHant: Partial<IIBI18nMap> = {
|
|||
conflictWithOtherShortcuts: '與其他快速鍵衝突',
|
||||
pinnedSearchHistoryDesc: '你可以通過點擊置頂的搜索歷史來快速還原到之前的搜索狀態。',
|
||||
addNewCustomTag: '添加新的自定義標籤',
|
||||
showTiktokNavigator: '顯示導航按鈕',
|
||||
showTiktokNavigatorDesc: '在 TikTok 視圖中顯示導航按鈕(上/下箭頭)',
|
||||
clearCacheIfNotTakeEffect: '如果更改沒有生效,請嘗試清理頁面緩存',
|
||||
success: '成功',
|
||||
setCurrFrameAsVideoPoster: '設置當前幀為視頻封面',
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { isVideoFile } from '@/util'
|
|||
import { openAddNewTagModal } from '@/components/functionalCallableComp'
|
||||
import { toggleCustomTagToImg } from '@/api/db'
|
||||
import { message } from 'ant-design-vue'
|
||||
import {
|
||||
CloseOutlined,
|
||||
FullscreenOutlined,
|
||||
import {
|
||||
CloseOutlined,
|
||||
FullscreenOutlined,
|
||||
FullscreenExitOutlined,
|
||||
UpOutlined,
|
||||
DownOutlined,
|
||||
|
|
@ -26,10 +26,24 @@ import type { StyleValue } from 'vue'
|
|||
import { throttle } from 'lodash-es'
|
||||
import { delay } from 'vue3-ts-util'
|
||||
|
||||
const isDev = import.meta.env.DEV
|
||||
|
||||
const tiktokStore = useTiktokStore()
|
||||
const tagStore = useTagStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const global = useGlobalStore()
|
||||
|
||||
// 调试信息计算属性
|
||||
const debugInfo = computed(() => ({
|
||||
isAnimating: isAnimating.value,
|
||||
isDragging: isDragging.value,
|
||||
bufferTransform: bufferTransform.value,
|
||||
dragOffset: dragOffset.value,
|
||||
autoPlayMode: autoPlayMode.value,
|
||||
isMuted: isMuted.value,
|
||||
currentIndex: tiktokStore.currentIndex,
|
||||
}))
|
||||
|
||||
// 使用 @vueuse 存储用户声音偏好
|
||||
const isMuted = useLocalStorage('tiktok-viewer-muted', true) // 默认静音
|
||||
|
||||
|
|
@ -43,7 +57,7 @@ const autoPlayOptions: AutoPlayMode[] = ['off', '5s', '10s', '20s']
|
|||
const autoPlayLabels = computed(() => ({
|
||||
off: t('autoPlayOff'),
|
||||
'5s': t('autoPlay5s'),
|
||||
'10s': t('autoPlay10s'),
|
||||
'10s': t('autoPlay10s'),
|
||||
'20s': t('autoPlay20s')
|
||||
}))
|
||||
|
||||
|
|
@ -59,8 +73,8 @@ const getAutoPlayDelay = (mode: AutoPlayMode): number => {
|
|||
|
||||
// 设备检测
|
||||
const isMac = computed(() => {
|
||||
return /Mac|iPhone|iPad|iPod/.test(navigator.userAgent) ||
|
||||
navigator.platform.toUpperCase().indexOf('MAC') >= 0
|
||||
return /Mac|iPhone|iPad|iPod/.test(navigator.userAgent) ||
|
||||
navigator.platform.toUpperCase().indexOf('MAC') >= 0
|
||||
})
|
||||
|
||||
// 根据设备类型设置延迟时间
|
||||
|
|
@ -102,7 +116,7 @@ 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'
|
||||
|
|
@ -120,15 +134,15 @@ const clearAutoPlayTimer = () => {
|
|||
// 启动自动轮播计时器
|
||||
const startAutoPlayTimer = () => {
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
if (autoPlayMode.value === 'off') return
|
||||
|
||||
|
||||
const currentItem = bufferItems.value[1]
|
||||
if (!currentItem) return
|
||||
|
||||
|
||||
// 如果是视频,不需要启动计时器(会在视频结束时自动切换)
|
||||
if (isVideoFile(currentItem.url)) return
|
||||
|
||||
|
||||
const delay = getAutoPlayDelay(autoPlayMode.value)
|
||||
if (delay > 0) {
|
||||
autoPlayTimer.value = window.setTimeout(() => {
|
||||
|
|
@ -165,16 +179,16 @@ const controlVideoPlayback = async () => {
|
|||
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 = isMuted.value // 根据用户偏好设置静音状态
|
||||
|
||||
|
||||
// 添加视频结束事件监听
|
||||
video.onended = () => handleVideoEnded(index)
|
||||
|
||||
|
||||
await video.play()
|
||||
} else {
|
||||
// 非当前显示的视频:暂停并重置
|
||||
|
|
@ -192,13 +206,13 @@ const controlVideoPlayback = async () => {
|
|||
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()
|
||||
|
|
@ -210,7 +224,7 @@ const updateBuffer = () => {
|
|||
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)
|
||||
}
|
||||
|
|
@ -233,18 +247,18 @@ const toggleLike = async () => {
|
|||
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 { is_remove } = await toggleCustomTagToImg({
|
||||
tag_id: Number(tagId),
|
||||
img_path: fullpath
|
||||
})
|
||||
|
||||
|
||||
const tag = global.conf?.all_custom_tags.find((v) => v.id === tagId)?.name || t('tag')
|
||||
await tagStore.refreshTags([fullpath])
|
||||
|
||||
|
||||
message.success(t(is_remove ? 'removedTagFromImage' : 'addedTagToImage', { tag }))
|
||||
} catch (error) {
|
||||
console.error('Toggle tag error:', error)
|
||||
|
|
@ -269,32 +283,32 @@ const toggleAutoPlay = () => {
|
|||
const currentIndex = autoPlayOptions.indexOf(autoPlayMode.value)
|
||||
const nextIndex = (currentIndex + 1) % autoPlayOptions.length
|
||||
autoPlayMode.value = autoPlayOptions[nextIndex]
|
||||
|
||||
|
||||
// 重新启动计时器
|
||||
startAutoPlayTimer()
|
||||
|
||||
|
||||
message.success(t('autoPlayStatus', { mode: autoPlayLabels.value[autoPlayMode.value] }))
|
||||
}
|
||||
|
||||
// 滑动到上一个
|
||||
const goToPrev = (isTriggerByTouch: boolean = false) => {
|
||||
if (isAnimating.value || !tiktokStore.hasPrev) return
|
||||
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
isAnimating.value = true
|
||||
|
||||
|
||||
// 重置拖拽偏移
|
||||
dragOffset.value = 0
|
||||
|
||||
|
||||
bufferTransform.value = 100 // 向下移动
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
tiktokStore.prev()
|
||||
updateBuffer()
|
||||
bufferTransform.value = 0
|
||||
|
||||
|
||||
// 简化状态重置逻辑
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
|
|
@ -305,22 +319,22 @@ const goToPrev = (isTriggerByTouch: boolean = false) => {
|
|||
// 滑动到下一个
|
||||
const goToNext = (isTriggerByTouch: boolean = false) => {
|
||||
if (isAnimating.value || !tiktokStore.hasNext) return
|
||||
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
isAnimating.value = true
|
||||
|
||||
|
||||
// 重置拖拽偏移
|
||||
dragOffset.value = 0
|
||||
|
||||
|
||||
bufferTransform.value = -100 // 向上移动
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
tiktokStore.next()
|
||||
updateBuffer()
|
||||
bufferTransform.value = 0
|
||||
|
||||
|
||||
// 简化状态重置逻辑
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
|
|
@ -331,23 +345,23 @@ const goToNext = (isTriggerByTouch: boolean = false) => {
|
|||
// 跳转到第一个
|
||||
const goToFirst = (isTriggerByTouch: boolean = false) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
isAnimating.value = true
|
||||
|
||||
|
||||
// 重置拖拽偏移
|
||||
dragOffset.value = 0
|
||||
|
||||
|
||||
bufferTransform.value = 100 // 向下移动动画效果
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
// 直接设置到第一个
|
||||
tiktokStore.currentIndex = 0
|
||||
updateBuffer()
|
||||
bufferTransform.value = 0
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
}, getAnimationDelay(isTriggerByTouch))
|
||||
|
|
@ -356,74 +370,89 @@ const goToFirst = (isTriggerByTouch: boolean = false) => {
|
|||
|
||||
// 触摸事件处理
|
||||
const handleTouchStart = (e: TouchEvent) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
if (isAnimating.value) {
|
||||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
touchStartY.value = e.touches[0].clientY
|
||||
touchCurrentY.value = e.touches[0].clientY
|
||||
isDragging.value = true
|
||||
dragOffset.value = 0
|
||||
|
||||
|
||||
// 确保 transform 状态正确
|
||||
if (bufferTransform.value !== 0) {
|
||||
bufferTransform.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleTouchMove = (e: TouchEvent) => {
|
||||
if (!isDragging.value || isAnimating.value) return
|
||||
|
||||
if (isAnimating.value) {
|
||||
e.preventDefault()
|
||||
return
|
||||
}
|
||||
|
||||
if (!isDragging.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))
|
||||
|
||||
const viewportHeight = window.innerHeight
|
||||
|
||||
// 直接将移动距离转换为容器的百分比,完全线性映射
|
||||
const movePercent = (deltaY / viewportHeight) * 100
|
||||
|
||||
// 简单的线性移动,不使用阻尼
|
||||
dragOffset.value = movePercent
|
||||
|
||||
// 阻止页面滚动
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
const handleTouchEnd = () => {
|
||||
if (!isDragging.value) return
|
||||
|
||||
|
||||
const deltaY = touchCurrentY.value - touchStartY.value
|
||||
const threshold = 80 // 滑动阈值
|
||||
|
||||
const viewportHeight = window.innerHeight
|
||||
const movePercent = (deltaY / viewportHeight) * 100
|
||||
|
||||
// 重置拖拽状态
|
||||
isDragging.value = false
|
||||
|
||||
|
||||
if (isAnimating.value) {
|
||||
// 如果正在动画中,强制重置到正确位置
|
||||
dragOffset.value = 0
|
||||
return
|
||||
}
|
||||
|
||||
if (Math.abs(deltaY) > threshold) {
|
||||
if (deltaY > 0 && tiktokStore.hasPrev) {
|
||||
|
||||
// 增加阈值到容器高度的30%
|
||||
if (Math.abs(movePercent) > 30) {
|
||||
if (movePercent > 0 && tiktokStore.hasPrev) {
|
||||
// 向下滑动,上一个
|
||||
goToPrev(true)
|
||||
} else if (deltaY < 0 && tiktokStore.hasNext) {
|
||||
} else if (movePercent < 0 && tiktokStore.hasNext) {
|
||||
// 向上滑动,下一个
|
||||
goToNext(true)
|
||||
} else {
|
||||
// 回弹动画 - 添加过渡效果
|
||||
// 回弹动画
|
||||
resetToCenter()
|
||||
}
|
||||
} else {
|
||||
// 回弹动画 - 添加过渡效果
|
||||
// 回弹动画
|
||||
resetToCenter()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 添加触摸取消处理
|
||||
const handleTouchCancel = () => {
|
||||
if (!isDragging.value) return
|
||||
|
||||
|
||||
isDragging.value = false
|
||||
|
||||
|
||||
if (!isAnimating.value) {
|
||||
resetToCenter()
|
||||
}
|
||||
|
|
@ -432,13 +461,13 @@ const handleTouchCancel = () => {
|
|||
// 重置到中心位置的函数
|
||||
const resetToCenter = () => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
|
||||
isAnimating.value = true
|
||||
dragOffset.value = 0
|
||||
|
||||
|
||||
// 确保 bufferTransform 也是正确的
|
||||
bufferTransform.value = 0
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
isAnimating.value = false
|
||||
// 重新启动自动轮播计时器
|
||||
|
|
@ -449,17 +478,17 @@ const resetToCenter = () => {
|
|||
// // 错位检测和修复函数
|
||||
// const fixMisalignment = () => {
|
||||
// if (isDragging.value) return
|
||||
|
||||
|
||||
// // 检测是否存在错位
|
||||
// if (bufferTransform.value !== 0 || dragOffset.value !== 0) {
|
||||
// // 强制重置到正确位置
|
||||
// bufferTransform.value = 0
|
||||
// dragOffset.value = 0
|
||||
|
||||
|
||||
// // 重新更新 buffer 确保内容正确
|
||||
// updateBuffer()
|
||||
// }
|
||||
|
||||
|
||||
// // 检查动画状态是否卡住
|
||||
// if (isAnimating.value) {
|
||||
// isAnimating.value = false
|
||||
|
|
@ -468,13 +497,13 @@ const resetToCenter = () => {
|
|||
|
||||
// 鼠标滚轮事件
|
||||
const handleWheel = throttle((e: WheelEvent) => {
|
||||
if (isAnimating.value) return
|
||||
|
||||
if (isAnimating.value) return
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
if (e.deltaY > 0 && tiktokStore.hasNext) {
|
||||
goToNext()
|
||||
} else if (e.deltaY < 0 && tiktokStore.hasPrev) {
|
||||
|
|
@ -487,7 +516,7 @@ const handleWheel = throttle((e: WheelEvent) => {
|
|||
const handleKeydown = (e: KeyboardEvent) => {
|
||||
// 仅在 TikTok 视图打开时生效
|
||||
if (!tiktokStore.visible || isAnimating.value) return
|
||||
|
||||
|
||||
switch (e.key) {
|
||||
case 'ArrowUp':
|
||||
e.preventDefault()
|
||||
|
|
@ -554,7 +583,7 @@ const exitFullscreen = async () => {
|
|||
// 切换声音
|
||||
const toggleMute = () => {
|
||||
isMuted.value = !isMuted.value
|
||||
|
||||
|
||||
// 立即应用到当前播放的视频
|
||||
const currentVideo = videoRefs.value[1]
|
||||
if (currentVideo) {
|
||||
|
|
@ -584,19 +613,19 @@ watch(videoPreloadList, (newList) => {
|
|||
recVideo(video)
|
||||
}
|
||||
}, { deep: true })
|
||||
watch(() => tiktokStore.visible ===false || tiktokStore.mediaList.length === 0, (isClose) => {
|
||||
if (isClose) return
|
||||
watch(() => tiktokStore.visible === false || tiktokStore.mediaList.length === 0, (isClose) => {
|
||||
if (isClose) return
|
||||
// 组件隐藏时清理预加载列表
|
||||
videoPreloadList.value.forEach(recVideo)
|
||||
videoPreloadList.value = []
|
||||
|
||||
|
||||
autoPlayMode.value = 'off' // 重置自动轮播模式
|
||||
}, { immediate: true })
|
||||
// 预加载相邻媒体
|
||||
const preloadMedia = () => {
|
||||
bufferItems.value.forEach(item => {
|
||||
if (!item) return
|
||||
|
||||
|
||||
if (isVideoFile(item.url)) {
|
||||
const video = document.createElement('video')
|
||||
video.preload = 'metadata'
|
||||
|
|
@ -614,7 +643,7 @@ const preloadMedia = () => {
|
|||
const loadCurrentItemTags = async () => {
|
||||
const currentItem = tiktokStore.currentItem
|
||||
if (!currentItem) return
|
||||
|
||||
|
||||
const fullpath = (currentItem as any)?.fullpath || currentItem.id
|
||||
if (fullpath) {
|
||||
await tagStore.fetchImageTags([fullpath])
|
||||
|
|
@ -631,10 +660,10 @@ onMounted(() => {
|
|||
onUnmounted(() => {
|
||||
document.removeEventListener('keydown', handleKeydown)
|
||||
document.removeEventListener('fullscreenchange', handleFullscreenChange)
|
||||
|
||||
|
||||
// 清理自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
// 清理:停止所有视频播放
|
||||
videoRefs.value.forEach(video => {
|
||||
recVideo(video!)
|
||||
|
|
@ -664,10 +693,10 @@ watch(() => tiktokStore.visible, (visible) => {
|
|||
video.pause()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 清除自动轮播计时器
|
||||
clearAutoPlayTimer()
|
||||
|
||||
|
||||
// 如果当前是全屏状态,退出全屏
|
||||
if (document.fullscreenElement) {
|
||||
exitFullscreen()
|
||||
|
|
@ -697,48 +726,34 @@ watch(() => autoPlayMode.value, () => {
|
|||
|
||||
<template>
|
||||
<Teleport to="body">
|
||||
<div
|
||||
v-if="tiktokStore.visible"
|
||||
ref="containerRef"
|
||||
:class="containerClass"
|
||||
@touchstart="handleTouchStart"
|
||||
@touchmove="handleTouchMove"
|
||||
@touchend="handleTouchEnd"
|
||||
@touchcancel="handleTouchCancel"
|
||||
@wheel="handleWheel"
|
||||
>
|
||||
<div v-if="tiktokStore.visible" ref="containerRef" :class="containerClass" @touchstart="handleTouchStart"
|
||||
@touchmove="handleTouchMove" @touchend="handleTouchEnd" @touchcancel="handleTouchCancel" @wheel="handleWheel">
|
||||
<!-- Debug信息 -->
|
||||
<div v-if="isDev" class="debug-info">
|
||||
<div v-for="(value, key) in debugInfo" :key="key" class="debug-item">
|
||||
<span class="debug-label">{{ key }}:</span>
|
||||
<span class="debug-value" :class="{ 'is-true': value === true, 'is-false': value === false }">
|
||||
{{ value }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 媒体内容区域 -->
|
||||
<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-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) && tiktokStore.visible"
|
||||
class="tiktok-media"
|
||||
:src="item.url"
|
||||
:controls="index === 1"
|
||||
:loop="index === 1 && autoPlayMode === 'off'"
|
||||
playsinline
|
||||
preload="metadata"
|
||||
:key="item.url"
|
||||
:ref="(el) => { if (el) videoRefs[index] = el as HTMLVideoElement }"
|
||||
/>
|
||||
|
||||
<video v-if="isVideoFile(item.url) && tiktokStore.visible" class="tiktok-media tiktok-video" :src="item.url"
|
||||
:controls="index === 1" :loop="index === 1 && autoPlayMode === 'off'" playsinline preload="metadata"
|
||||
:key="item.url" :ref="(el) => { if (el) videoRefs[index] = el as HTMLVideoElement }" />
|
||||
|
||||
<!-- 图片 -->
|
||||
<img
|
||||
v-else
|
||||
class="tiktok-media"
|
||||
:src="item.url"
|
||||
/>
|
||||
<img v-else class="tiktok-media" :src="item.url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -746,86 +761,54 @@ watch(() => autoPlayMode.value, () => {
|
|||
<!-- 控制按钮区域 -->
|
||||
<div class="tiktok-controls">
|
||||
<!-- 关闭按钮 -->
|
||||
<button
|
||||
class="control-btn close-btn"
|
||||
@click="tiktokStore.closeView"
|
||||
:title="$t('close')"
|
||||
>
|
||||
<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')"
|
||||
>
|
||||
<button class="control-btn fullscreen-btn" @click="handleFullscreenToggle"
|
||||
:title="tiktokStore.isFullscreen ? $t('exitFullscreen') : $t('fullscreen')">
|
||||
<FullscreenExitOutlined v-if="tiktokStore.isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
</button>
|
||||
|
||||
<!-- 声音切换按钮 -->
|
||||
<button
|
||||
class="control-btn sound-btn"
|
||||
@click="toggleMute"
|
||||
:title="isMuted ? $t('soundOn') : $t('soundOff')"
|
||||
>
|
||||
<button class="control-btn sound-btn" @click="toggleMute" :title="isMuted ? $t('soundOn') : $t('soundOff')">
|
||||
<SoundFilled v-if="!isMuted" />
|
||||
<SoundOutlined v-else />
|
||||
</button>
|
||||
|
||||
<!-- Like 按钮 -->
|
||||
<button
|
||||
v-if="likeTag"
|
||||
class="control-btn like-btn"
|
||||
:class="{ 'like-active': isLiked }"
|
||||
@click="toggleLike"
|
||||
:title="isLiked ? $t('unlike') : $t('like')"
|
||||
>
|
||||
<button v-if="likeTag" class="control-btn like-btn" :class="{ 'like-active': isLiked }" @click="toggleLike"
|
||||
:title="isLiked ? $t('unlike') : $t('like')">
|
||||
<HeartFilled v-if="isLiked" />
|
||||
<HeartOutlined v-else />
|
||||
</button>
|
||||
|
||||
<!-- 自动轮播按钮 -->
|
||||
<button
|
||||
class="control-btn autoplay-btn"
|
||||
:class="{ 'autoplay-active': autoPlayMode !== 'off' }"
|
||||
@click="toggleAutoPlay"
|
||||
:title="$t('autoPlayTooltip', { mode: autoPlayLabels[autoPlayMode] })"
|
||||
>
|
||||
<button class="control-btn autoplay-btn" :class="{ 'autoplay-active': autoPlayMode !== 'off' }"
|
||||
@click="toggleAutoPlay" :title="$t('autoPlayTooltip', { mode: autoPlayLabels[autoPlayMode] })">
|
||||
<PlayCircleOutlined />
|
||||
<span class="autoplay-label">{{ autoPlayLabels[autoPlayMode] }}</span>
|
||||
</button>
|
||||
|
||||
<!-- TAG 按钮 -->
|
||||
<button
|
||||
class="control-btn tags-btn"
|
||||
@click="showTags = !showTags"
|
||||
:title="$t('tags')"
|
||||
>
|
||||
<button class="control-btn tags-btn" @click="showTags = !showTags" :title="$t('tags')">
|
||||
<TagsOutlined />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 导航指示器 -->
|
||||
<div class="tiktok-navigation">
|
||||
<div v-if="globalStore.showTiktokNavigator" class="tiktok-navigation">
|
||||
<!-- 上一个指示器 -->
|
||||
<div
|
||||
v-if="tiktokStore.hasPrev"
|
||||
class="nav-indicator nav-prev"
|
||||
@touchstart.prevent="goToPrev(false)"
|
||||
@click="goToPrev(false)"
|
||||
>
|
||||
<div v-if="tiktokStore.hasPrev" class="nav-indicator nav-prev" @touchstart.prevent="goToPrev(false)"
|
||||
@click="goToPrev(false)">
|
||||
<UpOutlined />
|
||||
</div>
|
||||
|
||||
<!-- 下一个指示器 -->
|
||||
<div
|
||||
v-if="tiktokStore.hasNext"
|
||||
class="nav-indicator nav-next"
|
||||
@touchstart.prevent="goToNext(false)"
|
||||
@click="goToNext(false)"
|
||||
>
|
||||
<div v-if="tiktokStore.hasNext" class="nav-indicator nav-next" @touchstart.prevent="goToNext(false)"
|
||||
@click="goToNext(false)">
|
||||
<DownOutlined />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -833,12 +816,9 @@ watch(() => autoPlayMode.value, () => {
|
|||
<!-- 进度指示器 -->
|
||||
<div class="tiktok-progress">
|
||||
<div class="progress-bar">
|
||||
<div
|
||||
class="progress-fill"
|
||||
:style="{
|
||||
width: `${((tiktokStore.currentIndex + 1) / tiktokStore.mediaList.length) * 100}%`
|
||||
}"
|
||||
/>
|
||||
<div class="progress-fill" :style="{
|
||||
width: `${((tiktokStore.currentIndex + 1) / tiktokStore.mediaList.length) * 100}%`
|
||||
}" />
|
||||
</div>
|
||||
<span class="progress-text">
|
||||
{{ tiktokStore.currentIndex + 1 }} / {{ tiktokStore.mediaList.length }}
|
||||
|
|
@ -854,33 +834,25 @@ watch(() => autoPlayMode.value, () => {
|
|||
<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
|
||||
}"
|
||||
>
|
||||
<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
|
||||
}"
|
||||
>
|
||||
<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>
|
||||
|
|
@ -891,6 +863,41 @@ watch(() => autoPlayMode.value, () => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.debug-info {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
font-family: monospace;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
z-index: 9999;
|
||||
pointer-events: none;
|
||||
backdrop-filter: blur(4px);
|
||||
|
||||
.debug-item {
|
||||
margin: 4px 0;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.debug-label {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.debug-value {
|
||||
&.is-true {
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
&.is-false {
|
||||
color: #f44336;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tiktok-viewer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
@ -945,8 +952,9 @@ watch(() => autoPlayMode.value, () => {
|
|||
}
|
||||
|
||||
.tiktok-media {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
object-fit: contain;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
|
@ -984,23 +992,23 @@ watch(() => autoPlayMode.value, () => {
|
|||
&:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
|
||||
&.like-btn {
|
||||
&.like-active {
|
||||
background: rgba(255, 20, 147, 0.3); // 深粉色背景
|
||||
color: #ff1493; // 深粉色
|
||||
|
||||
|
||||
&:hover {
|
||||
background: rgba(255, 20, 147, 0.5);
|
||||
transform: scale(1.15); // 稍微大一点的缩放效果
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:not(.like-active):hover {
|
||||
color: #ff69b4; // 浅粉色
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.autoplay-btn {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
|
@ -1009,7 +1017,7 @@ watch(() => autoPlayMode.value, () => {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
|
||||
|
||||
.autoplay-label {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
|
|
@ -1025,22 +1033,22 @@ watch(() => autoPlayMode.value, () => {
|
|||
text-align: center;
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
|
||||
&.autoplay-active {
|
||||
background: rgba(76, 175, 80, 0.3); // 绿色背景
|
||||
color: #4caf50; // 绿色
|
||||
|
||||
|
||||
.autoplay-label {
|
||||
background: rgba(76, 175, 80, 0.9);
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
&:hover {
|
||||
background: rgba(76, 175, 80, 0.5);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:not(.autoplay-active):hover {
|
||||
color: #81c784; // 浅绿色
|
||||
}
|
||||
|
|
@ -1076,10 +1084,10 @@ watch(() => autoPlayMode.value, () => {
|
|||
background: rgba(255, 255, 255, 0.5);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
|
||||
&.nav-fix {
|
||||
background: rgba(255, 165, 0, 0.3); // 橙色背景以区分
|
||||
|
||||
|
||||
&:hover {
|
||||
background: rgba(255, 165, 0, 0.5);
|
||||
}
|
||||
|
|
@ -1161,6 +1169,7 @@ watch(() => autoPlayMode.value, () => {
|
|||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
// 动画
|
||||
.slide-up-enter-active,
|
||||
.slide-up-leave-active {
|
||||
|
|
@ -1189,11 +1198,11 @@ watch(() => autoPlayMode.value, () => {
|
|||
width: 44px;
|
||||
height: 44px;
|
||||
font-size: 18px;
|
||||
|
||||
|
||||
&.autoplay-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
|
||||
|
||||
.autoplay-label {
|
||||
font-size: 8px;
|
||||
padding: 1px 3px;
|
||||
|
|
@ -1223,4 +1232,4 @@ watch(() => autoPlayMode.value, () => {
|
|||
max-height: 50vh;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
@ -104,6 +104,13 @@ const disableMaximize = useLocalStorage(prefix+'disable_maximize', false)
|
|||
<a-form>
|
||||
<h2 style="margin-top: 0;">{{ t('ImageBrowsingSettings') }}</h2>
|
||||
<ImageSetting />
|
||||
|
||||
<h2>TikTok {{ t('view') }}</h2>
|
||||
<a-form-item :label="$t('showTiktokNavigator')">
|
||||
<a-switch v-model:checked="globalStore.showTiktokNavigator" />
|
||||
<span style="margin-left: 8px;color: #666;">{{ t('showTiktokNavigatorDesc') }}</span>
|
||||
</a-form-item>
|
||||
|
||||
<h2>{{ t('imgSearch') }}</h2>
|
||||
<a-form-item :label="$t('rebuildImageIndex')">
|
||||
<AButton @click="openRebuildImageIndexModal">{{ $t('start') }}</AButton>
|
||||
|
|
|
|||
|
|
@ -192,7 +192,8 @@ export const presistKeys = [
|
|||
'batchDownloadCompress',
|
||||
'batchDownloadPackOnly',
|
||||
'magicSwitchTiktokView',
|
||||
'showRandomImageInStartup'
|
||||
'showRandomImageInStartup',
|
||||
'showTiktokNavigator'
|
||||
]
|
||||
|
||||
function cellWidthMap(x: number): number {
|
||||
|
|
@ -345,8 +346,10 @@ export const useGlobalStore = defineStore(
|
|||
const previewBgOpacity = ref(0.6)
|
||||
const magicSwitchTiktokView = ref(false)
|
||||
const showRandomImageInStartup = ref(true)
|
||||
const showTiktokNavigator = ref(false)
|
||||
return {
|
||||
computedTheme,
|
||||
showTiktokNavigator,
|
||||
darkModeControl,
|
||||
defaultSortingMethod,
|
||||
defaultGridCellWidth,
|
||||
|
|
|
|||
Loading…
Reference in New Issue