sd-webui-infinite-image-bro.../vue/dist/assets/emptyStartup-e0cff337.js

2 lines
6.4 KiB
JavaScript

import{c as y,A as z,d as P,z as j,L as w,a1 as S,o as c,l as i,q as l,t as u,N as h,n as d,Q as v,s as f,K as g,m as B,J as F,I as $,a2 as I,a3 as H,a4 as V,T as A,U as E,V as R}from"./index-1bf3235b.js";import{B as T}from"./button-142d9500.js";var W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"};const Q=W;function q(a){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?Object(arguments[n]):{},o=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.forEach(function(r){G(a,r,e[r])})}return a}function G(a,n,e){return n in a?Object.defineProperty(a,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[n]=e,a}var C=function(n,e){var o=q({},n,e.attrs);return y(z,q({},o,{icon:Q}),null)};C.displayName="CloudDownloadOutlined";C.inheritAttrs=!1;const J=C;var U={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 X=U;function x(a){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?Object(arguments[n]):{},o=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.forEach(function(r){Y(a,r,e[r])})}return a}function Y(a,n,e){return n in a?Object.defineProperty(a,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[n]=e,a}var O=function(n,e){var o=x({},n,e.attrs);return y(z,x({},o,{icon:X}),null)};O.displayName="FileDoneOutlined";O.inheritAttrs=!1;const Z=O,K=a=>(A("data-v-7ecbd424"),a=a(),E(),a),ee={class:"container"},te={class:"header"},ne=K(()=>l("div",{"flex-placeholder":""},null,-1)),ae={class:"last-record"},se=["onClick"],le={class:"content"},oe={key:0,class:"quick-start"},ce={key:1,class:"quick-start"},re=["onClick"],ie={class:"quick-start__text line-clamp-1"},ue={class:"quick-start"},de=["onClick"],pe={class:"quick-start__text line-clamp-1"},_e={key:2,class:"quick-start"},he=["onClick"],me={class:"quick-start__text line-clamp-1"},ve=P({__name:"emptyStartup",props:{tabIdx:null,paneIdx:null},setup(a){const n=a,e=j(),o={local:w("local"),"tag-search":w("imgSearch"),"global-setting":w("globalSettings")},r=(t,_,b=!1)=>{let p;switch(t){case"tag-search-matched-image-grid":return;case"global-setting":case"tag-search":case"empty":p={type:t,name:o[t],key:Date.now()+I()};break;case"local":p={type:t,name:o[t],key:Date.now()+I(),target:t,path:_,walkMode:b}}const s=e.tabList[n.tabIdx];s.panes.splice(n.paneIdx,1,p),s.key=p.key},m=S(()=>{var t;return(t=e.lastTabListRecord)==null?void 0:t[1]});console.log(m.value);const D=S(()=>e.autoCompletedDirList.filter(({key:t})=>t==="outdir_txt2img_samples"||t==="outdir_img2img_samples"||t==="outdir_extras_samples"||t==="outdir_save"||t==="outdir_samples")),L=window.parent!==window,M=()=>window.parent.open("/infinite_image_browsing"),N=()=>{H(m.value),e.tabList=m.value.tabs.map(t=>V(t,!0)),e.tabList.forEach(t=>{t.panes.forEach(_=>{typeof _.name!="string"&&(_.name="")})})};return(t,_)=>{var p;const b=T;return c(),i("div",ee,[l("div",te,[l("h1",null,u(t.$t("welcome")),1),ne,L?(c(),i("div",{key:0,class:"last-record",onClick:M},[l("a",null,u(t.$t("openInNewWindow")),1)])):h("",!0),l("div",ae,[(p=d(m))!=null&&p.tabs.length?(c(),i("a",{key:0,onClick:v(N,["prevent"])},u(t.$t("restoreLastRecord")),9,se)):h("",!0)])]),l("div",le,[d(D).length?(c(),i("div",oe,[l("h2",null,u(t.$t("walkMode")),1),l("ul",null,[(c(!0),i(f,null,g(d(D),s=>(c(),i("li",{key:s.dir,class:"quick-start__item"},[y(b,{onClick:k=>r("local",s.dir,!0),ghost:"",type:"primary",block:""},{default:B(()=>[F(u(s.zh),1)]),_:2},1032,["onClick"])]))),128))])])):h("",!0),d(e).autoCompletedDirList.length?(c(),i("div",ce,[l("h2",null,u(t.$t("launchFromQuickMove")),1),l("ul",null,[(c(!0),i(f,null,g(d(e).autoCompletedDirList,s=>(c(),i("li",{key:s.key,class:"quick-start__item",onClick:v(k=>r("local",s.dir),["prevent"])},[l("span",ie,u(s.zh),1)],8,re))),128))])])):h("",!0),l("div",ue,[l("h2",null,u(t.$t("launch")),1),l("ul",null,[(c(!0),i(f,null,g(Object.keys(o),s=>(c(),i("li",{key:s,class:"quick-start__item",onClick:v(k=>r(s),["prevent"])},[l("span",pe,u(o[s]),1)],8,de))),128))])]),d(e).recent.length?(c(),i("div",_e,[l("h2",null,u(t.$t("recent")),1),l("ul",null,[(c(!0),i(f,null,g(d(e).recent,s=>(c(),i("li",{key:s.key,class:"quick-start__item",onClick:v(k=>r(s.target,s.path),["prevent"])},[s.target!=="local"?(c(),$(d(J),{key:0,class:"quick-start__icon"})):(c(),$(d(Z),{key:1,class:"quick-start__icon"})),l("span",me,u(s.path),1)],8,he))),128))])])):h("",!0)])])}}});const be=R(ve,[["__scopeId","data-v-7ecbd424"]]);export{be as default};