Switch the main document to English and add links to more documents

pull/91/head
zanllp 2023-05-06 02:47:58 +08:00
parent 3a12ae73bb
commit 071140112d
24 changed files with 156 additions and 179 deletions

View File

@ -1,96 +0,0 @@
# sd-webui-infinite-image-browsing
## Key Features
### Excellent Performance
- Once caching is generated, images can be displayed in just a few milliseconds.
- Images are displayed by default using thumbnails with a default size of 256 pixels. You can adjust the size of the thumbnails in the global settings page.
- Extensive optimizations have been made for image preview, but you need to ensure that the file paths are different for different files. It is recommended to use a format with the created time as the file name.
### 'Walk' Mode
- Browse images automatically by loading the next folder `(similar to os.walk)`, allowing you to browse all images without paging.
- Tested to work properly with over 27,000 files.
### Image Search & Favorite
- Supports image search using Prompt, Model, Lora, etc.
- Tags will be listed based on their frequency of use.
- Supports tag autocomplete, translation, and customization.
- Image favorite can be achieved by toggling custom tags for images in the right-click menu.
### View Image & `Send To`
- Supports viewing image generation information.
- Supports sending images to other tabs.
- Supports full-screen preview.
- Supports moving images in full-screen preview mode.
### Standalone Operation
- Supports standalone operation without sd-webui.
- Almost all functions can be used normally.
- [Click here for details](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/47).
### Preview based on File Tree Structure & File operations
- Supports preview based on the file tree structure.
- Supports basic file operations as well as multi-select deletion/moving.
- Press and hold Ctrl, Shift, or Cmd to select multiple items.
- Supports sending files directly to other folders via context menu.
It is strongly recommended to use "Open in new tab" (in the upper right corner of the plugin startup page), which is much more comfortable than being embedded in Gradio. However, the "send image to other tab" function cannot be used in this mode.
## Preview
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/25872019/232167682-67f83b00-4391-4394-a7f6-6e4c9d11f252.png">
## Image Search
During the first use, you need to click and wait for the index generation. For my case with 20,000 images, it took about 15 seconds (with an AMD 5600X CPU and PCIe SSD). For subsequent uses, it will check whether there are changes in the folder, and if so, it needs to regenerate the index. Usually, this process is very fast.
Image search supports translation, and you need to place a "tags-translate.csv" file in the plugin folder. You can find this file in the issue . Feel free to share files for other languages to facilitate everyone's use.
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/234639132-0240dad0-86aa-499b-8e00-20bf2d7f06c3.png">
<img width="620" alt="image" src="https://user-images.githubusercontent.com/25872019/234639759-2d270fe5-b24b-4542-b75a-a025ba78ec89.png">
## Full Screen Preview
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/232167416-32a8b19d-b766-4f98-88f6-a1d48eaebec0.png">
In full-screen preview mode, you can also view image information and perform operations on the context menu. It supports dragging, resizing and expanding/collapsing .
https://user-images.githubusercontent.com/25872019/235327735-bfb50ea7-7682-4e50-b303-38159456e527.mp4
### Right-click menu
<img width="536" alt="image" src="https://user-images.githubusercontent.com/25872019/232162244-e728d510-b6c6-45e6-afb3-872bd67db05b.png">
### Walk mode
https://user-images.githubusercontent.com/25872019/230768207-daab786b-d4ab-489f-ba6a-e9656bd530b8.mp4
### Dark mode
<img width="768" alt="image" src="https://user-images.githubusercontent.com/25872019/230064879-c95866ac-999d-4d4b-87ea-3e38c8479415.png">
## FAQ
### How to open the right-click menu on mobile devices?
You need to enable "Support long press to open right-click menu" in the global settings first, and then use long press to perform the operation instead of right-clicking to open the right-click menu.
<img width="512" alt="image" src="https://user-images.githubusercontent.com/25872019/232276303-c175e78a-d127-4afd-9281-85080bf75c5a.jpg">
## How can I control the sorting/display mode/copy the current page path/move to a specific folder?
You can choose the sorting method in the upper-right corner of the TabPane
More
<img width="445" alt="image" src="https://user-images.githubusercontent.com/25872019/233480083-7c121ce0-4c79-4786-befb-d388398e565f.png">
## How to reduce mental burden when opening a large number of sub-folders within a large folder for viewing?
Recommend using the right-click menu of the folder, click 'Open in new tab' or 'Open on the right'.
<img width="878" alt="image" src="https://user-images.githubusercontent.com/25872019/233801373-8d21f237-b6e4-4b0a-81d0-fee2b8e370f4.png">

85
README-zh.md Normal file
View File

