File size: 13,195 Bytes
b173115 |
1 2 |
import{Y as _e,Z as be,d as J,u as we,$ as D,g as B,a0 as ke,h as x,c as h,a1 as ye,a2 as Ce,a3 as Oe,a4 as $e,a5 as Ie,a6 as xe,a as ae,a7 as Se,P,a8 as Te,a9 as Pe,aa as Ne,ab as ze,ac as Me,ad as Ae,ae as De,af as Ee,ag as pe,ah as Le,R as Y,ai as w,aj as Re,U as Fe,ak as He,al as Z,am as G,o as m,m as S,n as _,x as T,v as c,an as je,W as Be,M as Ve,k as qe,ao as Ge,ap as oe,y as b,p as a,r as d,C as y,q as O,aq as se,z as V,A as q,ar as X,as as Ue,at as We,V as Qe,au as Xe,av as Ye,X as Ze}from"./index-7c0f3f3a.js";import{a as Je,r as Ke}from"./db-90de1b1b.js";import{D as et}from"./index-00c5caf5.js";/* empty css */var tt={success:Te,info:Pe,error:Ne,warning:ze},nt={success:Me,info:Ae,error:De,warning:Ee},at=be("success","info","warning","error"),ot=function(){return{type:P.oneOf(at),closable:{type:Boolean,default:void 0},closeText:P.any,message:P.any,description:P.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:P.any,closeIcon:P.any,onClose:Function}},st=J({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:ot(),setup:function(t,e){var l=e.slots,u=e.emit,k=e.attrs,C=e.expose,$=we("alert",t),E=$.prefixCls,N=$.direction,I=D(!1),L=D(!1),R=D(),W=function(s){s.preventDefault();var p=R.value;p.style.height="".concat(p.offsetHeight,"px"),p.style.height="".concat(p.offsetHeight,"px"),I.value=!0,u("close",s)},n=function(){var s;I.value=!1,L.value=!0,(s=t.afterClose)===null||s===void 0||s.call(t)};C({animationEnd:n});var r=D({});return function(){var f,s,p=t.banner,z=t.closeIcon,M=z===void 0?(f=l.closeIcon)===null||f===void 0?void 0:f.call(l):z,o=t.closable,g=t.type,A=t.showIcon,Q=B(l,t,"closeText"),F=B(l,t,"description"),te=B(l,t,"message"),H=B(l,t,"icon");A=p&&A===void 0?!0:A,g=p&&g===void 0?"warning":g||"info";var he=(F?nt:tt)[g]||null;Q&&(o=!0);var v=E.value,me=ke(v,(s={},x(s,"".concat(v,"-").concat(g),!0),x(s,"".concat(v,"-closing"),I.value),x(s,"".concat(v,"-with-description"),!!F),x(s,"".concat(v,"-no-icon"),!A),x(s,"".concat(v,"-banner"),!!p),x(s,"".concat(v,"-closable"),o),x(s,"".concat(v,"-rtl"),N.value==="rtl"),s)),ve=o?h("button",{type:"button",onClick:W,class:"".concat(v,"-close-icon"),tabindex:0},[Q?h("span",{class:"".concat(v,"-close-text")},[Q]):M===void 0?h(ye,null,null):M]):null,fe=H&&(Ce(H)?Oe(H,{class:"".concat(v,"-icon")}):h("span",{class:"".concat(v,"-icon")},[H]))||h(he,{class:"".concat(v,"-icon")},null),ge=$e("".concat(v,"-motion"),{appear:!1,css:!0,onAfterLeave:n,onBeforeLeave:function(j){j.style.maxHeight="".concat(j.offsetHeight,"px")},onLeave:function(j){j.style.maxHeight="0px"}});return L.value?null:h(Se,ge,{default:function(){return[Ie(h("div",ae(ae({role:"alert"},k),{},{style:[k.style,r.value],class:[k.class,me],"data-show":!I.value,ref:R}),[A?fe:null,h("div",{class:"".concat(v,"-content")},[te?h("div",{class:"".concat(v,"-message")},[te]):null,F?h("div",{class:"".concat(v,"-description")},[F]):null]),ve]),[[xe,!I.value]])]}})}}});const lt=_e(st);var it={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"file-done",theme:"outlined"};const ct=it;function le(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable}))),l.forEach(function(u){rt(i,u,e[u])})}return i}function rt(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var K=function(t,e){var l=le({},t,e.attrs);return h(pe,le({},l,{icon:ct}),null)};K.displayName="FileDoneOutlined";K.inheritAttrs=!1;const ut=K;var dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};const pt=dt;function ie(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(e).filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable}))),l.forEach(function(u){ht(i,u,e[u])})}return i}function ht(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var ee=function(t,e){var l=ie({},t,e.attrs);return h(pe,ie({},l,{icon:pt}),null)};ee.displayName="LockOutlined";ee.inheritAttrs=!1;const ce=ee;const re=async i=>{let t;if({}.TAURI_ARCH){const e=await Le({directory:!0});if(typeof e=="string")t=e;else return}else t=await new Promise(e=>{const l=D("");Y.confirm({title:w("inputTargetFolderPath"),content:()=>Re(Fe,{value:l.value,"onUpdate:value":u=>l.value=u}),async onOk(){const u=l.value;(await He([u]))[u]?e(l.value):Z.error(w("pathDoesNotExist"))}})});Y.confirm({content:w("confirmToAddToExtraPath"),async onOk(){await Je({type:i,path:t}),Z.success(w("addCompleted")),G.emit("searchIndexExpired"),G.emit("updateGlobalSetting")}})},ue=(i,t)=>{Y.confirm({content:w("confirmDelete"),closable:!0,async onOk(){await Ke({type:t,path:i}),Z.success(w("removeCompleted")),G.emit("searchIndexExpired"),G.emit("updateGlobalSetting")}})},de=J({__name:"actionContextMenu",emits:["openOnTheRight","openInNewTab"],setup(i,{emit:t}){const e=l=>{switch(l.key.toString()){case"openOnTheRight":t("openOnTheRight");break;case"openInNewTab":t("openInNewTab");break}};return(l,u)=>{const k=Be,C=Ve,$=et;return m(),S($,{trigger:["contextmenu"]},{overlay:_(()=>[h(C,{onClick:e},{default:_(()=>[h(k,{key:"openOnTheRight"},{default:_(()=>[T(c(l.$t("openOnTheRight")),1)]),_:1}),h(k,{key:"openInNewTab"},{default:_(()=>[T(c(l.$t("openInNewTab")),1)]),_:1})]),_:1})]),default:_(()=>[je(l.$slots,"default")]),_:3})}}}),U=i=>(Xe("data-v-236610db"),i=i(),Ye(),i),mt={class:"container"},vt={class:"header"},ft={key:0,style:{"margin-left":"16px","font-size":"1.5em"}},gt=U(()=>a("div",{"flex-placeholder":""},null,-1)),_t=U(()=>a("a",{href:"https://github.com/zanllp/sd-webui-infinite-image-browsing",target:"_blank",class:"last-record"},"Github",-1)),bt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/blob/main/.env.example",target:"_blank",class:"last-record"},wt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/wiki/Change-log",target:"_blank",class:"last-record"},kt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record"},yt={class:"access-mode-message"},Ct=U(()=>a("div",{"flex-placeholder":""},null,-1)),Ot={class:"access-mode-message"},$t=U(()=>a("div",{"flex-placeholder":""},null,-1)),It={class:"content"},xt={class:"feature-item"},St={class:"text line-clamp-1"},Tt=["onClick"],Pt={class:"text line-clamp-2"},Nt={key:0,class:"feature-item"},zt={class:"text line-clamp-1"},Mt=["onClick"],At={class:"text line-clamp-2"},Dt={class:"feature-item"},Et=["onClick"],Lt={class:"text line-clamp-1"},Rt={class:"text line-clamp-1"},Ft={class:"text line-clamp-1"},Ht={class:"text line-clamp-1"},jt={key:1,class:"feature-item recent"},Bt={class:"title"},Vt=["onClick"],qt={class:"text line-clamp-1"},Gt=J({__name:"emptyStartup",props:{tabIdx:{},paneIdx:{}},setup(i){const t=i,e=qe(),l=Ge(),u={local:w("local"),"tag-search":w("imgSearch"),"fuzzy-search":w("fuzzy-search"),"global-setting":w("globalSettings"),"batch-download":w("batchDownload")+" / "+w("archive")},k=(n,r,f=!1)=>{let s;switch(n){case"tag-search-matched-image-grid":case"img-sli":return;case"global-setting":case"tag-search":case"batch-download":case"fuzzy-search":case"empty":s={type:n,name:u[n],key:Date.now()+X()};break;case"local":s={type:n,name:u[n],key:Date.now()+X(),path:r,walkModePath:f?r:void 0}}return s},C=(n,r,f=!1)=>{const s=k(n,r,f);if(!s)return;const p=e.tabList[t.tabIdx];p.panes.splice(t.paneIdx,1,s),p.key=s.key},$=(n,r,f=!1)=>{const s=k(n,r,f);if(!s)return;e.tabList[t.tabIdx].panes.push(s)},E=(n,r,f=!1)=>{const s=k(n,r,f);if(!s)return;let p=e.tabList[t.tabIdx+1];p||(p={panes:[],key:"",id:X()},e.tabList[t.tabIdx+1]=p),p.panes.push(s),p.key=s.key},N=oe(()=>{var n;return(n=e.tabListHistoryRecord)==null?void 0:n[1]}),I=oe(()=>e.quickMovePaths.filter(({key:n,type:r})=>n==="outdir_txt2img_samples"||n==="outdir_img2img_samples"||n==="outdir_txt2img_grids"||n==="outdir_img2img_grids"||r==="walk")),L=window.parent!==window,R=()=>window.parent.open("/infinite_image_browsing"+(window.parent.location.href.includes("theme=dark")?"?__theme=dark":"")),W=()=>{Ue(N.value),e.tabList=We(N.value.tabs)};return(n,r)=>{var p,z,M;const f=lt,s=Qe;return m(),b("div",mt,[a("div",vt,[a("h1",null,c(n.$t("welcome")),1),(p=d(e).conf)!=null&&p.enable_access_control&&d(e).dontShowAgain?(m(),b("div",ft,[h(d(ce),{title:"Access Control mode",style:{"vertical-align":"text-bottom"}})])):y("",!0),gt,_t,a("a",bt,c(n.$t("privacyAndSecurity")),1),a("a",wt,c(n.$t("changlog")),1),a("a",kt,c(n.$t("faq")),1)]),(z=d(e).conf)!=null&&z.enable_access_control&&!d(e).dontShowAgain?(m(),S(f,{key:0,"show-icon":""},{message:_(()=>[a("div",yt,[a("div",null,c(n.$t("accessControlModeTips")),1),Ct,a("a",{onClick:r[0]||(r[0]=O(o=>d(e).dontShowAgain=!0,["prevent"]))},c(n.$t("dontShowAgain")),1)])]),icon:_(()=>[h(d(ce))]),_:1})):y("",!0),d(e).dontShowAgainNewImgOpts?y("",!0):(m(),S(f,{key:1,"show-icon":""},{message:_(()=>[a("div",Ot,[a("div",null,c(n.$t("majorUpdateCustomCellSizeTips")),1),$t,a("a",{onClick:r[1]||(r[1]=O(o=>d(e).dontShowAgainNewImgOpts=!0,["prevent"]))},c(n.$t("dontShowAgain")),1)])]),_:1})),a("div",It,[a("div",xt,[a("h2",null,c(n.$t("walkMode")),1),a("ul",null,[a("li",{onClick:r[2]||(r[2]=o=>d(re)("walk")),class:"item",style:{"text-align":""}},[a("span",St,[h(d(se)),T(" "+c(n.$t("add")),1)])]),(m(!0),b(V,null,q(I.value,o=>(m(),S(de,{key:o.key,onOpenInNewTab:g=>$("local",o.dir,!0),onOpenOnTheRight:g=>E("local",o.dir,!0)},{default:_(()=>[a("li",{class:"item rem",onClick:O(g=>C("local",o.dir,!0),["prevent"])},[a("span",Pt,c(o.zh),1),o.can_delete?(m(),S(s,{key:0,type:"link",onClick:O(g=>d(ue)(o.dir,"walk"),["stop"])},{default:_(()=>[T(c(n.$t("remove")),1)]),_:2},1032,["onClick"])):y("",!0)],8,Tt)]),_:2},1032,["onOpenInNewTab","onOpenOnTheRight"]))),128))])]),d(e).quickMovePaths.length?(m(),b("div",Nt,[a("h2",null,c(n.$t("launchFromQuickMove")),1),a("ul",null,[a("li",{onClick:r[3]||(r[3]=o=>d(re)("scanned")),class:"item",style:{"text-align":""}},[a("span",zt,[h(d(se)),T(" "+c(n.$t("add")),1)])]),(m(!0),b(V,null,q(d(e).quickMovePaths.filter(o=>o.type!=="walk"),o=>(m(),S(de,{key:o.key,onOpenInNewTab:g=>$("local",o.dir),onOpenOnTheRight:g=>E("local",o.dir)},{default:_(()=>[a("li",{class:"item rem",onClick:O(g=>C("local",o.dir),["prevent"])},[a("span",At,c(o.zh),1),o.can_delete&&o.type=="scanned"?(m(),S(s,{key:0,type:"link",onClick:O(g=>d(ue)(o.dir,"scanned"),["stop"])},{default:_(()=>[T(c(n.$t("remove")),1)]),_:2},1032,["onClick"])):y("",!0)],8,Mt)]),_:2},1032,["onOpenInNewTab","onOpenOnTheRight"]))),128))])])):y("",!0),a("div",Dt,[a("h2",null,c(n.$t("launch")),1),a("ul",null,[(m(!0),b(V,null,q(Object.keys(u),o=>(m(),b("li",{key:o,class:"item",onClick:O(g=>C(o),["prevent"])},[a("span",Lt,c(u[o]),1)],8,Et))),128)),a("li",{class:"item",onClick:r[4]||(r[4]=o=>d(l).opened=!0)},[a("span",Rt,c(n.$t("imgCompare")),1)]),L?(m(),b("li",{key:0,class:"item",onClick:R},[a("span",Ft,c(n.$t("openInNewWindow")),1)])):y("",!0),(M=N.value)!=null&&M.tabs.length?(m(),b("li",{key:1,class:"item",onClick:W},[a("span",Ht,c(n.$t("restoreLastRecord")),1)])):y("",!0)])]),d(e).recent.length?(m(),b("div",jt,[a("div",Bt,[a("h2",null,c(n.$t("recent")),1),h(s,{onClick:r[5]||(r[5]=o=>d(e).recent=[]),type:"link"},{default:_(()=>[T(c(n.$t("clear")),1)]),_:1})]),a("ul",null,[(m(!0),b(V,null,q(d(e).recent,o=>(m(),b("li",{key:o.key,class:"item",onClick:O(g=>C("local",o.path),["prevent"])},[h(d(ut),{class:"icon"}),a("span",qt,c(o.path),1)],8,Vt))),128))])])):y("",!0)])])}}});const Yt=Ze(Gt,[["__scopeId","data-v-236610db"]]);export{Yt as default};
|