@ -0,0 +1,85 @@
# Stable-Diffusion-WebUI无边图像浏览
> 百度云部分已独立,如果你有需要请[点此单独安装](https://github.com/zanllp/sd-webui-baidu-netdisk)
## 主要特性
### 极好的性能
- 生成缓存后,图像可以在几毫秒内显示。
- 默认使用缩略图显示图像默认256px你可以在拓展的全局设置页调整缩略图的大小
- 拓展针对图像预览做了大量的优化,但是你需要确保不同的文件之间的文件路径的不同,推荐以生成时间作为文件名的格式化[参考FAQ](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90)
### “walk”模式
- 自动加载下一个文件夹 `(类似于 os.walk)`,可让您无需分页浏览所有图像。
- 已测试可正常处理超过 27,000 个文件。
### 图像搜索 & 收藏
- 支持使用 Prompt、Model、Lora 等进行图像搜索。
- 标签将根据使用频率排序。
- 支持标签自动完成、翻译和自定义。
- 可通过在右键菜单切换自定义标签来实现图像收藏。
### 图像预览 & `发送到`
- 支持查看图像生成信息。
- 支持将图像发送到其他选项卡。
- 支持全屏预览。
- 支持在全屏预览模式下移动图像。
### 独立运行
- 支持无需 sd-webui 单独运行。
- 几乎所有功能都可以正常使用。
- [点击此处获取详情](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/47)。
### 基于文件树结构的预览和文件操作
- 支持基于文件树结构的预览。
- 支持基本文件操作以及多选删除/移动。
- 按住 Ctrl、Shift 或 Cmd 键可选择多个项目。
- 支持通过右键菜单直接发送文件到其他文件夹。
强烈推荐使用在`在新页面打开`在插件启动页的右上角比塞在gradio里舒服太多不过这时`发送图像到其他tab`功能是用不了的。
[视频演示可以在Bilibili上观看](https://space.bilibili.com/27227392/channel/series)
## 预览
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/25872019/230064374-47ba209e-562b-47b8-a2ce-d867e3afe204.png">
## 图像搜索
在第一次使用时你需要点击等待索引的生成我2万张图像的情况下大概需要15秒配置是amd 5600x和pcie ssd。后续使用他会检查文件夹是否发生变化如果发生变化则需要重新生成索引,通常这个过程极快。
图像搜索支持翻译你需要在插件文件夹下放置一个tags-translate.csv的文件你可以在issue中找到这个文件。欢迎其他语言的也分享出来方便大家使用。
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/234639132-0240dad0-86aa-499b-8e00-20bf2d7f06c3.png">
<img width="620" alt="image" src="https://user-images.githubusercontent.com/25872019/234639759-2d270fe5-b24b-4542-b75a-a025ba78ec89.png">
## 全屏预览
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/232167416-32a8b19d-b766-4f98-88f6-a1d48eaebec0.png">
在全屏预览下同样可以查看图片信息和进行上下文菜单上的的操作,支持拖拽/调整/展开收起
https://user-images.githubusercontent.com/25872019/235327735-bfb50ea7-7682-4e50-b303-38159456e527.mp4
### 右键菜单
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/230896820-26344b09-2297-4a2f-a6a7-4c2f0edb8a2c.png">
### Walk模式
https://user-images.githubusercontent.com/25872019/230768207-daab786b-d4ab-489f-ba6a-e9656bd530b8.mp4
### 深色模式
<img width="768" alt="image" src="https://user-images.githubusercontent.com/25872019/230064879-c95866ac-999d-4d4b-87ea-3e38c8479415.png">

107
README.md
View File

@ -1,76 +1,68 @@
# [English](./README-en.md)
## [中文文档](./README-zh.md)
# Stable Diffusion webui Infinite Image Browsing
## Key Features
# Stable-Diffusion-WebUI无边图像浏览
### Excellent Performance
- Once caching is generated, images can be displayed in just a few milliseconds.
- Images are displayed by default using thumbnails with a default size of 256 pixels. You can adjust the size of the thumbnails in the global settings page.
- Extensive optimizations have been made for image preview. However, it is important to make sure that each file has a unique file path. It is recommended to use a format with the created time as the file name.[See FAQ](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90)
> 百度云部分已独立,如果你有需要请[点此单独安装](https://github.com/zanllp/sd-webui-baidu-netdisk)
### 'Walk' Mode
- Browse images automatically by loading the next folder `(similar to os.walk)`, allowing you to browse all images without paging.
- Tested to work properly with over 27,000 files.
## 主要特性
### Image Search & Favorite
- Supports image search using Prompt, Model, Lora, etc.
- Tags will be listed based on their frequency of use.
- Supports tag autocomplete, translation, and customization.
- Image favorite can be achieved by toggling custom tags for images in the right-click menu.
### 极好的性能
- 生成缓存后,图像可以在几毫秒内显示。
- 默认使用缩略图显示图像默认256px你可以在拓展的全局设置页调整缩略图的大小
- 拓展针对图像预览做了大量的优化,但是你需要确保不同的文件之间的文件路径的不同,推荐以生成时间作为文件名的格式化
### View Image & `Send To`
- Supports viewing image generation information.
- Supports sending images to other tabs.
- Supports full-screen preview.
- Supports moving images in full-screen preview mode.
### “walk”模式
- 自动加载下一个文件夹 `(类似于 os.walk)`,可让您无需分页浏览所有图像。
- 已测试可正常处理超过 27,000 个文件。
### Standalone Operation
- Supports standalone operation without sd-webui.
- Almost all functions can be used normally.
- [Click here for details](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/47).
### 图像搜索 & 收藏
- 支持使用 Prompt、Model、Lora 等进行图像搜索。
- 标签将根据使用频率排序。
- 支持标签自动完成、翻译和自定义。
- 可通过在右键菜单切换自定义标签来实现图像收藏。
### 图像预览 & `发送到`
- 支持查看图像生成信息。
- 支持将图像发送到其他选项卡。
- 支持全屏预览。
- 支持在全屏预览模式下移动图像。
### 独立运行
- 支持无需 sd-webui 单独运行。
- 几乎所有功能都可以正常使用。
- [点击此处获取详情](https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/47)。
### 基于文件树结构的预览和文件操作
- 支持基于文件树结构的预览。
- 支持基本文件操作以及多选删除/移动。
- 按住 Ctrl、Shift 或 Cmd 键可选择多个项目。
- 支持通过右键菜单直接发送文件到其他文件夹。
### Preview based on File Tree Structure & File operations
- Supports preview based on the file tree structure.
- Supports basic file operations as well as multi-select deletion/moving.
- Press and hold Ctrl, Shift, or Cmd to select multiple items.
- Supports sending files directly to other folders via context menu.
强烈推荐使用在`在新页面打开`在插件启动页的右上角比塞在gradio里舒服太多不过这时`发送图像到其他tab`功能是用不了的。
It is strongly recommended to use "Open in new tab" (in the upper right corner of the plugin startup page), which is much more comfortable than being embedded in Gradio. However, the "send image to other tab" function cannot be used in this mode.
[视频演示可以在Bilibili上观看](https://space.bilibili.com/27227392/channel/series)
## Preview
## 预览
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/25872019/232167682-67f83b00-4391-4394-a7f6-6e4c9d11f252.png">
<img width="1920" alt="image" src="https://user-images.githubusercontent.com/25872019/230064374-47ba209e-562b-47b8-a2ce-d867e3afe204.png">
## Image Search
## 图像搜索
During the first use, you need to click and wait for the index generation. For my case with 20,000 images, it took about 15 seconds (with an AMD 5600X CPU and PCIe SSD). For subsequent uses, it will check whether there are changes in the folder, and if so, it needs to regenerate the index. Usually, this process is very fast.
在第一次使用时你需要点击等待索引的生成我2万张图像的情况下大概需要15秒配置是amd 5600x和pcie ssd。后续使用他会检查文件夹是否发生变化如果发生变化则需要重新生成索引,通常这个过程极快。
图像搜索支持翻译你需要在插件文件夹下放置一个tags-translate.csv的文件你可以在issue中找到这个文件。欢迎其他语言的也分享出来方便大家使用。
Image search supports translation, and you need to place a "tags-translate.csv" file in the plugin folder. You can find this file in the issue . Feel free to share files for other languages to facilitate everyone's use.
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/234639132-0240dad0-86aa-499b-8e00-20bf2d7f06c3.png">
<img width="620" alt="image" src="https://user-images.githubusercontent.com/25872019/234639759-2d270fe5-b24b-4542-b75a-a025ba78ec89.png">
## Full Screen Preview
## 全屏预览
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/232167416-32a8b19d-b766-4f98-88f6-a1d48eaebec0.png">
在全屏预览下同样可以查看图片信息和进行上下文菜单上的的操作,支持拖拽/调整/展开收起
In full-screen preview mode, you can also view image information and perform operations on the context menu. It supports dragging, resizing and expanding/collapsing .
https://user-images.githubusercontent.com/25872019/235327735-bfb50ea7-7682-4e50-b303-38159456e527.mp4
### Right-click menu
<img width="536" alt="image" src="https://user-images.githubusercontent.com/25872019/232162244-e728d510-b6c6-45e6-afb3-872bd67db05b.png">
### 右键菜单
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/230896820-26344b09-2297-4a2f-a6a7-4c2f0edb8a2c.png">
### Walk模式
### Walk mode
https://user-images.githubusercontent.com/25872019/230768207-daab786b-d4ab-489f-ba6a-e9656bd530b8.mp4
@ -78,27 +70,16 @@ https://user-images.githubusercontent.com/25872019/230768207-daab786b-d4ab-489f-
### 深色模式
### Dark mode
<img width="768" alt="image" src="https://user-images.githubusercontent.com/25872019/230064879-c95866ac-999d-4d4b-87ea-3e38c8479415.png">
## FAQ
### 在移动端如何打开右键菜单?
你必须先在全局设置中把“支持使用长按打开右键菜单”打开,然后使用长按进行操作,即可代替右键打开右键菜单
<img width="512" alt="image" src="https://user-images.githubusercontent.com/25872019/232274767-cc0ec850-343c-416c-aa80-2c85c76a05d8.jpg">
## How to reduce mental burden when opening a large number of sub-folders within a large folder for viewing?
### 如何控制排序/显示模式/复制当前页面路径/移动至指定文件夹?
您可以在 TabPane 的右上角点击更多。
Recommend using the right-click menu of the folder, click 'Open in new tab' or 'Open on the right'.
### 需要在一个大文件夹内打开大量的小文件夹进行查看时如何降低心理负担?
推荐使用文件夹的右键菜单,点击在新标签页打开或者在右边打开
<img width="1024" alt="image" src="https://user-images.githubusercontent.com/25872019/233800975-93258edf-5325-436a-b9c8-3574de2edfcb.png">
<img width="878" alt="image" src="https://user-images.githubusercontent.com/25872019/233801373-8d21f237-b6e4-4b0a-81d0-fee2b8e370f4.png">

View File

@ -8,12 +8,14 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-3dcbb3d9.js"></script>
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-7887b034.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-19e73083.css">
</head>
<body>
<div id="zanllp_dev_gradio_fe"></div>
<div id="zanllp_dev_gradio_fe">
It seems to have failed to load, click on <a href="https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90" target="_blank" >FAQ</a> for help</div>
</div>
</body>
</html>

View File

@ -1 +1 @@
import{d as E,r as S,aW as L,x as H,o as d,l as T,c as a,m as r,n as e,p as V,q as z,t as F,A as Q,y as A,I as k,H as R,aL as j,K,O as W}from"./index-3dcbb3d9.js";import{u as J,b as X,f as Y,c as Z,d as ee,e as se,h as le,j as te,k as ie,t as ae,L as ne,R as oe,l as re,S as ce}from"./fullScreenContextMenu-11ba6b8e.js";import{g as de,M as ue}from"./db-f68351ce.js";import"./index-19c62adc.js";import"./_baseIteratee-3be0999b.js";import"./button-273edceb.js";const me={class:"hint"},pe={key:1,class:"preview-switch"},ve=E({__name:"MatchedImageGrid",props:{tabIdx:null,paneIdx:null,selectedTagIds:null,id:null},setup($){const u=$,l=S(),g=L();H(()=>u.selectedTagIds,async()=>{var s;const{res:i}=g.pushAction(()=>de(u.selectedTagIds));l.value=await i,(s=m.value)==null||s.scrollToItem(0)},{immediate:!0});const m=S(),I={tabIdx:-1,target:"local",paneIdx:-1,walkMode:!1},{stackViewEl:B,multiSelectedIdxs:p,stack:G}=J().toRefs(),{itemSize:w,gridItems:N}=X(I),{showMenuIdx:v}=Y();Z();const{showGenInfo:c,imageGenInfo:x,q:O,onContextMenuClick:P,onFileItemClick:U}=ee(I,{openNext:j}),{previewIdx:n,previewing:C,onPreviewVisibleChange:q,previewImgMove:_,canPreview:y}=se(u,{scroller:m,files:l}),b=async(i,s,o)=>{G.value=[{curr:"",files:l.value}];const f=p.value.includes(o)?p.value:[o];await P(i,s,o),i.key==="deleteFiles"&&(l.value=l.value.filter((h,t)=>!f.includes(t)))};return(i,s)=>{const o=K,f=ue,h=ce;return d(),T("div",{class:"container",ref_key:"stackViewEl",ref:B},[a(h,{size:"large",spinning:!e(g).isIdle},{default:r(()=>[a(f,{visible:e(c),"onUpdate:visible":s[1]||(s[1]=t=>V(c)?c.value=t:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=t=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[a(o,{active:"",loading:!e(O).isIdle},{default:r(()=>[z("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=t=>e(le)(e(x),"copied"))},[z("div",me,F(i.$t("doubleClickToCopy")),1),Q(" "+F(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),l.value?(d(),A(e(te),{key:0,ref_key:"scroller",ref:m,class:"file-list",items:l.value,"item-size":e(w).first,"key-field":"fullpath","item-secondary-size":e(w).second,gridItems:e(N)},{default:r(({item:t,index:M})=>[a(ie,{idx:M,file:t,"show-menu-idx":e(v),"onUpdate:showMenuIdx":s[3]||(s[3]=D=>V(v)?v.value=D:null),onFileItemClick:e(U),"full-screen-preview-image-url":l.value[e(n)]?e(ae)(l.value[e(n)]):"",selected:e(p).includes(M),onContextMenuClick:b,onPreviewVisibleChange:e(q)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","selected","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):k("",!0),e(C)?(d(),T("div",pe,[a(e(ne),{onClick:s[4]||(s[4]=t=>e(_)("prev")),class:R({disable:!e(y)("prev")})},null,8,["class"]),a(e(oe),{onClick:s[5]||(s[5]=t=>e(_)("next")),class:R({disable:!e(y)("next")})},null,8,["class"])])):k("",!0)]),_:1},8,["spinning"]),e(C)&&l.value&&l.value[e(n)]?(d(),A(re,{key:0,file:l.value[e(n)],idx:e(n),onContextMenuClick:b},null,8,["file","idx"])):k("",!0)],512)}}});const Ce=W(ve,[["__scopeId","data-v-e9904601"]]);export{Ce as default};
import{d as E,r as S,aW as L,x as H,o as d,l as T,c as a,m as r,n as e,p as V,q as z,t as F,A as Q,y as A,I as k,H as R,aL as j,K,O as W}from"./index-7887b034.js";import{u as J,b as X,f as Y,c as Z,d as ee,e as se,h as le,j as te,k as ie,t as ae,L as ne,R as oe,l as re,S as ce}from"./fullScreenContextMenu-35ffc4fc.js";import{g as de,M as ue}from"./db-c0b6bae1.js";import"./index-b0d14746.js";import"./_baseIteratee-1af25965.js";import"./button-c19c2fda.js";const me={class:"hint"},pe={key:1,class:"preview-switch"},ve=E({__name:"MatchedImageGrid",props:{tabIdx:null,paneIdx:null,selectedTagIds:null,id:null},setup($){const u=$,l=S(),g=L();H(()=>u.selectedTagIds,async()=>{var s;const{res:i}=g.pushAction(()=>de(u.selectedTagIds));l.value=await i,(s=m.value)==null||s.scrollToItem(0)},{immediate:!0});const m=S(),I={tabIdx:-1,target:"local",paneIdx:-1,walkMode:!1},{stackViewEl:B,multiSelectedIdxs:p,stack:G}=J().toRefs(),{itemSize:w,gridItems:N}=X(I),{showMenuIdx:v}=Y();Z();const{showGenInfo:c,imageGenInfo:x,q:O,onContextMenuClick:P,onFileItemClick:U}=ee(I,{openNext:j}),{previewIdx:n,previewing:C,onPreviewVisibleChange:q,previewImgMove:_,canPreview:y}=se(u,{scroller:m,files:l}),b=async(i,s,o)=>{G.value=[{curr:"",files:l.value}];const f=p.value.includes(o)?p.value:[o];await P(i,s,o),i.key==="deleteFiles"&&(l.value=l.value.filter((h,t)=>!f.includes(t)))};return(i,s)=>{const o=K,f=ue,h=ce;return d(),T("div",{class:"container",ref_key:"stackViewEl",ref:B},[a(h,{size:"large",spinning:!e(g).isIdle},{default:r(()=>[a(f,{visible:e(c),"onUpdate:visible":s[1]||(s[1]=t=>V(c)?c.value=t:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=t=>c.value=!1)},{cancelText:r(()=>[]),default:r(()=>[a(o,{active:"",loading:!e(O).isIdle},{default:r(()=>[z("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=t=>e(le)(e(x),"copied"))},[z("div",me,F(i.$t("doubleClickToCopy")),1),Q(" "+F(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),l.value?(d(),A(e(te),{key:0,ref_key:"scroller",ref:m,class:"file-list",items:l.value,"item-size":e(w).first,"key-field":"fullpath","item-secondary-size":e(w).second,gridItems:e(N)},{default:r(({item:t,index:M})=>[a(ie,{idx:M,file:t,"show-menu-idx":e(v),"onUpdate:showMenuIdx":s[3]||(s[3]=D=>V(v)?v.value=D:null),onFileItemClick:e(U),"full-screen-preview-image-url":l.value[e(n)]?e(ae)(l.value[e(n)]):"",selected:e(p).includes(M),onContextMenuClick:b,onPreviewVisibleChange:e(q)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","selected","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):k("",!0),e(C)?(d(),T("div",pe,[a(e(ne),{onClick:s[4]||(s[4]=t=>e(_)("prev")),class:R({disable:!e(y)("prev")})},null,8,["class"]),a(e(oe),{onClick:s[5]||(s[5]=t=>e(_)("next")),class:R({disable:!e(y)("next")})},null,8,["class"])])):k("",!0)]),_:1},8,["spinning"]),e(C)&&l.value&&l.value[e(n)]?(d(),A(re,{key:0,file:l.value[e(n)],idx:e(n),onContextMenuClick:b},null,8,["file","idx"])):k("",!0)],512)}}});const Ce=W(ve,[["__scopeId","data-v-e9904601"]]);export{Ce as default};

View File

@ -1 +1 @@
import{ao as W,an as J,c1 as K,bQ as X,d as Y,v as Z,aW as ee,T as M,r as $,U as ae,ab as te,o as c,l as g,I as b,s as B,q as S,c as C,n as d,S as se,y as T,m as A,A as I,t as _,B as z,H as ne,c5 as oe,z as D,b4 as re,c6 as le,bm as E,R as N,O as ie}from"./index-3dcbb3d9.js";import{I as ue,_ as ce}from"./index-3e8fcf29.js";import"./index-448a0b9d.js";import{c as F,u as de,e as pe,M as me,r as ge}from"./db-f68351ce.js";import{b as ve}from"./_baseIteratee-3be0999b.js";import{B as U}from"./button-273edceb.js";function fe(s,n,t,l){for(var u=-1,a=s==null?0:s.length;++u<a;){var o=s[u];n(l,o,t(o),s)}return l}function _e(s){return function(n,t,l){for(var u=-1,a=Object(n),o=l(n),v=o.length;v--;){var k=o[s?v:++u];if(t(a[k],k,a)===!1)break}return n}}var ye=_e();const he=ye;function be(s,n){return s&&he(s,n,W)}function ke(s,n){return function(t,l){if(t==null)return t;if(!J(t))return s(t,l);for(var u=t.length,a=n?u:-1,o=Object(t);(n?a--:++a<u)&&l(o[a],a,o)!==!1;);return t}}var Ce=ke(be);const Ie=Ce;function we(s,n,t,l){return Ie(s,function(u,a,o){n(l,u,t(u),o)}),l}function xe(s,n){return function(t,l){var u=K(t)?fe:we,a=n?n():{};return u(t,s,ve(l),a)}}var $e=Object.prototype,Be=$e.hasOwnProperty,Se=xe(function(s,n,t){Be.call(s,t)?s[t].push(n):X(s,t,[n])});const Te=Se,Ae={class:"container"},Oe={class:"search-bar"},Me={key:0,class:"generate-idx-hint"},Ne={class:"list-container"},Pe={class:"cat-name"},ze=["onClick"],De=["onClickCapture"],Ee=Y({__name:"TagSearch",props:{tabIdx:null,paneIdx:null},setup(s){const n=s,t=Z(),l=ee(),u=M(()=>!l.isIdle),a=$(),o=$(new Set),v=M(()=>a.value?a.value.tags.slice().sort((e,r)=>r.count-e.count):[]),k=["custom","Model","lora","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((e,r,m)=>(e[r]=m,e),{}),V=M(()=>Object.entries(Te(v.value,e=>e.type)).sort((e,r)=>k[e[0]]-k[r[0]])),q=ae();te(async()=>{a.value=await F(),a.value.img_count&&a.value.expired&&P()});const P=async()=>{l.pushAction(async()=>{await de(),a.value=await F()})},G=()=>{t.openTagSearchMatchedImageGridInRight(n.tabIdx,q,Array.from(o.value))},O=(e,r=!1)=>(r?`[${e.type}] `:"")+(e.display_name?`${e.display_name} : ${e.name}`:e.name),w=$(!1),y=$(""),R=async()=>{var r,m,f;if(!y.value){w.value=!1;return}const e=await l.pushAction(()=>pe({tag_name:y.value})).res;e.type!=="custom"&&E.error(N("existInOtherType")),(r=a.value)!=null&&r.tags.find(h=>h.id===e.id)?E.error(N("alreadyExists")):((m=a.value)==null||m.tags.push(e),(f=t.conf)==null||f.all_custom_tags.push(e)),y.value="",w.value=!1},j=e=>{me.confirm({title:N("confirmDelete"),async onOk(){var m,f,h,x;await ge({tag_id:e});const r=((m=a.value)==null?void 0:m.tags.findIndex(i=>i.id===e))??-1;(f=a.value)==null||f.tags.splice(r,1),(x=t.conf)==null||x.all_custom_tags.splice((h=t.conf)==null?void 0:h.all_custom_tags.findIndex(i=>i.id===e),1)}})};return(e,r)=>{const m=U,f=ue,h=U,x=ce;return c(),g("div",Ae,[b("",!0),a.value?(c(),g(B,{key:1},[S("div",null,[S("div",Oe,[C(d(se),{conv:{value:i=>i.id,text:O,optionText:i=>O(i,!0)},mode:"multiple",style:{width:"100%"},options:d(v),value:Array.from(o.value),disabled:!d(v).length,placeholder:"Select tags to match images","onUpdate:value":r[0]||(r[0]=i=>o.value=new Set(i))},null,8,["conv","options","value","disabled"]),a.value.expired||!a.value.img_count?(c(),T(m,{key:0,onClick:P,loading:!d(l).isIdle,type:"primary"},{default:A(()=>[I(_(a.value.img_count===0?e.$t("generateIndexHint"):e.$t("UpdateIndex")),1)]),_:1},8,["loading"])):(c(),T(m,{key:1,type:"primary",onClick:G,loading:!d(l).isIdle,disabled:!o.value.size},{default:A(()=>[I(_(e.$t("search")),1)]),_:1},8,["loading","disabled"]))])]),d(v).filter(i=>i.type!=="custom").length?b("",!0):(c(),g("p",Me,_(e.$t("needGenerateIdx")),1)),S("div",Ne,[(c(!0),g(B,null,z(d(V),([i,H])=>(c(),g("ul",{class:"tag-list",key:i},[S("h3",Pe,_(e.$t(i)),1),(c(!0),g(B,null,z(H,(p,L)=>(c(),g("li",{key:p.id,class:ne(["tag",{selected:o.value.has(p.id)}]),onClick:Q=>o.value.has(p.id)?o.value.delete(p.id):o.value.add(p.id)},[o.value.has(p.id)?(c(),T(d(oe),{key:0})):b("",!0),I(" "+_(O(p))+" ",1),i==="custom"&&L!==0?(c(),g("span",{key:1,class:"remove",onClickCapture:D(Q=>j(p.id),["stop"])},[C(d(re))],40,De)):b("",!0)],10,ze))),128)),i==="custom"?(c(),g("li",{key:0,class:"tag",onClick:r[2]||(r[2]=p=>w.value=!0)},[w.value?(c(),T(x,{key:0,compact:""},{default:A(()=>[C(f,{value:y.value,"onUpdate:value":r[1]||(r[1]=p=>y.value=p),style:{width:"128px"},loading:d(u),"allow-clear":"",size:"small"},null,8,["value","loading"]),C(h,{size:"small",type:"primary",onClickCapture:D(R,["stop"]),loading:d(u)},{default:A(()=>[I(_(y.value?e.$t("submit"):e.$t("cancel")),1)]),_:1},8,["onClickCapture","loading"])]),_:1})):(c(),g(B,{key:1},[C(d(le)),I(" "+_(e.$t("add")),1)],64))])):b("",!0)]))),128))])],64)):b("",!0)])}}});const je=ie(Ee,[["__scopeId","data-v-c4b1e490"]]);export{je as default};
import{ao as W,an as J,c1 as K,bQ as X,d as Y,v as Z,aW as ee,T as M,r as $,U as ae,ab as te,o as c,l as g,I as b,s as B,q as S,c as C,n as d,S as se,y as T,m as A,A as I,t as _,B as z,H as ne,c5 as oe,z as D,b4 as re,c6 as le,bm as E,R as N,O as ie}from"./index-7887b034.js";import{I as ue,_ as ce}from"./index-371e4d03.js";import"./index-67f55205.js";import{c as F,u as de,e as pe,M as me,r as ge}from"./db-c0b6bae1.js";import{b as ve}from"./_baseIteratee-1af25965.js";import{B as U}from"./button-c19c2fda.js";function fe(s,n,t,l){for(var u=-1,a=s==null?0:s.length;++u<a;){var o=s[u];n(l,o,t(o),s)}return l}function _e(s){return function(n,t,l){for(var u=-1,a=Object(n),o=l(n),v=o.length;v--;){var k=o[s?v:++u];if(t(a[k],k,a)===!1)break}return n}}var ye=_e();const he=ye;function be(s,n){return s&&he(s,n,W)}function ke(s,n){return function(t,l){if(t==null)return t;if(!J(t))return s(t,l);for(var u=t.length,a=n?u:-1,o=Object(t);(n?a--:++a<u)&&l(o[a],a,o)!==!1;);return t}}var Ce=ke(be);const Ie=Ce;function we(s,n,t,l){return Ie(s,function(u,a,o){n(l,u,t(u),o)}),l}function xe(s,n){return function(t,l){var u=K(t)?fe:we,a=n?n():{};return u(t,s,ve(l),a)}}var $e=Object.prototype,Be=$e.hasOwnProperty,Se=xe(function(s,n,t){Be.call(s,t)?s[t].push(n):X(s,t,[n])});const Te=Se,Ae={class:"container"},Oe={class:"search-bar"},Me={key:0,class:"generate-idx-hint"},Ne={class:"list-container"},Pe={class:"cat-name"},ze=["onClick"],De=["onClickCapture"],Ee=Y({__name:"TagSearch",props:{tabIdx:null,paneIdx:null},setup(s){const n=s,t=Z(),l=ee(),u=M(()=>!l.isIdle),a=$(),o=$(new Set),v=M(()=>a.value?a.value.tags.slice().sort((e,r)=>r.count-e.count):[]),k=["custom","Model","lora","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((e,r,m)=>(e[r]=m,e),{}),V=M(()=>Object.entries(Te(v.value,e=>e.type)).sort((e,r)=>k[e[0]]-k[r[0]])),q=ae();te(async()=>{a.value=await F(),a.value.img_count&&a.value.expired&&P()});const P=async()=>{l.pushAction(async()=>{await de(),a.value=await F()})},G=()=>{t.openTagSearchMatchedImageGridInRight(n.tabIdx,q,Array.from(o.value))},O=(e,r=!1)=>(r?`[${e.type}] `:"")+(e.display_name?`${e.display_name} : ${e.name}`:e.name),w=$(!1),y=$(""),R=async()=>{var r,m,f;if(!y.value){w.value=!1;return}const e=await l.pushAction(()=>pe({tag_name:y.value})).res;e.type!=="custom"&&E.error(N("existInOtherType")),(r=a.value)!=null&&r.tags.find(h=>h.id===e.id)?E.error(N("alreadyExists")):((m=a.value)==null||m.tags.push(e),(f=t.conf)==null||f.all_custom_tags.push(e)),y.value="",w.value=!1},j=e=>{me.confirm({title:N("confirmDelete"),async onOk(){var m,f,h,x;await ge({tag_id:e});const r=((m=a.value)==null?void 0:m.tags.findIndex(i=>i.id===e))??-1;(f=a.value)==null||f.tags.splice(r,1),(x=t.conf)==null||x.all_custom_tags.splice((h=t.conf)==null?void 0:h.all_custom_tags.findIndex(i=>i.id===e),1)}})};return(e,r)=>{const m=U,f=ue,h=U,x=ce;return c(),g("div",Ae,[b("",!0),a.value?(c(),g(B,{key:1},[S("div",null,[S("div",Oe,[C(d(se),{conv:{value:i=>i.id,text:O,optionText:i=>O(i,!0)},mode:"multiple",style:{width:"100%"},options:d(v),value:Array.from(o.value),disabled:!d(v).length,placeholder:"Select tags to match images","onUpdate:value":r[0]||(r[0]=i=>o.value=new Set(i))},null,8,["conv","options","value","disabled"]),a.value.expired||!a.value.img_count?(c(),T(m,{key:0,onClick:P,loading:!d(l).isIdle,type:"primary"},{default:A(()=>[I(_(a.value.img_count===0?e.$t("generateIndexHint"):e.$t("UpdateIndex")),1)]),_:1},8,["loading"])):(c(),T(m,{key:1,type:"primary",onClick:G,loading:!d(l).isIdle,disabled:!o.value.size},{default:A(()=>[I(_(e.$t("search")),1)]),_:1},8,["loading","disabled"]))])]),d(v).filter(i=>i.type!=="custom").length?b("",!0):(c(),g("p",Me,_(e.$t("needGenerateIdx")),1)),S("div",Ne,[(c(!0),g(B,null,z(d(V),([i,H])=>(c(),g("ul",{class:"tag-list",key:i},[S("h3",Pe,_(e.$t(i)),1),(c(!0),g(B,null,z(H,(p,L)=>(c(),g("li",{key:p.id,class:ne(["tag",{selected:o.value.has(p.id)}]),onClick:Q=>o.value.has(p.id)?o.value.delete(p.id):o.value.add(p.id)},[o.value.has(p.id)?(c(),T(d(oe),{key:0})):b("",!0),I(" "+_(O(p))+" ",1),i==="custom"&&L!==0?(c(),g("span",{key:1,class:"remove",onClickCapture:D(Q=>j(p.id),["stop"])},[C(d(re))],40,De)):b("",!0)],10,ze))),128)),i==="custom"?(c(),g("li",{key:0,class:"tag",onClick:r[2]||(r[2]=p=>w.value=!0)},[w.value?(c(),T(x,{key:0,compact:""},{default:A(()=>[C(f,{value:y.value,"onUpdate:value":r[1]||(r[1]=p=>y.value=p),style:{width:"128px"},loading:d(u),"allow-clear":"",size:"small"},null,8,["value","loading"]),C(h,{size:"small",type:"primary",onClickCapture:D(R,["stop"]),loading:d(u)},{default:A(()=>[I(_(y.value?e.$t("submit"):e.$t("cancel")),1)]),_:1},8,["onClickCapture","loading"])]),_:1})):(c(),g(B,{key:1},[C(d(le)),I(" "+_(e.$t("add")),1)],64))])):b("",!0)]))),128))])],64)):b("",!0)])}}});const je=ie(Ee,[["__scopeId","data-v-c4b1e490"]]);export{je as default};

View File

@ -1 +1 @@
import{ck as A,cl as O,cd as _,c3 as b,cm as m,bi as C,ao as w,aN as h,cn as E,aP as g,co as R,aL as x,c1 as D}from"./index-3dcbb3d9.js";var G=A(Object.getPrototypeOf,Object);const J=G;function y(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,O(t.key),t)}}function Q(e,n,r){return n&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function M(e){return function(n){return n==null?void 0:n[e]}}var L=function(){return _()&&window.document.documentElement},a,X=function(){if(!L())return!1;if(a!==void 0)return a;var n=document.createElement("div");return n.style.display="flex",n.style.flexDirection="column",n.style.rowGap="1px",n.appendChild(document.createElement("div")),n.appendChild(document.createElement("div")),document.body.appendChild(n),a=n.scrollHeight===1,document.body.removeChild(n),a},F=1,I=2;function S(e,n,r,t){var i=r.length,o=i,s=!t;if(e==null)return!o;for(e=Object(e);i--;){var f=r[i];if(s&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++i<o;){f=r[i];var u=f[0],l=e[u],c=f[1];if(s&&f[2]){if(l===void 0&&!(u in e))return!1}else{var d=new b;if(t)var p=t(l,c,u,e,n,d);if(!(p===void 0?m(c,l,F|I,t,d):p))return!1}}return!0}function P(e){return e===e&&!C(e)}function U(e){for(var n=w(e),r=n.length;r--;){var t=n[r],i=e[t];n[r]=[t,i,P(i)]}return n}function v(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}function K(e){var n=U(e);return n.length==1&&n[0][2]?v(n[0][0],n[0][1]):function(r){return r===e||S(r,e,n)}}function N(e,n,r){var t=e==null?void 0:h(e,n);return t===void 0?r:t}var T=1,$=2;function q(e,n){return E(e)&&P(n)?v(g(e),n):function(r){var t=N(r,e);return t===void 0&&t===n?R(r,e):m(n,t,T|$)}}function H(e){return function(n){return h(n,e)}}function k(e){return E(e)?M(g(e)):H(e)}function Y(e){return typeof e=="function"?e:e==null?x:typeof e=="object"?D(e)?q(e[0],e[1]):K(e):k(e)}export{Q as _,W as a,Y as b,L as c,X as d,J as g};
import{ck as A,cl as O,cd as _,c3 as b,cm as m,bi as C,ao as w,aN as h,cn as E,aP as g,co as R,aL as x,c1 as D}from"./index-7887b034.js";var G=A(Object.getPrototypeOf,Object);const J=G;function y(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,O(t.key),t)}}function Q(e,n,r){return n&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function M(e){return function(n){return n==null?void 0:n[e]}}var L=function(){return _()&&window.document.documentElement},a,X=function(){if(!L())return!1;if(a!==void 0)return a;var n=document.createElement("div");return n.style.display="flex",n.style.flexDirection="column",n.style.rowGap="1px",n.appendChild(document.createElement("div")),n.appendChild(document.createElement("div")),document.body.appendChild(n),a=n.scrollHeight===1,document.body.removeChild(n),a},F=1,I=2;function S(e,n,r,t){var i=r.length,o=i,s=!t;if(e==null)return!o;for(e=Object(e);i--;){var f=r[i];if(s&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++i<o;){f=r[i];var u=f[0],l=e[u],c=f[1];if(s&&f[2]){if(l===void 0&&!(u in e))return!1}else{var d=new b;if(t)var p=t(l,c,u,e,n,d);if(!(p===void 0?m(c,l,F|I,t,d):p))return!1}}return!0}function P(e){return e===e&&!C(e)}function U(e){for(var n=w(e),r=n.length;r--;){var t=n[r],i=e[t];n[r]=[t,i,P(i)]}return n}function v(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}function K(e){var n=U(e);return n.length==1&&n[0][2]?v(n[0][0],n[0][1]):function(r){return r===e||S(r,e,n)}}function N(e,n,r){var t=e==null?void 0:h(e,n);return t===void 0?r:t}var T=1,$=2;function q(e,n){return E(e)&&P(n)?v(g(e),n):function(r){var t=N(r,e);return t===void 0&&t===n?R(r,e):m(n,t,T|$)}}function H(e){return function(n){return h(n,e)}}function k(e){return E(e)?M(g(e)):H(e)}function Y(e){return typeof e=="function"?e:e==null?x:typeof e=="object"?D(e)?q(e[0],e[1]):K(e):k(e)}export{Q as _,W as a,Y as b,L as c,X as d,J as g};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.container[data-v-e045fc24]{padding:20px;background-color:var(--zp-secondary-background);height:100%;overflow:auto}.header[data-v-e045fc24]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.header h1[data-v-e045fc24]{font-size:28px;font-weight:700;color:var(--zp-primary)}.last-record[data-v-e045fc24]{margin-left:8px;font-size:14px;color:var(--zp-tertiary)}.last-record a[data-v-e045fc24]{text-decoration:none;color:var(--zp-tertiary)}.last-record a[data-v-e045fc24]:hover{color:var(--zp-primary)}.content[data-v-e045fc24]{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));grid-gap:20px}.quick-start[data-v-e045fc24]{background-color:var(--zp-primary-background);border-radius:8px;box-shadow:0 1px 2px #0000001a;padding:20px}.quick-start ul[data-v-e045fc24]{list-style:none;padding:4px}.quick-start h2[data-v-e045fc24]{margin-top:0;margin-bottom:20px;font-size:20px;font-weight:700;color:var(--zp-primary)}.quick-start__item[data-v-e045fc24]{margin-bottom:10px;padding:4px 8px;display:flex;align-items:center}.quick-start__item[data-v-e045fc24]:hover{background:var(--zp-secondary-background);border-radius:4px;color:var(--primary-color);cursor:pointer}.quick-start__text[data-v-e045fc24]{flex:1;font-size:16px}.quick-start__icon[data-v-e045fc24]{margin-right:8px}

View File

@ -0,0 +1 @@
import{c as y,Q as F,d as L,v as B,R as w,T as I,o,l,q as s,t as r,I as h,n as d,z as v,s as g,B as k,m as M,A as N,U as D,V,W as j,X as A,Y as H,O as P}from"./index-7887b034.js";import{B as R}from"./button-c19c2fda.js";var E={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 T=E;function S(a){for(var c=1;c<arguments.length;c++){var t=arguments[c]!=null?Object(arguments[c]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable}))),i.forEach(function(u){W(a,u,t[u])})}return a}function W(a,c,t){return c in a?Object.defineProperty(a,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[c]=t,a}var C=function(c,t){var i=S({},c,t.attrs);return y(F,S({},i,{icon:T}),null)};C.displayName="FileDoneOutlined";C.inheritAttrs=!1;const Q=C,q=a=>(A("data-v-e045fc24"),a=a(),H(),a),G={class:"container"},U={class:"header"},X=q(()=>s("div",{"flex-placeholder":""},null,-1)),Y={class:"last-record"},J=["onClick"],Z=q(()=>s("a",{href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record",style:{color:"unset"}},"FAQ / 常见问题",-1)),K={class:"content"},ee={key:0,class:"quick-start"},te={key:1,class:"quick-start"},se=["onClick"],ne={class:"quick-start__text line-clamp-1"},ae={class:"quick-start"},oe=["onClick"],le={class:"quick-start__text line-clamp-1"},ce={key:2,class:"quick-start"},re=["onClick"],ie={class:"quick-start__text line-clamp-1"},ue=L({__name:"emptyStartup",props:{tabIdx:null,paneIdx:null},setup(a){const c=a,t=B(),i={local:w("local"),"tag-search":w("imgSearch"),"global-setting":w("globalSettings")},u=(e,p,f=!1)=>{let _;switch(e){case"tag-search-matched-image-grid":return;case"global-setting":case"tag-search":case"empty":_={type:e,name:i[e],key:Date.now()+D()};break;case"local":_={type:e,name:i[e],key:Date.now()+D(),path:p,walkMode:f}}const n=t.tabList[c.tabIdx];n.panes.splice(c.paneIdx,1,_),n.key=_.key},m=I(()=>{var e;return(e=t.lastTabListRecord)==null?void 0:e[1]});console.log(m.value);const O=I(()=>t.autoCompletedDirList.filter(({key:e})=>e==="outdir_txt2img_samples"||e==="outdir_img2img_samples"||e==="outdir_extras_samples"||e==="outdir_save"||e==="outdir_samples")),$=window.parent!==window,x=()=>window.parent.open("/infinite_image_browsing"),z=()=>{V(m.value),t.tabList=m.value.tabs.map(e=>j(e,!0)),t.tabList.forEach(e=>{e.panes.forEach(p=>{typeof p.name!="string"&&(p.name="")})})};return(e,p)=>{var _;const f=R;return o(),l("div",G,[s("div",U,[s("h1",null,r(e.$t("welcome")),1),X,$?(o(),l("div",{key:0,class:"last-record",onClick:x},[s("a",null,r(e.$t("openInNewWindow")),1)])):h("",!0),s("div",Y,[(_=d(m))!=null&&_.tabs.length?(o(),l("a",{key:0,onClick:v(z,["prevent"])},r(e.$t("restoreLastRecord")),9,J)):h("",!0)]),Z]),s("div",K,[d(O).length?(o(),l("div",ee,[s("h2",null,r(e.$t("walkMode")),1),s("ul",null,[(o(!0),l(g,null,k(d(O),n=>(o(),l("li",{key:n.dir,class:"quick-start__item"},[y(f,{onClick:b=>u("local",n.dir,!0),ghost:"",type:"primary",block:""},{default:M(()=>[N(r(n.zh),1)]),_:2},1032,["onClick"])]))),128))])])):h("",!0),d(t).autoCompletedDirList.length?(o(),l("div",te,[s("h2",null,r(e.$t("launchFromQuickMove")),1),s("ul",null,[(o(!0),l(g,null,k(d(t).autoCompletedDirList,n=>(o(),l("li",{key:n.key,class:"quick-start__item",onClick:v(b=>u("local",n.dir),["prevent"])},[s("span",ne,r(n.zh),1)],8,se))),128))])])):h("",!0),s("div",ae,[s("h2",null,r(e.$t("launch")),1),s("ul",null,[(o(!0),l(g,null,k(Object.keys(i),n=>(o(),l("li",{key:n,class:"quick-start__item",onClick:v(b=>u(n),["prevent"])},[s("span",le,r(i[n]),1)],8,oe))),128))])]),d(t).recent.length?(o(),l("div",ce,[s("h2",null,r(e.$t("recent")),1),s("ul",null,[(o(!0),l(g,null,k(d(t).recent,n=>(o(),l("li",{key:n.key,class:"quick-start__item",onClick:v(b=>u("local",n.path),["prevent"])},[y(d(Q),{class:"quick-start__icon"}),s("span",ie,r(n.path),1)],8,re))),128))])])):h("",!0)])])}}});const pe=P(ue,[["__scopeId","data-v-e045fc24"]]);export{pe as default};

View File

@ -1 +0,0 @@
import{c as w,Q as z,d as L,v as B,R as y,T as I,o,l,q as n,t as r,I as h,n as d,z as v,s as k,B as g,m as F,A as M,U as D,V as N,W as V,X as j,Y as H,O as P}from"./index-3dcbb3d9.js";import{B as R}from"./button-273edceb.js";var A={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 E=A;function S(a){for(var c=1;c<arguments.length;c++){var t=arguments[c]!=null?Object(arguments[c]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable}))),i.forEach(function(u){T(a,u,t[u])})}return a}function T(a,c,t){return c in a?Object.defineProperty(a,c,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[c]=t,a}var C=function(c,t){var i=S({},c,t.attrs);return w(z,S({},i,{icon:E}),null)};C.displayName="FileDoneOutlined";C.inheritAttrs=!1;const W=C,Q=a=>(j("data-v-e015a41c"),a=a(),H(),a),G={class:"container"},U={class:"header"},X=Q(()=>n("div",{"flex-placeholder":""},null,-1)),Y={class:"last-record"},J=["onClick"],Z={class:"content"},K={key:0,class:"quick-start"},ee={key:1,class:"quick-start"},te=["onClick"],se={class:"quick-start__text line-clamp-1"},ne={class:"quick-start"},ae=["onClick"],oe={class:"quick-start__text line-clamp-1"},le={key:2,class:"quick-start"},ce=["onClick"],re={class:"quick-start__text line-clamp-1"},ie=L({__name:"emptyStartup",props:{tabIdx:null,paneIdx:null},setup(a){const c=a,t=B(),i={local:y("local"),"tag-search":y("imgSearch"),"global-setting":y("globalSettings")},u=(e,p,f=!1)=>{let _;switch(e){case"tag-search-matched-image-grid":return;case"global-setting":case"tag-search":case"empty":_={type:e,name:i[e],key:Date.now()+D()};break;case"local":_={type:e,name:i[e],key:Date.now()+D(),path:p,walkMode:f}}const s=t.tabList[c.tabIdx];s.panes.splice(c.paneIdx,1,_),s.key=_.key},m=I(()=>{var e;return(e=t.lastTabListRecord)==null?void 0:e[1]});console.log(m.value);const O=I(()=>t.autoCompletedDirList.filter(({key:e})=>e==="outdir_txt2img_samples"||e==="outdir_img2img_samples"||e==="outdir_extras_samples"||e==="outdir_save"||e==="outdir_samples")),q=window.parent!==window,$=()=>window.parent.open("/infinite_image_browsing"),x=()=>{N(m.value),t.tabList=m.value.tabs.map(e=>V(e,!0)),t.tabList.forEach(e=>{e.panes.forEach(p=>{typeof p.name!="string"&&(p.name="")})})};return(e,p)=>{var _;const f=R;return o(),l("div",G,[n("div",U,[n("h1",null,r(e.$t("welcome")),1),X,q?(o(),l("div",{key:0,class:"last-record",onClick:$},[n("a",null,r(e.$t("openInNewWindow")),1)])):h("",!0),n("div",Y,[(_=d(m))!=null&&_.tabs.length?(o(),l("a",{key:0,onClick:v(x,["prevent"])},r(e.$t("restoreLastRecord")),9,J)):h("",!0)])]),n("div",Z,[d(O).length?(o(),l("div",K,[n("h2",null,r(e.$t("walkMode")),1),n("ul",null,[(o(!0),l(k,null,g(d(O),s=>(o(),l("li",{key:s.dir,class:"quick-start__item"},[w(f,{onClick:b=>u("local",s.dir,!0),ghost:"",type:"primary",block:""},{default:F(()=>[M(r(s.zh),1)]),_:2},1032,["onClick"])]))),128))])])):h("",!0),d(t).autoCompletedDirList.length?(o(),l("div",ee,[n("h2",null,r(e.$t("launchFromQuickMove")),1),n("ul",null,[(o(!0),l(k,null,g(d(t).autoCompletedDirList,s=>(o(),l("li",{key:s.key,class:"quick-start__item",onClick:v(b=>u("local",s.dir),["prevent"])},[n("span",se,r(s.zh),1)],8,te))),128))])])):h("",!0),n("div",ne,[n("h2",null,r(e.$t("launch")),1),n("ul",null,[(o(!0),l(k,null,g(Object.keys(i),s=>(o(),l("li",{key:s,class:"quick-start__item",onClick:v(b=>u(s),["prevent"])},[n("span",oe,r(i[s]),1)],8,ae))),128))])]),d(t).recent.length?(o(),l("div",le,[n("h2",null,r(e.$t("recent")),1),n("ul",null,[(o(!0),l(k,null,g(d(t).recent,s=>(o(),l("li",{key:s.key,class:"quick-start__item",onClick:v(b=>u("local",s.path),["prevent"])},[w(d(W),{class:"quick-start__icon"}),n("span",re,r(s.path),1)],8,ce))),128))])])):h("",!0)])])}}});const _e=P(ie,[["__scopeId","data-v-e015a41c"]]);export{_e as default};

View File

@ -1 +0,0 @@
.container[data-v-e015a41c]{padding:20px;background-color:var(--zp-secondary-background);height:100%;overflow:auto}.header[data-v-e015a41c]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.header h1[data-v-e015a41c]{font-size:28px;font-weight:700;color:var(--zp-primary)}.last-record[data-v-e015a41c]{margin-left:8px;font-size:14px;color:var(--zp-tertiary)}.last-record a[data-v-e015a41c]{text-decoration:none;color:var(--zp-tertiary)}.last-record a[data-v-e015a41c]:hover{color:var(--zp-primary)}.content[data-v-e015a41c]{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));grid-gap:20px}.quick-start[data-v-e015a41c]{background-color:var(--zp-primary-background);border-radius:8px;box-shadow:0 1px 2px #0000001a;padding:20px}.quick-start ul[data-v-e015a41c]{list-style:none;padding:4px}.quick-start h2[data-v-e015a41c]{margin-top:0;margin-bottom:20px;font-size:20px;font-weight:700;color:var(--zp-primary)}.quick-start__item[data-v-e015a41c]{margin-bottom:10px;padding:4px 8px;display:flex;align-items:center}.quick-start__item[data-v-e015a41c]:hover{background:var(--zp-secondary-background);border-radius:4px;color:var(--primary-color);cursor:pointer}.quick-start__text[data-v-e015a41c]{flex:1;font-size:16px}.quick-start__icon[data-v-e015a41c]{margin-right:8px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{aM as n,ca as c}from"./index-3dcbb3d9.js";import{g as a}from"./_baseIteratee-3be0999b.js";var i="[object Object]",s=Function.prototype,p=Object.prototype,e=s.toString,f=p.hasOwnProperty,b=e.call(Object);function l(o){if(!n(o)||c(o)!=i)return!1;var r=a(o);if(r===null)return!0;var t=f.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&e.call(t)==b}export{l as i};
import{aM as n,ca as c}from"./index-7887b034.js";import{g as a}from"./_baseIteratee-1af25965.js";var i="[object Object]",s=Function.prototype,p=Object.prototype,e=s.toString,f=p.hasOwnProperty,b=e.call(Object);function l(o){if(!n(o)||c(o)!=i)return!1;var r=a(o);if(r===null)return!0;var t=f.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&e.call(t)==b}export{l as i};

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

6
vue/dist/index.html vendored
View File

@ -7,12 +7,14 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-3dcbb3d9.js"></script>
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-7887b034.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-19e73083.css">
</head>
<body>
<div id="zanllp_dev_gradio_fe"></div>
<div id="zanllp_dev_gradio_fe">
It seems to have failed to load, click on <a href="https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90" target="_blank" >FAQ</a> for help</div>
</div>
</body>
</html>

View File

@ -10,7 +10,9 @@
</head>
<body>
<div id="zanllp_dev_gradio_fe"></div>
<div id="zanllp_dev_gradio_fe">
It seems to have failed to load, click on <a href="https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90" target="_blank" >FAQ</a> for help</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -79,6 +79,7 @@ const restoreRecord = () => {
$t('restoreLastRecord')
}}</a>
</div>
<a href="https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90" target="_blank" class="last-record" style="color: unset;">FAQ / 常见问题</a>
</div>
<div class="content">
<div class="quick-start" v-if="walkModeSupportedDir.length">