feat: enhance topic search with keyword limit, irregular layout, and cache banner

- Add keyword count limit (default 600) for Tag layer to improve performance
- Implement irregular node layout with random perturbations
- Add layer spacing based on adjacent layer widths for consistent gaps
- Add cache result banner with collapse/expand functionality
- Add streaming response utility for LLM API calls
- Update i18n translations for new cache banner texts
- Optimize tag graph: increase max tags to 500, add level-2 tiered requirements
- Fix keyword deduplication and null handling in tag graph
feature/tag-relationship-graph
zanllp 2026-01-18 01:29:25 +08:00
parent 0c1998bdb0
commit 7b2af32b10
77 changed files with 677 additions and 319 deletions

View File

@ -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-157194fb.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-af514ea9.css">
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-64cbe4df.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-d385cc4f.css">
</head>
<body>

View File

@ -573,6 +573,25 @@ class TopicTitleCache:
(cluster_hash, title, kw, model, updated_at),
)
@classmethod
def update_keywords(
cls,
conn: Connection,
cluster_hash: str,
keywords: List[str],
updated_at: Optional[str] = None,
):
"""
Update only the keywords for an existing cluster cache entry.
"""
updated_at = updated_at or datetime.now().isoformat()
kw = json.dumps([str(x) for x in (keywords or [])], ensure_ascii=False)
with closing(conn.cursor()) as cur:
cur.execute(
"UPDATE topic_title_cache SET keywords = ?, updated_at = ? WHERE cluster_hash = ?",
(kw, updated_at, cluster_hash),
)
class TopicClusterCache:
"""
@ -1300,3 +1319,4 @@ class GlobalSetting:
for row in rows:
settings[row[1]] = json.loads(row[0])
return settings

View File

@ -6,25 +6,25 @@ Builds a multi-layer neural-network-style visualization with LLM-driven abstract
import hashlib
import json
import os
import re
import time
from typing import Dict, List, Optional
from pydantic import BaseModel
from fastapi import Depends, FastAPI, HTTPException
from fastapi.responses import StreamingResponse
from scripts.iib.db.datamodel import DataBase, GlobalSetting
from scripts.iib.tool import normalize_output_lang
from scripts.iib.tool import normalize_output_lang, accumulate_streaming_response
from scripts.iib.logger import logger
# Cache version for tag abstraction - increment to invalidate all caches
TAG_ABSTRACTION_CACHE_VERSION = 2.1
TAG_GRAPH_CACHE_VERSION = 1
_MAX_TAGS_FOR_LLM = int(os.getenv("IIB_TAG_GRAPH_MAX_TAGS_FOR_LLM", "300") or "300")
_TOPK_TAGS_FOR_LLM = int(os.getenv("IIB_TAG_GRAPH_TOPK_TAGS_FOR_LLM", "300") or "300")
_MAX_TAGS_FOR_LLM = int(os.getenv("IIB_TAG_GRAPH_MAX_TAGS_FOR_LLM", "500") or "500")
_TOPK_TAGS_FOR_LLM = int(os.getenv("IIB_TAG_GRAPH_TOPK_TAGS_FOR_LLM", "500") or "500")
_LLM_REQUEST_TIMEOUT_SEC = int(os.getenv("IIB_TAG_GRAPH_LLM_TIMEOUT_SEC", "180") or "180")
_LLM_MAX_ATTEMPTS = int(os.getenv("IIB_TAG_GRAPH_LLM_MAX_ATTEMPTS", "5") or "5")
class TagGraphReq(BaseModel):
folder_paths: List[str]
lang: Optional[str] = "en" # Language for LLM output
@ -97,11 +97,20 @@ def mount_tag_graph_routes(
# Normalize language for consistent LLM output
normalized_lang = normalize_output_lang(lang)
print(f"tags length: {len(tags)}")
# Determine Level 2 requirement based on tag count
level2_requirement = ""
if len(tags) <= 8:
level2_requirement = "Level 2 is optional; only create if categories naturally form clear super-groups."
elif len(tags) <= 64:
level2_requirement = "Level 2 is recommended; create 2-5 super-categories to group Level 1 categories when meaningful."
else:
level2_requirement = "Level 2 is strongly recommended; create 2-5 super-categories to group the many Level 1 categories for better organization."
sys_prompt = f"""You are a tag categorization assistant. Organize tags into hierarchical categories.
STRICT RULES:
GUIDELINES:
1. Create 5-15 Level 1 categories (broad groupings)
2. Optionally create 2-5 Level 2 super-categories IF Level 1 has 8+ categories
2. {level2_requirement}
3. Every tag must belong to exactly ONE Level 1 category
4. Use {normalized_lang} for all category labels
5. Category IDs must be simple lowercase (e.g., "style", "char", "scene1")
@ -120,7 +129,7 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
{"role": "user", "content": user_prompt}
],
"temperature": 0.0,
"max_tokens": 8096,
"max_tokens": 32768, # Increased significantly for large keyword sets
"stream": True,
}
@ -147,38 +156,8 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
raise Exception(f"API client error: {resp.status_code} {body}")
# Accumulate streamed content chunks
content_buffer = ""
for raw in resp.iter_lines(decode_unicode=False):
if not raw:
continue
# Ensure explicit UTF-8 decoding to avoid mojibake
try:
line = raw.decode('utf-8') if isinstance(raw, (bytes, bytearray)) else str(raw)
except Exception:
line = raw.decode('utf-8', errors='replace') if isinstance(raw, (bytes, bytearray)) else str(raw)
line = line.strip()
if line.startswith('data: '):
line = line[6:].strip()
if line == '[DONE]':
break
try:
obj = json.loads(line)
except Exception:
# Some providers may return partial JSON or non-JSON lines; skip
continue
# Try to extract incremental content (compat with OpenAI-style streaming)
delta = (obj.get('choices') or [{}])[0].get('delta') or {}
chunk_text = delta.get('content') or ''
if chunk_text:
# Print when data chunk received (truncate for safety)
try:
print(f"[tag_graph] stream_chunk_received len={len(chunk_text)} snippet={chunk_text[:200]}")
except Exception:
pass
content_buffer += chunk_text
content = content_buffer.strip()
print(f"content: {content}")
content = accumulate_streaming_response(resp)
print(f"[tag_graph] content: {content[:500]}...")
# Strategy 1: Direct parse (if response is pure JSON)
try:
result = json.loads(content)
@ -198,8 +177,8 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
json_str = m.group(0)
if not json_str:
last_error = f"no_json_found: {content[:200]}"
logger.warning("[tag_graph] llm_no_json attempt=%s err=%s", attempt, last_error)
last_error = f"no_json_found: {content}"
logger.warning("[tag_graph] llm_no_json attempt=%s err=%s", attempt, last_error, stack_info=True)
continue
# Clean up common JSON issues
@ -210,18 +189,18 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
result = json.loads(json_str)
except json.JSONDecodeError as e:
last_error = f"json_parse_error: {e}"
logger.warning("[tag_graph] llm_json_parse_error attempt=%s err=%s json=%s", attempt, last_error, json_str[:400])
logger.warning("[tag_graph] llm_json_parse_error attempt=%s err=%s json=%s", attempt, last_error, json_str[:400], stack_info=True)
continue
if not isinstance(result, dict) or 'layers' not in result:
last_error = f"invalid_structure: {str(result)[:200]}"
logger.warning("[tag_graph] llm_invalid_structure attempt=%s err=%s", attempt, last_error)
logger.warning("[tag_graph] llm_invalid_structure attempt=%s err=%s", attempt, last_error, stack_info=True)
continue
return result
except requests.RequestException as e:
last_error = f"network_error: {type(e).__name__}: {e}"
logger.warning("[tag_graph] llm_request_error attempt=%s err=%s", attempt, last_error)
logger.warning("[tag_graph] llm_request_error attempt=%s err=%s", attempt, last_error, stack_info=True)
continue
# No fallback: expose error to frontend, but log enough info for debugging.
@ -316,6 +295,8 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
str(req.lang or ""),
)
# Graph cache (best-effort): cache by topic_cluster_cache_key + lang + version.
graph_cache_key = None
if topic_cluster_cache_key:
@ -358,7 +339,8 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
cluster_id = cluster.get("id", "")
cluster_title = cluster.get("title", "Untitled")
cluster_size = cluster.get("size", 0)
keywords = cluster.get("keywords", [])
keywords = cluster.get("keywords", []) or []
keywords = list(dict.fromkeys(keywords)) # Deduplicate
node_id = f"cluster_{cluster_id}"
cluster_nodes.append(LayerNode(
id=node_id,
@ -385,7 +367,7 @@ If unsure about Level 2, OMIT it entirely. Start response with {{ and end with }
tag_stats: Dict[str, Dict] = {}
for cluster in clusters:
keywords = cluster.get("keywords", [])
keywords = cluster.get("keywords", []) or []
cluster_size = cluster.get("size", 0)
cluster_id = cluster.get("id", "")

View File

@ -1,18 +1,19 @@
import ctypes
from datetime import datetime
import json
import os
import platform
import re
import tempfile
import subprocess
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Any
import sys
import piexif
import piexif.helper
import json
import zipfile
from PIL import Image
import shutil
import requests
# import magic
sd_img_dirs = [
@ -833,4 +834,46 @@ def get_data_file_path(filename):
# Running in a normal Python environment
base_path = os.path.join(os.path.dirname(__file__))
return os.path.normpath(os.path.join(base_path, "../../", filename))
return os.path.normpath(os.path.join(base_path, "../../", filename))
def accumulate_streaming_response(resp: requests.Response) -> str:
"""
Accumulate content from a streaming HTTP response.
Args:
resp: The response object from requests.post with stream=True
Returns:
Accumulated text content from the stream
"""
content_buffer = ""
for raw in resp.iter_lines(decode_unicode=False):
if not raw:
continue
# Ensure explicit UTF-8 decoding to avoid mojibake
try:
line = raw.decode('utf-8') if isinstance(raw, (bytes, bytearray)) else str(raw)
except Exception:
line = raw.decode('utf-8', errors='replace') if isinstance(raw, (bytes, bytearray)) else str(raw)
line = line.strip()
if line.startswith('data: '):
line = line[6:].strip()
if line == '[DONE]':
break
try:
obj = json.loads(line)
except Exception:
# Some providers may return partial JSON or non-JSON lines; skip
continue
# Try to extract incremental content (compat with OpenAI-style streaming)
delta = (obj.get('choices') or [{}])[0].get('delta') or {}
chunk_text = delta.get('content') or ''
if chunk_text:
# try:
# print(f"[streaming] chunk_received len={len(chunk_text)} snippet={chunk_text[:200]}")
# except Exception:
# pass
content_buffer += chunk_text
return content_buffer.strip()

View File

@ -16,7 +16,7 @@ from fastapi import Depends, FastAPI, HTTPException
from pydantic import BaseModel
from scripts.iib.db.datamodel import DataBase, ImageEmbedding, ImageEmbeddingFail, TopicClusterCache, TopicTitleCache
from scripts.iib.tool import cwd
from scripts.iib.tool import cwd, accumulate_streaming_response
# Perf deps (required for this feature)
_np = None
@ -480,39 +480,56 @@ def _call_chat_title_sync(
"\n"
)
if existing_keywords:
top_keywords = existing_keywords[:100]
sys += (
f"IMPORTANT: You MUST prioritize selecting keywords from this existing list. "
f"Use keywords from the list that best match the current theme. "
f"Only create new keywords when absolutely necessary.\n"
f"Existing keywords (top {len(top_keywords)}): {', '.join(top_keywords)}\n\n"
)
# Dynamic keyword selection based on total unique count
unique_count = len(existing_keywords)
top_keywords = existing_keywords[:500] # Relaxed to 500
# Tiered conditions based on keyword count
if unique_count <= 200:
# First 200: Not very strict, can create new keywords if not highly relevant
strictness_msg = (
"TIP: Prioritize selecting from the existing list if they fit reasonably well. "
"Creating new keywords is ACCEPTABLE when existing ones don't capture the essence well.\n"
)
elif unique_count <= 500:
# 200-500: Moderate strictness
strictness_msg = (
"IMPORTANT: Try to select from the existing list when reasonably applicable. "
"Only create new keywords when existing ones clearly don't match.\n"
)
else:
# 500+: Very strict, only create if completely unrelated
strictness_msg = (
"CRITICAL: You MUST select from the existing list unless the theme is COMPLETELY UNRELATED to all existing keywords. "
"In almost all cases, use existing keywords.\n"
)
sys += strictness_msg
sys += f"Existing keywords ({len(top_keywords)} of {unique_count} total): {', '.join(top_keywords)}\n\n"
sys += "Output STRICT JSON only:\n" + json_example
user = "Prompt snippets:\n" + "\n".join([f"- {s}" for s in samples])
payload = {
"model": model,
"messages": [{"role": "system", "content": sys}, {"role": "user", "content": user}],
# Prefer deterministic, JSON-only output
"temperature": 0.0,
"top_p": 1.0,
# Give enough room for JSON across providers.
"max_tokens": 2048,
"max_tokens": 4096,
"stream": True, # Enable streaming
}
# Some OpenAI-compatible providers may use different token limit fields / casing.
# Set them all (still a single request; no retry/fallback).
payload["max_output_tokens"] = payload["max_tokens"]
payload["max_completion_tokens"] = payload["max_tokens"]
payload["maxOutputTokens"] = payload["max_tokens"]
payload["maxCompletionTokens"] = payload["max_tokens"]
# Parse JSON from message.content only (regex extraction).
# Retry up to 5 times for: network errors, API errors (non 4xx client errors), parsing failures.
# Parse JSON from streaming response.
# Retry up to 5 times for: network errors, API errors, parsing failures.
attempt_debug: List[Dict] = []
last_err = ""
for attempt in range(1, 6):
try:
resp = requests.post(url, json=payload, headers=headers, timeout=60)
resp = requests.post(url, json=payload, headers=headers, timeout=120)
except requests.RequestException as e:
last_err = f"network_error: {type(e).__name__}: {e}"
attempt_debug.append({"attempt": attempt, "reason": "network_error", "error": str(e)[:400]})
@ -530,30 +547,21 @@ def _call_chat_title_sync(
continue
# 4xx (except 429): fail immediately (client error, not retriable)
raise HTTPException(status_code=status, detail=body)
try:
data = resp.json()
# Use streaming response accumulation
content = accumulate_streaming_response(resp)
except Exception as e:
txt = (resp.text or "")[:600]
last_err = f"response_not_json: {type(e).__name__}: {e}; body={txt}"
attempt_debug.append({"attempt": attempt, "reason": "response_not_json", "error": str(e)[:200], "body": txt[:200]})
last_err = f"streaming_error: {type(e).__name__}: {e}"
attempt_debug.append({"attempt": attempt, "reason": "streaming_error", "error": str(e)[:400]})
continue
choice0 = (data.get("choices") or [{}])[0] if isinstance(data.get("choices"), list) else {}
msg = (choice0 or {}).get("message") or {}
finish_reason = (choice0.get("finish_reason") if isinstance(choice0, dict) else None) or ""
content = (msg.get("content") if isinstance(msg, dict) else "") or ""
raw = content.strip() if isinstance(content, str) else ""
if not raw and isinstance(choice0, dict):
txt = (choice0.get("text") or "") # legacy
raw = txt.strip() if isinstance(txt, str) else ""
m = re.search(r"\{[\s\S]*\}", raw)
# Extract JSON from content
m = re.search(r"\{[\s\S]*\}", content)
if not m:
snippet = (raw or "")[:400].replace("\n", "\\n")
choice_dump = json.dumps(choice0, ensure_ascii=False)[:600] if isinstance(choice0, dict) else str(choice0)[:600]
last_err = f"no_json_object; finish_reason={finish_reason}; content_snippet={snippet}; choice0={choice_dump}"
attempt_debug.append({"attempt": attempt, "reason": "no_json_object", "finish_reason": finish_reason, "snippet": snippet})
snippet = (content or "")[:400].replace("\n", "\\n")
last_err = f"no_json_object; content_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "no_json_object", "snippet": snippet})
continue
json_str = m.group(0)
@ -561,22 +569,22 @@ def _call_chat_title_sync(
obj = json.loads(json_str)
except Exception as e:
snippet = (json_str or "")[:400].replace("\n", "\\n")
last_err = f"json_parse_failed: {type(e).__name__}: {e}; finish_reason={finish_reason}; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "json_parse_failed", "finish_reason": finish_reason, "snippet": snippet})
last_err = f"json_parse_failed: {type(e).__name__}: {e}; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "json_parse_failed", "snippet": snippet})
continue
if not isinstance(obj, dict):
snippet = (json_str or "")[:200].replace("\n", "\\n")
last_err = f"json_not_object; finish_reason={finish_reason}; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "json_not_object", "finish_reason": finish_reason, "snippet": snippet})
last_err = f"json_not_object; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "json_not_object", "snippet": snippet})
continue
title = str(obj.get("title") or "").strip()
keywords = obj.get("keywords") or []
if not title:
snippet = (json_str or "")[:200].replace("\n", "\\n")
last_err = f"missing_title; finish_reason={finish_reason}; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "missing_title", "finish_reason": finish_reason, "snippet": snippet})
last_err = f"missing_title; json_snippet={snippet}"
attempt_debug.append({"attempt": attempt, "reason": "missing_title", "snippet": snippet})
continue
if not isinstance(keywords, list):
keywords = []

View File

@ -1 +1 @@
import{d as E,bC 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-157194fb.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,bC 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-64cbe4df.js";var G=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],H={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:z.any,required:Boolean};const L=E({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:$(H,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(a,d){var t=d.attrs,h=d.emit,g=d.expose,o=f(a.checked===void 0?a.defaultChecked:a.checked),i=f();M(function(){return a.checked},function(){o.value=a.checked}),g({focus:function(){var e;(e=i.value)===null||e===void 0||e.focus()},blur:function(){var e;(e=i.value)===null||e===void 0||e.blur()}});var l=f(),x=function(e){if(!a.disabled){a.checked===void 0&&(o.value=e.target.checked),e.shiftKey=l.value;var r={target:c(c({},a),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e};a.checked!==void 0&&(i.value.checked=!!a.checked),h("change",r),l.value=!1}},C=function(e){h("click",e),l.value=e.shiftKey};return function(){var n,e=a.prefixCls,r=a.name,s=a.id,p=a.type,b=a.disabled,K=a.readonly,P=a.tabindex,B=a.autofocus,S=a.value,N=a.required,_=T(a,G),q=t.class,D=t.onFocus,j=t.onBlur,w=t.onKeydown,A=t.onKeypress,F=t.onKeyup,y=c(c({},_),t),O=Object.keys(y).reduce(function(k,u){return(u.substr(0,5)==="aria-"||u.substr(0,5)==="data-"||u==="role")&&(k[u]=y[u]),k},{}),R=W(e,q,(n={},m(n,"".concat(e,"-checked"),o.value),m(n,"".concat(e,"-disabled"),b),n)),V=c(c({name:r,id:s,type:p,readonly:K,disabled:b,tabindex:P,class:"".concat(e,"-input"),checked:!!o.value,autofocus:B,value:S},O),{},{onChange:x,onClick:C,onFocus:D,onBlur:j,onKeydown:w,onKeypress:A,onKeyup:F,required:N});return v("span",{class:R},[v("input",c({ref:i},V),null),v("span",{class:"".concat(e,"-inner")},null)])}}});export{L as V};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
vue/dist/assets/FileItem-d0ea10d7.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{d as a,U as t,V as s,c as n,cR as _,a0 as c}from"./index-157194fb.js";const o={class:"img-sli-container"},i=a({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(l){return(e,r)=>(t(),s("div",o,[n(_,{left:e.left,right:e.right},null,8,["left","right"])]))}});const p=c(i,[["__scopeId","data-v-ec71de83"]]);export{p as default};

View File

@ -0,0 +1 @@
import{d as a,U as t,V as s,c as n,cR as _,a0 as o}from"./index-64cbe4df.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};

View File

@ -1 +0,0 @@
.img-sli-container[data-v-ec71de83]{position:relative;overflow-y:auto;height:calc(100vh - 40px)}

View File

@ -0,0 +1 @@
.img-sli-container[data-v-ae3fb9a8]{position:relative;overflow-y:auto;height:calc(100vh - 40px)}

View File

@ -1 +0,0 @@
.container[data-v-6e837a6f]{background:var(--zp-secondary-background);position:relative}.container .action-bar[data-v-6e837a6f]{display:flex;align-items:center;user-select:none;gap:4px;padding:4px}.container .action-bar>*[data-v-6e837a6f]{flex-wrap:wrap}.container .file-list[data-v-6e837a6f]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 40px);width:100%}.container .no-res-hint[data-v-6e837a6f]{height:var(--pane-max-height);display:flex;align-items:center;flex-direction:column;justify-content:center}.container .no-res-hint .hint[data-v-6e837a6f]{font-size:1.6em;margin-bottom:2em;text-align:center}

View File

@ -1 +0,0 @@
.container[data-v-795e5ef4]{background:var(--zp-secondary-background);position:relative;height:var(--pane-max-height)}.action-bar[data-v-795e5ef4]{display:flex;align-items:center;user-select:none;gap:6px;padding:6px 8px}.title[data-v-795e5ef4]{font-weight:700;max-width:40vw}.file-list[data-v-795e5ef4]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 44px);width:100%}.no-res-hint[data-v-795e5ef4]{height:calc(var(--pane-max-height) - 44px);display:flex;align-items:center;flex-direction:column;justify-content:center}.no-res-hint .hint[data-v-795e5ef4]{font-size:1.2em;opacity:.7}.preview-switch[data-v-795e5ef4]{position:fixed;bottom:24px;right:24px;display:flex;gap:8px;font-size:36px;user-select:none}.disable[data-v-795e5ef4]{opacity:.3;pointer-events:none}

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-4815fec6]{background:var(--zp-secondary-background);position:relative}.container .action-bar[data-v-4815fec6]{display:flex;align-items:center;user-select:none;gap:4px;padding:4px}.container .action-bar>*[data-v-4815fec6]{flex-wrap:wrap}.container .file-list[data-v-4815fec6]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 40px);width:100%}.container .no-res-hint[data-v-4815fec6]{height:var(--pane-max-height);display:flex;align-items:center;flex-direction:column;justify-content:center}.container .no-res-hint .hint[data-v-4815fec6]{font-size:1.6em;margin-bottom:2em;text-align:center}

View File

@ -0,0 +1 @@
.container[data-v-aea581a5]{background:var(--zp-secondary-background);position:relative;height:var(--pane-max-height)}.action-bar[data-v-aea581a5]{display:flex;align-items:center;user-select:none;gap:6px;padding:6px 8px}.title[data-v-aea581a5]{font-weight:700;max-width:40vw}.file-list[data-v-aea581a5]{list-style:none;padding:8px;overflow:auto;height:calc(var(--pane-max-height) - 44px);width:100%}.no-res-hint[data-v-aea581a5]{height:calc(var(--pane-max-height) - 44px);display:flex;align-items:center;flex-direction:column;justify-content:center}.no-res-hint .hint[data-v-aea581a5]{font-size:1.2em;opacity:.7}.preview-switch[data-v-aea581a5]{position:fixed;bottom:24px;right:24px;display:flex;gap:8px;font-size:36px;user-select:none}.disable[data-v-aea581a5]{opacity:.3;pointer-events:none}

View File

@ -0,0 +1 @@
.full-screen-menu[data-v-bb3c8014]{position:fixed;z-index:9999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-bb3c8014]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-bb3c8014]{margin-right:4px;margin-bottom:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-bb3c8014]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-bb3c8014]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-bb3c8014]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info code[data-v-bb3c8014]{font-size:.9em;display:block;padding:4px;background:var(--zp-primary-background);border-radius:4px;margin-right:20px;white-space:pre-wrap;word-break:break-word;line-height:1.78em}.full-screen-menu .gen-info code[data-v-bb3c8014] .natural-text{margin:.5em 0;line-height:1.6em;text-align:justify;color:var(--zp-primary)}.full-screen-menu .gen-info code[data-v-bb3c8014] .short-tag{word-break:break-all;white-space:nowrap}.full-screen-menu .gen-info code[data-v-bb3c8014] span.tag{background:var(--zp-secondary-variant-background);color:var(--zp-primary);padding:2px 4px;border-radius:6px;margin-right:6px;margin-top:4px;line-height:1.3em;display:inline-block}.full-screen-menu .gen-info code[data-v-bb3c8014] .has-parentheses.tag{background:rgba(255,100,100,.14)}.full-screen-menu .gen-info code[data-v-bb3c8014] span.tag:hover{background:rgba(120,0,0,.15)}.full-screen-menu .gen-info table[data-v-bb3c8014]{font-size:1em;border-radius:4px;border-collapse:separate;margin-bottom:3em}.full-screen-menu .gen-info table tr td[data-v-bb3c8014]:first-child{white-space:nowrap;vertical-align:top}.full-screen-menu .gen-info table.extra-meta-table .extra-meta-value[data-v-bb3c8014]{display:block;max-height:200px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:.85em;background:var(--zp-secondary-variant-background);padding:8px;border-radius:4px}.full-screen-menu .gen-info table td[data-v-bb3c8014]{padding-right:14px;padding-left:4px;border-bottom:1px solid var(--zp-secondary);border-collapse:collapse}.full-screen-menu .gen-info .info-tags .info-tag[data-v-bb3c8014]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-bb3c8014]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px;border-bottom-right-radius:4px}.full-screen-menu .gen-info .info-tags .value[data-v-bb3c8014]{padding:4px}.full-screen-menu.unset-size[data-v-bb3c8014]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-bb3c8014]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-bb3c8014]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-bb3c8014]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-bb3c8014]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-bb3c8014]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-bb3c8014]{flex-wrap:wrap}.full-screen-menu.lr[data-v-bb3c8014]{top:var(--3fe0608e)!important;right:0!important;bottom:0!important;left:100vw!important;height:unset!important;width:var(--2653b66c)!important;transition:left ease .3s}.full-screen-menu.lr.always-on[data-v-bb3c8014],.full-screen-menu.lr.mouse-in[data-v-bb3c8014]{left:var(--1097f730)!important}.tag-alpha-item[data-v-bb3c8014]{display:flex;margin-top:4px}.tag-alpha-item h4[data-v-bb3c8014]{width:32px;flex-shrink:0}.sort-tag-switch[data-v-bb3c8014]{display:inline-block;padding-right:16px;padding-left:8px;cursor:pointer;user-select:none}.sort-tag-switch span[data-v-bb3c8014]{transition:all ease .3s;transform:scale(1.2)}.sort-tag-switch:hover span[data-v-bb3c8014]{transform:scale(1.3)}.lr-layout-control[data-v-bb3c8014]{display:flex;align-items:center;gap:16px;padding:4px 8px;flex-wrap:wrap;border-radius:2px;border-left:3px solid var(--zp-luminous);background-color:var(--zp-secondary-background)}.lr-layout-control .ctrl-item[data-v-bb3c8014]{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}.select-actions[data-v-b04c3508]>:not(:last-child){margin-right:4px}.float-panel[data-v-b04c3508]{position:absolute;bottom:32px;right:32px;background:var(--zp-primary-background);border-radius:4px;z-index:1000;padding:8px;box-shadow:0 0 4px var(--zp-secondary)}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.full-screen-menu[data-v-c7e0b9b7]{position:fixed;z-index:9999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-c7e0b9b7]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-c7e0b9b7]{margin-right:4px;margin-bottom:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-c7e0b9b7]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-c7e0b9b7]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-c7e0b9b7]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info code[data-v-c7e0b9b7]{font-size:.9em;display:block;padding:4px;background:var(--zp-primary-background);border-radius:4px;margin-right:20px;white-space:pre-wrap;word-break:break-word;line-height:1.78em}.full-screen-menu .gen-info code[data-v-c7e0b9b7] .natural-text{margin:.5em 0;line-height:1.6em;text-align:justify;color:var(--zp-primary)}.full-screen-menu .gen-info code[data-v-c7e0b9b7] .short-tag{word-break:break-all;white-space:nowrap}.full-screen-menu .gen-info code[data-v-c7e0b9b7] span.tag{background:var(--zp-secondary-variant-background);color:var(--zp-primary);padding:2px 4px;border-radius:6px;margin-right:6px;margin-top:4px;line-height:1.3em;display:inline-block}.full-screen-menu .gen-info code[data-v-c7e0b9b7] .has-parentheses.tag{background:rgba(255,100,100,.14)}.full-screen-menu .gen-info code[data-v-c7e0b9b7] span.tag:hover{background:rgba(120,0,0,.15)}.full-screen-menu .gen-info table[data-v-c7e0b9b7]{font-size:1em;border-radius:4px;border-collapse:separate;margin-bottom:3em}.full-screen-menu .gen-info table tr td[data-v-c7e0b9b7]:first-child{white-space:nowrap;vertical-align:top}.full-screen-menu .gen-info table.extra-meta-table .extra-meta-value[data-v-c7e0b9b7]{display:block;max-height:200px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:.85em;background:var(--zp-secondary-variant-background);padding:8px;border-radius:4px}.full-screen-menu .gen-info table td[data-v-c7e0b9b7]{padding-right:14px;padding-left:4px;border-bottom:1px solid var(--zp-secondary);border-collapse:collapse}.full-screen-menu .gen-info .info-tags .info-tag[data-v-c7e0b9b7]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-c7e0b9b7]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px;border-bottom-right-radius:4px}.full-screen-menu .gen-info .info-tags .value[data-v-c7e0b9b7]{padding:4px}.full-screen-menu.unset-size[data-v-c7e0b9b7]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-c7e0b9b7]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-c7e0b9b7]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-c7e0b9b7]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-c7e0b9b7]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-c7e0b9b7]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-c7e0b9b7]{flex-wrap:wrap}.full-screen-menu.lr[data-v-c7e0b9b7]{top:var(--b7cd59ce)!important;right:0!important;bottom:0!important;left:100vw!important;height:unset!important;width:var(--0e09e1cc)!important;transition:left ease .3s}.full-screen-menu.lr.always-on[data-v-c7e0b9b7],.full-screen-menu.lr.mouse-in[data-v-c7e0b9b7]{left:var(--62228ae0)!important}.tag-alpha-item[data-v-c7e0b9b7]{display:flex;margin-top:4px}.tag-alpha-item h4[data-v-c7e0b9b7]{width:32px;flex-shrink:0}.sort-tag-switch[data-v-c7e0b9b7]{display:inline-block;padding-right:16px;padding-left:8px;cursor:pointer;user-select:none}.sort-tag-switch span[data-v-c7e0b9b7]{transition:all ease .3s;transform:scale(1.2)}.sort-tag-switch:hover span[data-v-c7e0b9b7]{transform:scale(1.3)}.lr-layout-control[data-v-c7e0b9b7]{display:flex;align-items:center;gap:16px;padding:4px 8px;flex-wrap:wrap;border-radius:2px;border-left:3px solid var(--zp-luminous);background-color:var(--zp-secondary-background)}.lr-layout-control .ctrl-item[data-v-c7e0b9b7]{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}.select-actions[data-v-b6f9a67c]>:not(:last-child){margin-right:4px}.float-panel[data-v-b6f9a67c]{position:absolute;bottom:32px;right:32px;background:var(--zp-primary-background);border-radius:4px;z-index:1000;padding:8px;box-shadow:0 0 4px var(--zp-secondary)}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
[data-v-e1bd92bd] .float-panel{position:fixed}.regex-icon[data-v-e1bd92bd]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-e1bd92bd]{height:1.5em}.regex-icon[data-v-e1bd92bd]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-e1bd92bd]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-e1bd92bd]{padding:8px 8px 0;display:flex}.search-bar.last[data-v-e1bd92bd]{padding-bottom:8px}.search-bar .form-name[data-v-e1bd92bd]{flex-shrink:0;padding:4px 8px}.search-bar .actions>*[data-v-e1bd92bd]{margin-right:4px}.container[data-v-e1bd92bd]{background:var(--zp-secondary-background);position:relative}.container .file-list[data-v-e1bd92bd]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%}

View File

@ -1 +0,0 @@
[data-v-2a7f2e56] .float-panel{position:fixed}.regex-icon[data-v-2a7f2e56]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-2a7f2e56]{height:1.5em}.regex-icon[data-v-2a7f2e56]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-2a7f2e56]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-2a7f2e56]{padding:8px 8px 0;display:flex}.search-bar.last[data-v-2a7f2e56]{padding-bottom:8px}.search-bar .form-name[data-v-2a7f2e56]{flex-shrink:0;padding:4px 8px}.search-bar .actions>*[data-v-2a7f2e56]{margin-right:4px}.container[data-v-2a7f2e56]{background:var(--zp-secondary-background);position:relative}.container .file-list[data-v-2a7f2e56]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

72
vue/dist/assets/TopicSearch-52e0968f.js vendored Normal file

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{bV as i,b1 as t,e7 as f,bM as n}from"./index-157194fb.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{bV as i,b1 as t,e7 as f,bM as n}from"./index-64cbe4df.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};

View File

@ -0,0 +1 @@
.container[data-v-a2642a17]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-a2642a17]{padding:8px;background-color:var(--zp-primary-background)}.container .actions-panel.actions[data-v-a2642a17]{display:flex;align-items:center;gap:16px;z-index:333}.container .file-list[data-v-a2642a17]{flex:1;z-index:222;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-a2642a17]{text-align:center;font-size:2em;padding:30vh 128px 0}

View File

@ -1 +1 @@
import{d as F,a1 as B,cS as S,cc as $,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 R,cT as T,cU as y,z as U,B as V,ak as x,a0 as E}from"./index-157194fb.js";import{_ as N}from"./index-89286149.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-6ddd7179.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-2254804f.js";/* empty css */import"./index-8e3285c7.js";import"./_isIterateeCall-e2252db1.js";import"./index-8929347d.js";import"./index-11d9431b.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},X=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(Y){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=B(),m=O(),{selectdFiles:a}=S(m),r=$(),v=async e=>{const t=T(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),U.success(V("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=x,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:J=>z(k),"full-screen-preview-image-url":s(R)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const le=E(X,[["__scopeId","data-v-3d7e6f2d"]]);export{le as default};
import{d as F,a1 as B,cS as S,cc as $,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 R,cT as T,cU as y,z as U,B as V,ak as x,a0 as E}from"./index-64cbe4df.js";import{_ as N}from"./index-f0ba7b9c.js";import{u as L,a as H,f as O,F as W,d as j}from"./FileItem-2b09179d.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-4748a0d9.js";/* empty css */import"./index-53055c61.js";import"./_isIterateeCall-e4f71c4d.js";import"./index-8c941714.js";import"./index-01c239de.js";const q={class:"actions-panel actions"},G={class:"item"},P={key:0,class:"file-list"},Q={class:"hint"},X=F({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(Y){const{stackViewEl:D}=L().toRefs(),{itemSize:h,gridItems:b,cellWidth:g}=H(),i=B(),m=O(),{selectdFiles:a}=S(m),r=$(),v=async e=>{const t=T(e);t&&m.addFiles(t.nodes)},C=async()=>{r.pushAction(async()=>{const e=await y.value.post("/zip",{paths:a.value.map(u=>u.fullpath),compress:i.batchDownloadCompress,pack_only:!1},{responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=t,o.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(o),o.click()})},I=async()=>{r.pushAction(async()=>{await y.value.post("/zip",{paths:a.value.map(e=>e.fullpath),compress:i.batchDownloadCompress,pack_only:!0},{responseType:"blob"}),U.success(V("success"))})},z=e=>{a.value.splice(e,1)};return(e,t)=>{const o=x,u=N;return _(),w("div",{class:"container",ref_key:"stackViewEl",ref:D,onDrop:v},[f("div",q,[l(o,{onClick:t[0]||(t[0]=n=>s(m).selectdFiles=[])},{default:d(()=>[p(c(e.$t("clear")),1)]),_:1}),f("div",G,[p(c(e.$t("compressFile"))+": ",1),l(u,{checked:s(i).batchDownloadCompress,"onUpdate:checked":t[1]||(t[1]=n=>s(i).batchDownloadCompress=n)},null,8,["checked"])]),l(o,{onClick:I,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("packOnlyNotDownload")),1)]),_:1},8,["loading"]),l(o,{onClick:C,type:"primary",loading:!s(r).isIdle},{default:d(()=>[p(c(e.$t("zipDownload")),1)]),_:1},8,["loading"])]),s(a).length?(_(),A(s(j),{key:1,ref:"scroller",class:"file-list",items:s(a).slice(),"item-size":s(h).first,"key-field":"fullpath","item-secondary-size":s(h).second,gridItems:s(b)},{default:d(({item:n,index:k})=>[l(W,{idx:k,file:n,"cell-width":s(g),"enable-close-icon":"",onCloseIconClick:J=>z(k),"full-screen-preview-image-url":s(R)(n),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(_(),w("div",P,[f("p",Q,c(e.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const le=E(X,[["__scopeId","data-v-a2642a17"]]);export{le as default};

View File

@ -1 +0,0 @@
.container[data-v-3d7e6f2d]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-3d7e6f2d]{padding:8px;background-color:var(--zp-primary-background)}.container .actions-panel.actions[data-v-3d7e6f2d]{display:flex;align-items:center;gap:16px;z-index:333}.container .file-list[data-v-3d7e6f2d]{flex:1;z-index:222;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-3d7e6f2d]{text-align:center;font-size:2em;padding:30vh 128px 0}

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

View File

@ -1 +0,0 @@
import{u as w,a as y,F as b,d as k}from"./FileItem-6ddd7179.js";import{d as x,a1 as h,c9 as F,r as D,bh as I,bl as C,U as V,V as E,c as n,a3 as z,a4 as e,af as S,cT as B,cV as R,a0 as T}from"./index-157194fb.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-2254804f.js";/* empty css */import"./index-8e3285c7.js";import"./_isIterateeCall-e2252db1.js";import"./index-8929347d.js";import"./index-11d9431b.js";const A=x({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,m=h(),{stackViewEl:d}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=y(),g=F(),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(()=>{m.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(V(),E("div",{class:"container",ref_key:"stackViewEl",ref:d,onDrop:_},[n(e(k),{ref:"scroller",class:"file-list",items:a.value.slice(),"item-size":e(i).first,"key-field":"fullpath","item-secondary-size":e(i).second,gridItems:e(u)},{default:z(({item:t,index:r})=>{var c;return[n(b,{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":(c=t==null?void 0:t.tags)==null?void 0:c.map(e(g).tagConvert),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","enable-close-icon","onCloseIconClick","full-screen-preview-image-url","extra-tags"])]}),_:1},8,["items","item-size","item-secondary-size","gridItems"])],544))}});const j=T(A,[["__scopeId","data-v-0c31f6b2"]]);export{j as default};

View File

@ -1 +0,0 @@
.container[data-v-0c31f6b2]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-0c31f6b2]{padding:8px;background-color:var(--zp-primary-background)}.container .file-list[data-v-0c31f6b2]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-0c31f6b2]{text-align:center;font-size:2em;padding:30vh 128px 0}

1
vue/dist/assets/gridView-7f025bc2.js vendored Normal file
View File

@ -0,0 +1 @@
import{u as w,a as y,F as k,d as x}from"./FileItem-2b09179d.js";import{d as h,a1 as F,c9 as b,r as D,bh as I,bl as C,U as V,V as E,c,a3 as z,a4 as e,af as S,cT as B,cV as R,a0 as T}from"./index-64cbe4df.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-4748a0d9.js";/* empty css */import"./index-53055c61.js";import"./_isIterateeCall-e4f71c4d.js";import"./index-8c941714.js";import"./index-01c239de.js";const A=h({__name:"gridView",props:{tabIdx:{},paneIdx:{},id:{},removable:{type:Boolean},allowDragAndDrop:{type:Boolean},files:{},paneKey:{}},setup(p){const o=p,m=F(),{stackViewEl:d}=w().toRefs(),{itemSize:i,gridItems:u,cellWidth:f}=y(),g=b(),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(()=>{m.pageFuncExportMap.set(o.paneKey,{getFiles:()=>C(a.value),setFiles:s=>a.value=s})}),(s,l)=>(V(),E("div",{class:"container",ref_key:"stackViewEl",ref:d,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(k,{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 j=T(A,[["__scopeId","data-v-f35f4802"]]);export{j as default};

1
vue/dist/assets/gridView-eef9ac55.css vendored Normal file
View File

@ -0,0 +1 @@
.container[data-v-f35f4802]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-f35f4802]{padding:8px;background-color:var(--zp-primary-background)}.container .file-list[data-v-f35f4802]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-f35f4802]{text-align:center;font-size:2em;padding:30vh 128px 0}

View File

@ -1 +1 @@
import{am as F,r as g,l as P,k as A,O as b,G as R,cc as q,cn as O,cs as z}from"./index-157194fb.js";import{u as L,a as Q,b as j,e as H}from"./FileItem-6ddd7179.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-f7eadb70.js";import{u as B}from"./useGenInfoDiff-4c9e8f19.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 P({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=R(()=>(n.res??[]).filter(y=>!i.has(y.fullpath))),o=q(),{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:D,canPreview:G}=W({loadNext:()=>n.next()}),J=async(y,S,N)=>{a.value=[{curr:"",files:l.value}],await m(y,S,N)};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:J,stackViewEl:c,previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:D,canPreview:G,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 P,k as A,O as b,G as R,cc as q,cn as O,cs as z}from"./index-64cbe4df.js";import{u as L,a as Q,b as j,e as H}from"./FileItem-2b09179d.js";import{a as T,b as U,c as W}from"./MultiSelectKeep-e2324426.js";import{u as B}from"./useGenInfoDiff-bfe60e2e.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 P({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=R(()=>(n.res??[]).filter(y=>!i.has(y.fullpath))),o=q(),{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:D,canPreview:G}=W({loadNext:()=>n.next()}),J=async(y,S,N)=>{a.value=[{curr:"",files:l.value}],await m(y,S,N)};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:J,stackViewEl:c,previewIdx:_,previewing:E,onPreviewVisibleChange:M,previewImgMove:D,canPreview:G,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};

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{r as o,o as t,cM as n}from"./index-157194fb.js";const a=function(){var e=o(!1);return t(function(){e.value=n()}),e};export{a as u};
import{r as o,o as t,cM as n}from"./index-64cbe4df.js";const a=function(){var e=o(!1);return t(function(){e.value=n()}),e};export{a as u};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
.container[data-v-e55e3025]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column;padding:16px}.container .actions[data-v-e55e3025]{margin-bottom:16px}.container .actions *[data-v-e55e3025]{margin-right:10px}.snapshot[data-v-e55e3025]{list-style:none;padding:0;margin:0;width:512px}.snapshot li[data-v-e55e3025]{display:flex;justify-content:space-between;align-items:center;padding:10px;background-color:var(--zp-secondary-variant-background);border-radius:4px;margin-bottom:10px;transition:all .3s ease;border-bottom:2px solid var(--zp-luminous-deep)}.snapshot li[data-v-e55e3025]:hover{border-bottom:2px solid var(--zp-luminous)}.snapshot li div[data-v-e55e3025]:first-child{flex-grow:1;font-weight:700}.snapshot li div[data-v-e55e3025]:last-child{display:flex;gap:10px}

View File

@ -1 +1 @@
import{d as F,u as S,G as k,an as j,h as d,c as s,aq as U,e8 as W,r as q,bh as G,Z as V,dx as Z,P as N,cb as z}from"./index-157194fb.js";var H=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},J=F({compatConfig:{MODE:3},name:"ACheckableTag",props:H(),setup:function(e,i){var l=i.slots,r=i.emit,g=S("tag",e),u=g.prefixCls,o=function(C){var v=e.checked;r("update:checked",!v),r("change",!v),r("click",C)},p=k(function(){var a;return j(u.value,(a={},d(a,"".concat(u.value,"-checkable"),!0),d(a,"".concat(u.value,"-checkable-checked"),e.checked),a))});return function(){var a;return s("span",{class:p.value,onClick:o},[(a=l.default)===null||a===void 0?void 0:a.call(l)])}}});const b=J;var K=new RegExp("^(".concat(U.join("|"),")(-inverse)?$")),L=new RegExp("^(".concat(W.join("|"),")$")),Q=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:N.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:N.any}},f=F({compatConfig:{MODE:3},name:"ATag",props:Q(),slots:["closeIcon","icon"],setup:function(e,i){var l=i.slots,r=i.emit,g=i.attrs,u=S("tag",e),o=u.prefixCls,p=u.direction,a=q(!0);G(function(){e.visible!==void 0&&(a.value=e.visible)});var C=function(t){t.stopPropagation(),r("update:visible",!1),r("close",t),!t.defaultPrevented&&e.visible===void 0&&(a.value=!1)},v=k(function(){var n=e.color;return n?K.test(n)||L.test(n):!1}),E=k(function(){var n;return j(o.value,(n={},d(n,"".concat(o.value,"-").concat(e.color),v.value),d(n,"".concat(o.value,"-has-color"),e.color&&!v.value),d(n,"".concat(o.value,"-hidden"),!a.value),d(n,"".concat(o.value,"-rtl"),p.value==="rtl"),n))});return function(){var n,t,h,m=e.icon,R=m===void 0?(n=l.icon)===null||n===void 0?void 0:n.call(l):m,y=e.color,_=e.closeIcon,P=_===void 0?(t=l.closeIcon)===null||t===void 0?void 0:t.call(l):_,x=e.closable,w=x===void 0?!1:x,B=function(){return w?P?s("span",{class:"".concat(o.value,"-close-icon"),onClick:C},[P]):s(z,{class:"".concat(o.value,"-close-icon"),onClick:C},null):null},O={backgroundColor:y&&!v.value?y:void 0},I=R||null,T=(h=l.default)===null||h===void 0?void 0:h.call(l),A=I?s(V,null,[I,s("span",null,[T])]):T,D="onClick"in g,$=s("span",{class:E.value,style:O},[A,B()]);return D?s(Z,null,{default:function(){return[$]}}):$}}});f.CheckableTag=b;f.install=function(c){return c.component(f.name,f),c.component(b.name,b),c};const Y=f;export{Y as _};
import{d as F,u as S,G as k,an as j,h as d,c as s,aq as U,e8 as W,r as q,bh as G,Z as V,dx as Z,P as N,cb as z}from"./index-64cbe4df.js";var H=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},J=F({compatConfig:{MODE:3},name:"ACheckableTag",props:H(),setup:function(e,i){var l=i.slots,r=i.emit,g=S("tag",e),u=g.prefixCls,o=function(C){var v=e.checked;r("update:checked",!v),r("change",!v),r("click",C)},p=k(function(){var a;return j(u.value,(a={},d(a,"".concat(u.value,"-checkable"),!0),d(a,"".concat(u.value,"-checkable-checked"),e.checked),a))});return function(){var a;return s("span",{class:p.value,onClick:o},[(a=l.default)===null||a===void 0?void 0:a.call(l)])}}});const b=J;var K=new RegExp("^(".concat(U.join("|"),")(-inverse)?$")),L=new RegExp("^(".concat(W.join("|"),")$")),Q=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:N.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:N.any}},f=F({compatConfig:{MODE:3},name:"ATag",props:Q(),slots:["closeIcon","icon"],setup:function(e,i){var l=i.slots,r=i.emit,g=i.attrs,u=S("tag",e),o=u.prefixCls,p=u.direction,a=q(!0);G(function(){e.visible!==void 0&&(a.value=e.visible)});var C=function(t){t.stopPropagation(),r("update:visible",!1),r("close",t),!t.defaultPrevented&&e.visible===void 0&&(a.value=!1)},v=k(function(){var n=e.color;return n?K.test(n)||L.test(n):!1}),E=k(function(){var n;return j(o.value,(n={},d(n,"".concat(o.value,"-").concat(e.color),v.value),d(n,"".concat(o.value,"-has-color"),e.color&&!v.value),d(n,"".concat(o.value,"-hidden"),!a.value),d(n,"".concat(o.value,"-rtl"),p.value==="rtl"),n))});return function(){var n,t,h,m=e.icon,R=m===void 0?(n=l.icon)===null||n===void 0?void 0:n.call(l):m,y=e.color,_=e.closeIcon,P=_===void 0?(t=l.closeIcon)===null||t===void 0?void 0:t.call(l):_,x=e.closable,w=x===void 0?!1:x,B=function(){return w?P?s("span",{class:"".concat(o.value,"-close-icon"),onClick:C},[P]):s(z,{class:"".concat(o.value,"-close-icon"),onClick:C},null):null},O={backgroundColor:y&&!v.value?y:void 0},I=R||null,T=(h=l.default)===null||h===void 0?void 0:h.call(l),A=I?s(V,null,[I,s("span",null,[T])]):T,D="onClick"in g,$=s("span",{class:E.value,style:O},[A,B()]);return D?s(Z,null,{default:function(){return[$]}}):$}}});f.CheckableTag=b;f.install=function(c){return c.component(f.name,f),c.component(b.name,b),c};const Y=f;export{Y as _};

1
vue/dist/assets/index-bd568ec0.css vendored Normal file
View File

@ -0,0 +1 @@
.container[data-v-2c44013c]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column;padding:16px}.container .actions[data-v-2c44013c]{margin-bottom:16px}.container .actions *[data-v-2c44013c]{margin-right:10px}.snapshot[data-v-2c44013c]{list-style:none;padding:0;margin:0;width:512px}.snapshot li[data-v-2c44013c]{display:flex;justify-content:space-between;align-items:center;padding:10px;background-color:var(--zp-secondary-variant-background);border-radius:4px;margin-bottom:10px;transition:all .3s ease;border-bottom:2px solid var(--zp-luminous-deep)}.snapshot li[data-v-2c44013c]:hover{border-bottom:2px solid var(--zp-luminous)}.snapshot li div[data-v-2c44013c]:first-child{flex-grow:1;font-weight:700}.snapshot li div[data-v-2c44013c]:last-child{display:flex;gap:10px}

View File

@ -1 +1 @@
import{av as M,G as l,ax as D,ay as P,d as F,u as I,r as K,o as L,cx as _,b as y,bk as T,cy as A,an as $,h as o,c as B,a as G}from"./index-157194fb.js";import{u as V}from"./index-1c4f06bb.js";var E=Symbol("rowContextKey"),W=function(r){D(E,r)},k=function(){return M(E,{gutter:l(function(){}),wrap:l(function(){}),supportFlexGap:l(function(){})})};P("top","middle","bottom","stretch");P("start","end","center","space-around","space-between");var U=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},q=F({compatConfig:{MODE:3},name:"ARow",props:U(),setup:function(r,N){var g=N.slots,v=I("row",r),d=v.prefixCls,h=v.direction,j,x=K({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=V();L(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)})}),T(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});W({gutter:S,supportFlexGap:w,wrap:l(function(){return r.wrap})});var R=l(function(){var e;return $(d.value,(e={},o(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),o(e,"".concat(d.value,"-").concat(r.justify),r.justify),o(e,"".concat(d.value,"-").concat(r.align),r.align),o(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 B("div",{class:R.value,style:O.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});const Y=q;function H(c){return typeof c=="number"?"".concat(c," ").concat(c," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(c)?"0 0 ".concat(c):c}var J=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=F({compatConfig:{MODE:3},name:"ACol",props:J(),setup:function(r,N){var g=N.slots,v=k(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=I("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(m){var f,u={},C=r[m];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},o(f,"".concat(a,"-").concat(m,"-").concat(u.span),u.span!==void 0),o(f,"".concat(a,"-").concat(m,"-order-").concat(u.order),u.order||u.order===0),o(f,"".concat(a,"-").concat(m,"-offset-").concat(u.offset),u.offset||u.offset===0),o(f,"".concat(a,"-").concat(m,"-push-").concat(u.push),u.push||u.push===0),o(f,"".concat(a,"-").concat(m,"-pull-").concat(u.pull),u.pull||u.pull===0),o(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),$(a,(e={},o(e,"".concat(a,"-").concat(t),t!==void 0),o(e,"".concat(a,"-order-").concat(n),n),o(e,"".concat(a,"-offset-").concat(s),s),o(e,"".concat(a,"-push-").concat(i),i),o(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=H(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return B("div",{class:R.value,style:O.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});export{Z as C,Y as R};
import{av as M,G as l,ax as D,ay as P,d as F,u as I,r as K,o as L,cx as _,b as y,bk as T,cy as A,an as $,h as o,c as B,a as G}from"./index-64cbe4df.js";import{u as V}from"./index-56137fc5.js";var E=Symbol("rowContextKey"),W=function(r){D(E,r)},k=function(){return M(E,{gutter:l(function(){}),wrap:l(function(){}),supportFlexGap:l(function(){})})};P("top","middle","bottom","stretch");P("start","end","center","space-around","space-between");var U=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},q=F({compatConfig:{MODE:3},name:"ARow",props:U(),setup:function(r,N){var g=N.slots,v=I("row",r),d=v.prefixCls,h=v.direction,j,x=K({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=V();L(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)})}),T(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});W({gutter:S,supportFlexGap:w,wrap:l(function(){return r.wrap})});var R=l(function(){var e;return $(d.value,(e={},o(e,"".concat(d.value,"-no-wrap"),r.wrap===!1),o(e,"".concat(d.value,"-").concat(r.justify),r.justify),o(e,"".concat(d.value,"-").concat(r.align),r.align),o(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 B("div",{class:R.value,style:O.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});const Y=q;function H(c){return typeof c=="number"?"".concat(c," ").concat(c," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(c)?"0 0 ".concat(c):c}var J=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=F({compatConfig:{MODE:3},name:"ACol",props:J(),setup:function(r,N){var g=N.slots,v=k(),d=v.gutter,h=v.supportFlexGap,j=v.wrap,x=I("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(m){var f,u={},C=r[m];typeof C=="number"?u.span=C:y(C)==="object"&&(u=C||{}),p=G(G({},p),{},(f={},o(f,"".concat(a,"-").concat(m,"-").concat(u.span),u.span!==void 0),o(f,"".concat(a,"-").concat(m,"-order-").concat(u.order),u.order||u.order===0),o(f,"".concat(a,"-").concat(m,"-offset-").concat(u.offset),u.offset||u.offset===0),o(f,"".concat(a,"-").concat(m,"-push-").concat(u.push),u.push||u.push===0),o(f,"".concat(a,"-").concat(m,"-pull-").concat(u.pull),u.pull||u.pull===0),o(f,"".concat(a,"-rtl"),S.value==="rtl"),f))}),$(a,(e={},o(e,"".concat(a,"-").concat(t),t!==void 0),o(e,"".concat(a,"-order-").concat(n),n),o(e,"".concat(a,"-offset-").concat(s),s),o(e,"".concat(a,"-push-").concat(i),i),o(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=H(e),j.value===!1&&!n.minWidth&&(n.minWidth=0)),n});return function(){var e;return B("div",{class:R.value,style:O.value},[(e=g.default)===null||e===void 0?void 0:e.call(g)])}}});export{Z as C,Y as R};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{d as x,a1 as $,aK as g,cW 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 W,a4 as m,y as I,z as _,B as v,aj as V,ak as D,cX as N,a0 as R}from"./index-157194fb.js";/* empty css */const F={class:"container"},K={class:"actions"},L={class:"uni-desc"},U={class:"snapshot"},X=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(j){const h=$(),t=g(),f=e=>{h.tabList=I(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=V,l=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,W(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const A=R(X,[["__scopeId","data-v-e55e3025"]]);export{A as default};
import{d as x,a1 as $,aK as g,cW 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 W,a4 as m,y as I,z as _,B as v,aj as V,ak as D,cX as N,a0 as R}from"./index-64cbe4df.js";/* empty css */const F={class:"container"},K={class:"actions"},L={class:"uni-desc"},U={class:"snapshot"},X=x({__name:"index",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(j){const h=$(),t=g(),f=e=>{h.tabList=I(e.tabs)},k=b(async e=>{await N(`workspace_snapshot_${e.id}`),t.snapshots=t.snapshots.filter(c=>c.id!==e.id),_.success(v("deleteSuccess"))}),o=w(""),y=async()=>{if(!o.value){_.error(v("nameRequired"));return}const e=t.createSnapshot(o.value);await t.addSnapshot(e),_.success(v("saveCompleted"))};return(e,c)=>{const C=V,l=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,W(m(t).snapshots,s=>(p(),i("li",{key:s.id},[a("div",null,[a("span",null,n(s.name),1)]),a("div",null,[r(l,{onClick:S=>f(s)},{default:d(()=>[u(n(e.$t("restore")),1)]),_:2},1032,["onClick"]),r(l,{onClick:S=>m(k)(s)},{default:d(()=>[u(n(e.$t("remove")),1)]),_:2},1032,["onClick"])])]))),128))])])}}});const A=R(X,[["__scopeId","data-v-2c44013c"]]);export{A as default};

View File

@ -1 +1 @@
import{d as w,bC as D,av as A,cN as j,az as k,n as V,cO as B,cP as y,e as $,c as a,_ as O,h as r,a as P,cQ as T,P as b}from"./index-157194fb.js";var M=["class","style"],Q=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 W(t,n){return!!t&&!!n&&!isNaN(Number(n))}function F(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const G=w({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:D(Q(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:A("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=W(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=B(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,N=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,x=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=O(l,M),S=this.configProvider,U=S.getPrefixCls,z=S.direction,s=U("spin",N),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=T(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"),x]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{G as S,F as s};
import{d as w,bC as D,av as A,cN as j,az as k,n as V,cO as B,cP as y,e as $,c as a,_ as O,h as r,a as P,cQ as T,P as b}from"./index-64cbe4df.js";var M=["class","style"],Q=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 W(t,n){return!!t&&!!n&&!isNaN(Number(n))}function F(t){var n=t.indicator;p=typeof n=="function"?n:function(){return a(n,null,null)}}const G=w({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:D(Q(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:A("configProvider",j)}},data:function(){var n=this.spinning,e=this.delay,i=W(n,e);return{sSpinning:n&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var n=this;k(function(){n.debouncifyUpdateSpinning(),n.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(n){var e=n||this.$props,i=e.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=V(this.originalUpdateSpinning,i))},updateSpinning:function(){var n=this.spinning,e=this.sSpinning;e!==n&&(this.sSpinning=n)},cancelExistingSpin:function(){var n=this.updateSpinning;n&&n.cancel&&n.cancel()},renderIndicator:function(n){var e="".concat(n,"-dot"),i=B(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),y(i)?$(i,{class:e}):p&&y(p())?$(p(),{class:e}):a("span",{class:"".concat(e," ").concat(n,"-dot-spin")},[a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null),a("i",{class:"".concat(n,"-dot-item")},null)]))}},render:function(){var n,e,i,o=this.$props,f=o.size,N=o.prefixCls,h=o.tip,d=h===void 0?(n=(e=this.$slots).tip)===null||n===void 0?void 0:n.call(e):h,x=o.wrapperClassName,l=this.$attrs,v=l.class,_=l.style,C=O(l,M),S=this.configProvider,U=S.getPrefixCls,z=S.direction,s=U("spin",N),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=T(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"),x]},[u&&a("div",{key:"loading"},[m]),a("div",{class:I,key:"container"},[g])])}return m}});export{G as S,F as s};

View File

@ -1 +1 @@
import{cw as j,ay as z,d as K,j as U,dw as $,w as g,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,bf as L,g as x,dx as W,P as c,dy as _}from"./index-157194fb.js";var R=z("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=K({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var o=r.attrs,y=r.slots,B=r.expose,l=r.emit,m=U();$(function(){g(!("defaultChecked"in o),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),g(!("value"in o),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:o.defaultChecked),f=S(function(){return h.value===n.checkedValue});A(function(){return n.checked},function(){h.value=n.checked});var v=D("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),w=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:w,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){w();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===_.LEFT?k(n.unCheckedValue,e):e.keyCode===_.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},d(a,"".concat(u.value,"-small"),T.value==="small"),d(a,"".concat(u.value,"-loading"),n.loading),d(a,"".concat(u.value,"-checked"),f.value),d(a,"".concat(u.value,"-disabled"),n.disabled),d(a,u.value,!0),d(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(W,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},H(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),o),{},{id:(a=n.id)!==null&&a!==void 0?a:m.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[o.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(L,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?x(y,n,"checkedChildren"):x(y,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};
import{cw as j,ay as z,d as K,j as U,dw as $,w as g,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,bf as L,g as x,dx as W,P as c,dy as _}from"./index-64cbe4df.js";var R=z("small","default"),q=function(){return{id:String,prefixCls:String,size:c.oneOf(R),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},J=K({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:q(),slots:["checkedChildren","unCheckedChildren"],setup:function(n,r){var o=r.attrs,y=r.slots,B=r.expose,l=r.emit,m=U();$(function(){g(!("defaultChecked"in o),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),g(!("value"in o),"Switch","`value` is not validate prop, do you mean `checked`?")});var h=b(n.checked!==void 0?n.checked:o.defaultChecked),f=S(function(){return h.value===n.checkedValue});A(function(){return n.checked},function(){h.value=n.checked});var v=D("switch",n),u=v.prefixCls,F=v.direction,T=v.size,i=b(),w=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:w,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){w();var t=f.value?n.unCheckedValue:n.checkedValue;k(t,e),l("click",t,e)},M=function(e){e.keyCode===_.LEFT?k(n.unCheckedValue,e):e.keyCode===_.RIGHT&&k(n.checkedValue,e),l("keydown",e)},O=function(e){var t;(t=i.value)===null||t===void 0||t.blur(),l("mouseup",e)},P=S(function(){var a;return a={},d(a,"".concat(u.value,"-small"),T.value==="small"),d(a,"".concat(u.value,"-loading"),n.loading),d(a,"".concat(u.value,"-checked"),f.value),d(a,"".concat(u.value,"-disabled"),n.disabled),d(a,u.value,!0),d(a,"".concat(u.value,"-rtl"),F.value==="rtl"),a});return function(){var a;return s(W,{insertExtraNode:!0},{default:function(){return[s("button",C(C(C({},H(n,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),o),{},{id:(a=n.id)!==null&&a!==void 0?a:m.id.value,onKeydown:M,onClick:N,onBlur:I,onMouseup:O,type:"button",role:"switch","aria-checked":h.value,disabled:n.disabled||n.loading,class:[o.class,P.value],ref:i}),[s("div",{class:"".concat(u.value,"-handle")},[n.loading?s(L,{class:"".concat(u.value,"-loading-icon")},null):null]),s("span",{class:"".concat(u.value,"-inner")},[f.value?x(y,n,"checkedChildren"):x(y,n,"unCheckedChildren")])])]}})}}});const X=j(J);export{X as _};

View File

@ -0,0 +1 @@
import{cl as e,cm as i,cn as r,co as a,b1 as n}from"./index-64cbe4df.js";function c(s,t){return e(i(s,t,r),s+"")}function b(s){return a(s)&&n(s)}export{c as b,b as i};

View File

@ -1 +0,0 @@
import{cl as e,cm as i,cn as r,co as a,b1 as n}from"./index-157194fb.js";function c(s,t){return e(i(s,t,r),s+"")}function b(s){return a(s)&&n(s)}export{c as b,b as i};

View File

@ -1 +1 @@
.ant-slider{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;height:12px;margin:10px 6px;padding:4px 0;cursor:pointer;touch-action:none}.ant-slider-vertical{width:12px;height:100%;margin:6px 10px;padding:0 4px}.ant-slider-vertical .ant-slider-rail{width:4px;height:100%}.ant-slider-vertical .ant-slider-track{width:4px}.ant-slider-vertical .ant-slider-handle{margin-top:-6px;margin-left:-5px}.ant-slider-vertical .ant-slider-mark{top:0;left:12px;width:18px;height:100%}.ant-slider-vertical .ant-slider-mark-text{left:4px;white-space:nowrap}.ant-slider-vertical .ant-slider-step{width:4px;height:100%}.ant-slider-vertical .ant-slider-dot{top:auto;left:2px;margin-bottom:-4px}.ant-slider-tooltip .ant-tooltip-inner{min-width:unset}.ant-slider-rtl.ant-slider-vertical .ant-slider-handle{margin-right:-5px;margin-left:0}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark{right:12px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark-text{right:4px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-dot{right:2px;left:auto}.ant-slider-with-marks{margin-bottom:28px}.ant-slider-rail{position:absolute;width:100%;height:4px;background-color:#f5f5f5;border-radius:2px;transition:background-color .3s}.ant-slider-track{position:absolute;height:4px;background-color:#f7ae83;border-radius:2px;transition:background-color .3s}.ant-slider-handle{position:absolute;width:14px;height:14px;margin-top:-5px;background-color:#fff;border:solid 2px #f7ae83;border-radius:50%;box-shadow:0;cursor:pointer;transition:border-color .3s,box-shadow .6s,transform .3s cubic-bezier(.18,.89,.32,1.28)}.ant-slider-handle-dragging.ant-slider-handle-dragging.ant-slider-handle-dragging{border-color:#d9653b;box-shadow:0 0 0 5px #d03f0a1f}.ant-slider-handle:focus{border-color:#d9653b;outline:none;box-shadow:0 0 0 5px #d03f0a1f}.ant-slider-handle.ant-tooltip-open{border-color:#d03f0a}.ant-slider:hover .ant-slider-rail{background-color:#e1e1e1}.ant-slider:hover .ant-slider-track{background-color:#eb8857}.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open){border-color:#eb8857}.ant-slider-mark{position:absolute;top:14px;left:0;width:100%;font-size:14px}.ant-slider-mark-text{position:absolute;display:inline-block;color:#00000073;text-align:center;word-break:keep-all;cursor:pointer;user-select:none}.ant-slider-mark-text-active{color:#000000d9}.ant-slider-step{position:absolute;width:100%;height:4px;background:transparent}.ant-slider-dot{position:absolute;top:-2px;width:8px;height:8px;margin-left:-4px;background-color:#fff;border:2px solid #f0f0f0;border-radius:50%;cursor:pointer}.ant-slider-dot:first-child{margin-left:-4px}.ant-slider-dot:last-child{margin-left:-4px}.ant-slider-dot-active{border-color:#e89f85}.ant-slider-disabled{cursor:not-allowed}.ant-slider-disabled .ant-slider-rail{background-color:#f5f5f5!important}.ant-slider-disabled .ant-slider-track{background-color:#00000040!important}.ant-slider-disabled .ant-slider-handle,.ant-slider-disabled .ant-slider-dot{background-color:#fff;border-color:#00000040!important;box-shadow:none;cursor:not-allowed}.ant-slider-disabled .ant-slider-mark-text,.ant-slider-disabled .ant-slider-dot{cursor:not-allowed!important}.ant-slider-rtl{direction:rtl}.ant-slider-rtl .ant-slider-mark{right:0;left:auto}.ant-slider-rtl .ant-slider-dot,.ant-slider-rtl .ant-slider-dot:first-child{margin-right:-4px;margin-left:0}.ant-slider-rtl .ant-slider-dot:last-child{margin-right:-4px;margin-left:0}.num-input[data-v-bd954eda]{display:flex}.num-input .slide[data-v-bd954eda]{flex:1;min-width:128px;max-width:256px;margin-left:8px}
.ant-slider{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;height:12px;margin:10px 6px;padding:4px 0;cursor:pointer;touch-action:none}.ant-slider-vertical{width:12px;height:100%;margin:6px 10px;padding:0 4px}.ant-slider-vertical .ant-slider-rail{width:4px;height:100%}.ant-slider-vertical .ant-slider-track{width:4px}.ant-slider-vertical .ant-slider-handle{margin-top:-6px;margin-left:-5px}.ant-slider-vertical .ant-slider-mark{top:0;left:12px;width:18px;height:100%}.ant-slider-vertical .ant-slider-mark-text{left:4px;white-space:nowrap}.ant-slider-vertical .ant-slider-step{width:4px;height:100%}.ant-slider-vertical .ant-slider-dot{top:auto;left:2px;margin-bottom:-4px}.ant-slider-tooltip .ant-tooltip-inner{min-width:unset}.ant-slider-rtl.ant-slider-vertical .ant-slider-handle{margin-right:-5px;margin-left:0}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark{right:12px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark-text{right:4px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-dot{right:2px;left:auto}.ant-slider-with-marks{margin-bottom:28px}.ant-slider-rail{position:absolute;width:100%;height:4px;background-color:#f5f5f5;border-radius:2px;transition:background-color .3s}.ant-slider-track{position:absolute;height:4px;background-color:#f7ae83;border-radius:2px;transition:background-color .3s}.ant-slider-handle{position:absolute;width:14px;height:14px;margin-top:-5px;background-color:#fff;border:solid 2px #f7ae83;border-radius:50%;box-shadow:0;cursor:pointer;transition:border-color .3s,box-shadow .6s,transform .3s cubic-bezier(.18,.89,.32,1.28)}.ant-slider-handle-dragging.ant-slider-handle-dragging.ant-slider-handle-dragging{border-color:#d9653b;box-shadow:0 0 0 5px #d03f0a1f}.ant-slider-handle:focus{border-color:#d9653b;outline:none;box-shadow:0 0 0 5px #d03f0a1f}.ant-slider-handle.ant-tooltip-open{border-color:#d03f0a}.ant-slider:hover .ant-slider-rail{background-color:#e1e1e1}.ant-slider:hover .ant-slider-track{background-color:#eb8857}.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open){border-color:#eb8857}.ant-slider-mark{position:absolute;top:14px;left:0;width:100%;font-size:14px}.ant-slider-mark-text{position:absolute;display:inline-block;color:#00000073;text-align:center;word-break:keep-all;cursor:pointer;user-select:none}.ant-slider-mark-text-active{color:#000000d9}.ant-slider-step{position:absolute;width:100%;height:4px;background:transparent}.ant-slider-dot{position:absolute;top:-2px;width:8px;height:8px;margin-left:-4px;background-color:#fff;border:2px solid #f0f0f0;border-radius:50%;cursor:pointer}.ant-slider-dot:first-child{margin-left:-4px}.ant-slider-dot:last-child{margin-left:-4px}.ant-slider-dot-active{border-color:#e89f85}.ant-slider-disabled{cursor:not-allowed}.ant-slider-disabled .ant-slider-rail{background-color:#f5f5f5!important}.ant-slider-disabled .ant-slider-track{background-color:#00000040!important}.ant-slider-disabled .ant-slider-handle,.ant-slider-disabled .ant-slider-dot{background-color:#fff;border-color:#00000040!important;box-shadow:none;cursor:not-allowed}.ant-slider-disabled .ant-slider-mark-text,.ant-slider-disabled .ant-slider-dot{cursor:not-allowed!important}.ant-slider-rtl{direction:rtl}.ant-slider-rtl .ant-slider-mark{right:0;left:auto}.ant-slider-rtl .ant-slider-dot,.ant-slider-rtl .ant-slider-dot:first-child{margin-right:-4px;margin-left:0}.ant-slider-rtl .ant-slider-dot:last-child{margin-right:-4px;margin-left:0}.num-input[data-v-55978858]{display:flex}.num-input .slide[data-v-55978858]{flex:1;min-width:128px;max-width:256px;margin-left:8px}

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

View File

@ -1 +1 @@
import{d as j,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,cY as ce,cZ as de,ak as ue,ai as me,T as fe,a0 as pe}from"./index-157194fb.js";import{u as ve,c as ge,a as ke,F as we,d as he}from"./FileItem-6ddd7179.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-f7eadb70.js";import"./numInput.vue_vue_type_style_index_0_scoped_bd954eda_lang-2254804f.js";/* empty css */import"./index-8e3285c7.js";import"./_isIterateeCall-e2252db1.js";import"./index-8929347d.js";import"./index-11d9431b.js";import"./shortcut-f1e6388a.js";import"./Checkbox-431074e2.js";import"./index-89286149.js";const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=j({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),P=()=>{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(()=>{P()},2e3)});const{stackViewEl:K,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:Y,onContextMenuClick:q,onFileItemClick:H}=Se({openNext:de}),{previewIdx:o,previewing:y,onPreviewVisibleChange:J,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,Q=me,X=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:K},[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(X,{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(Q,{active:"",loading:!e(Y).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(J),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(H),onTiktokView:(Re,Z)=>e(z)(l.value,Z)},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 We=pe(Fe,[["__scopeId","data-v-e1531e89"]]);export{We as default};
import{d as j,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,cY as ce,cZ as de,ak as ue,ai as me,T as fe,a0 as pe}from"./index-64cbe4df.js";import{u as ve,c as ge,a as ke,F as we,d as he}from"./FileItem-2b09179d.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-e2324426.js";import"./numInput.vue_vue_type_style_index_0_scoped_55978858_lang-4748a0d9.js";/* empty css */import"./index-53055c61.js";import"./_isIterateeCall-e4f71c4d.js";import"./index-8c941714.js";import"./index-01c239de.js";import"./shortcut-86575428.js";import"./Checkbox-65a2741e.js";import"./index-f0ba7b9c.js";const Ve={class:"refresh-button"},Me={class:"hint"},Te={key:0,class:"preview-switch"},Fe=j({__name:"randomImage",props:{tabIdx:{},paneIdx:{},id:{},paneKey:{}},setup(Ne){const B=ee(),m=F(!1),l=F([]),r=l,h=te(`${le}randomImageSettingNotificationShown`,!1),P=()=>{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(()=>{P()},2e3)});const{stackViewEl:K,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:Y,onContextMenuClick:q,onFileItemClick:H}=Se({openNext:de}),{previewIdx:o,previewing:y,onPreviewVisibleChange:J,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,Q=me,X=fe;return v(),N("div",{class:"container",ref_key:"stackViewEl",ref:K},[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(X,{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(Q,{active:"",loading:!e(Y).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(J),"is-selected-mutil-files":e(p).length>1,selected:e(p).includes(T),onFileItemClick:e(H),onTiktokView:(Re,Z)=>e(z)(l.value,Z)},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 We=pe(Fe,[["__scopeId","data-v-49082269"]]);export{We as default};

View File

@ -1 +1 @@
.container[data-v-e1531e89]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-e1531e89]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-e1531e89]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary);padding:4px;display:flex;align-items:center;gap:8px}.container .file-list[data-v-e1531e89]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-e1531e89]{text-align:center;font-size:2em;padding:30vh 128px 0}
.container[data-v-49082269]{background:var(--zp-secondary-background);height:100%;overflow:auto;display:flex;flex-direction:column}.container .actions-panel[data-v-49082269]{padding:8px;background-color:var(--zp-primary-background)}.container .refresh-button[data-v-49082269]{position:absolute;top:90%;left:50%;transform:translate(-50%,-50%);z-index:99;background:white;border-radius:9999px;box-shadow:0 0 20px var(--zp-secondary);padding:4px;display:flex;align-items:center;gap:8px}.container .file-list[data-v-49082269]{flex:1;list-style:none;padding:8px;height:var(--pane-max-height);width:100%}.container .file-list .hint[data-v-49082269]{text-align:center;font-size:2em;padding:30vh 128px 0}

View File

@ -1 +0,0 @@
[data-v-fff181dd] .ant-row .ant-col:nth-child(1){font-weight:700}.record-container[data-v-fff181dd]{list-style:none;padding:8px;margin:16px;max-height:50vh;overflow:auto}.record[data-v-fff181dd]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid var(--zp-tertiary);position:relative;flex-wrap:nowrap;transition:all .3s ease}.record[data-v-fff181dd]:hover{background:var(--zp-secondary-background)}.record .rec-actions[data-v-fff181dd]{user-select:none;display:flex;gap:8px}.record .pin[data-v-fff181dd]{cursor:pointer;padding:4px 8px;border-radius:4px;transition:all .3s ease}.record .pin[data-v-fff181dd]:hover{background:var(--zp-primary-background)}

View File

@ -1 +1 @@
import{R as y,C as v}from"./index-b39f3e91.js";import{cw as f,c as d,A as w,d as P,U as a,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-157194fb.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(w,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=P({__name:"HistoryRecord",props:{records:{}},emits:["reuseRecord"],setup(t){return(e,s)=>{const n=$;return a(),c("div",null,[r("ul",F,[(a(!0),c(S,null,V(e.records.getRecords(),i=>(a(),c("li",{key:i.id,class:"record"},[r("div",k,[O(e.$slots,"default",{record:i},void 0,!0)]),r("div",I,[d(n,{onClick:g=>e.$emit("reuseRecord",i),type:"primary"},{default: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-fff181dd"]]);class o{constructor(e=128,s=[],n=[]){this.maxLength=e,this.records=s,this.pinnedValues=n}isPinned(e){return this.pinnedValues.some(s=>s.id===e.id)}add(e){this.records.length>=this.maxLength&&this.records.pop(),this.records.unshift({...e,id:H()+Date.now(),time:new Date().toLocaleString()})}pin(e){const s=this.records.findIndex(n=>n.id===e.id);s!==-1&&this.records.splice(s,1),this.pinnedValues.push(e)}unpin(e){const s=this.pinnedValues.findIndex(n=>n.id===e.id);s!==-1&&this.pinnedValues.splice(s,1),this.records.unshift(e)}switchPin(e){this.isPinned(e)?this.unpin(e):this.pin(e)}getRecords(){return[...this.pinnedValues,...this.records]}getPinnedValues(){return this.pinnedValues}}const G=_(`${m}fuzzy-search-HistoryRecord`,new o,{serializer:{read:t=>{const e=JSON.parse(t);return new o(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}}),M=_(`${m}tag-search-HistoryRecord`,new o,{serializer:{read:t=>{const e=JSON.parse(t);return new o(e.maxLength,e.records,e.pinnedValues)},write:JSON.stringify}});export{q as H,E as _,A as a,G as f,M as t};
import{R as y,C as v}from"./index-d2c56e4b.js";import{cw as f,c as d,A as w,d as P,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-64cbe4df.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(w,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=P({__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};

View File

@ -0,0 +1 @@
[data-v-834a248f] .ant-row .ant-col:nth-child(1){font-weight:700}.record-container[data-v-834a248f]{list-style:none;padding:8px;margin:16px;max-height:50vh;overflow:auto}.record[data-v-834a248f]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid var(--zp-tertiary);position:relative;flex-wrap:nowrap;transition:all .3s ease}.record[data-v-834a248f]:hover{background:var(--zp-secondary-background)}.record .rec-actions[data-v-834a248f]{user-select:none;display:flex;gap:8px}.record .pin[data-v-834a248f]{cursor:pointer;padding:4px 8px;border-radius:4px;transition:all .3s ease}.record .pin[data-v-834a248f]:hover{background:var(--zp-primary-background)}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#de632f}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.nprogress{pointer-events:none}.nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}.nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}.nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent .nprogress .spinner,.nprogress-custom-parent .nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.base-info[data-v-7f9c0b15]{position:absolute;padding:4px;font-size:.8em;background:var(--zp-primary-background);color:var(--zp-primary);left:0;bottom:0;border-top-right-radius:4px}.location-act[data-v-8d4bd42a]{margin-left:8px}.location-act .copy[data-v-8d4bd42a]{margin-right:4px}@media (max-width: 768px){.location-act[data-v-8d4bd42a]{display:flex;flex-direction:column}.location-act>*[data-v-8d4bd42a],.location-act .copy[data-v-8d4bd42a]{margin:2px}}.breadcrumb[data-v-8d4bd42a]{display:flex;align-items:center}.breadcrumb>*[data-v-8d4bd42a]{margin-right:4px}@media (max-width: 768px){.breadcrumb[data-v-8d4bd42a]{width:100%}.breadcrumb .ant-breadcrumb>*[data-v-8d4bd42a]{display:inline-block}}.container[data-v-8d4bd42a]{background:var(--zp-secondary-background);height:var(--pane-max-height)}.location-bar[data-v-8d4bd42a]{padding:4px 16px;background:var(--zp-primary-background);border-bottom:1px solid var(--zp-border);display:flex;align-items:center;justify-content:space-between}@media (max-width: 768px){.location-bar[data-v-8d4bd42a]{flex-direction:column}.location-bar[data-v-8d4bd42a] ::-webkit-scrollbar{height:2px;background-color:var(--zp-secondary-variant-background)}.location-bar .actions[data-v-8d4bd42a]{padding:4px 0;width:100%;overflow:auto;display:flex;align-items:center}.location-bar .actions>*[data-v-8d4bd42a]{flex-shrink:0}}.location-bar .actions[data-v-8d4bd42a]{display:flex;align-items:center;flex-shrink:0}.location-bar a.opt[data-v-8d4bd42a]{margin-left:8px}.view[data-v-8d4bd42a]{padding:8px;height:calc(100vh - 48px)}.view .file-list[data-v-8d4bd42a]{list-style:none;padding:8px;height:100%;overflow:auto}.hint[data-v-8d4bd42a]{padding:4px;border:4px;background:var(--zp-secondary-background);border:1px solid var(--zp-border)}
.ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#de632f}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.nprogress{pointer-events:none}.nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}.nprogress .peg{display:block;position:absolute;right:0px;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}.nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent .nprogress .spinner,.nprogress-custom-parent .nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.base-info[data-v-afd25667]{position:absolute;padding:4px;font-size:.8em;background:var(--zp-primary-background);color:var(--zp-primary);left:0;bottom:0;border-top-right-radius:4px}.location-act[data-v-317d328e]{margin-left:8px}.location-act .copy[data-v-317d328e]{margin-right:4px}@media (max-width: 768px){.location-act[data-v-317d328e]{display:flex;flex-direction:column}.location-act>*[data-v-317d328e],.location-act .copy[data-v-317d328e]{margin:2px}}.breadcrumb[data-v-317d328e]{display:flex;align-items:center}.breadcrumb>*[data-v-317d328e]{margin-right:4px}@media (max-width: 768px){.breadcrumb[data-v-317d328e]{width:100%}.breadcrumb .ant-breadcrumb>*[data-v-317d328e]{display:inline-block}}.container[data-v-317d328e]{background:var(--zp-secondary-background);height:var(--pane-max-height)}.location-bar[data-v-317d328e]{padding:4px 16px;background:var(--zp-primary-background);border-bottom:1px solid var(--zp-border);display:flex;align-items:center;justify-content:space-between}@media (max-width: 768px){.location-bar[data-v-317d328e]{flex-direction:column}.location-bar[data-v-317d328e] ::-webkit-scrollbar{height:2px;background-color:var(--zp-secondary-variant-background)}.location-bar .actions[data-v-317d328e]{padding:4px 0;width:100%;overflow:auto;display:flex;align-items:center}.location-bar .actions>*[data-v-317d328e]{flex-shrink:0}}.location-bar .actions[data-v-317d328e]{display:flex;align-items:center;flex-shrink:0}.location-bar a.opt[data-v-317d328e]{margin-left:8px}.view[data-v-317d328e]{padding:8px;height:calc(100vh - 48px)}.view .file-list[data-v-317d328e]{list-style:none;padding:8px;height:100%;overflow:auto}.hint[data-v-317d328e]{padding:4px;border:4px;background:var(--zp-secondary-background);border:1px solid var(--zp-border)}

View File

@ -1 +1 @@
import{u as G,g as d}from"./FileItem-6ddd7179.js";import{r as b,t as j,ct as m,cu as y,cv as D}from"./index-157194fb.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:f,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=f.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=f.value.length||f.value[t]==null||!("gen_info_obj"in f.value[t])||!("gen_info_obj"in f.value[t+e]))return a;const l=o,s=f.value[t+e].gen_info_obj;if(s==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=f.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in s)){a.diff[n]="+";continue}if(l[n]!=s[n])if(n.includes("rompt")&&l[n]!=""&&s[n]!=""){const p=l[n].split(","),C=s[n].split(",");let _=0;for(const v in p)p[v]!=C[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],s[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};
import{u as G,g as d}from"./FileItem-2b09179d.js";import{r as b,t as j,ct as m,cu as y,cv as D}from"./index-64cbe4df.js";const r=new Map,A=()=>{const{useEventListen:k,sortedFiles:f,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=f.value;return[o,u.value,t[o-1],t[o],t[o+1]]};function I(o,t,e,i){const a={diff:{},empty:!0,ownFile:"",otherFile:""};if(t+e<0||t+e>=f.value.length||f.value[t]==null||!("gen_info_obj"in f.value[t])||!("gen_info_obj"in f.value[t+e]))return a;const l=o,s=f.value[t+e].gen_info_obj;if(s==null)return a;const h=["hashes","resources"];a.diff={},a.ownFile=i.name,a.otherFile=f.value[t+e].name,a.empty=!1,u.value||h.push("seed");for(const n in l)if(!h.includes(n)){if(!(n in s)){a.diff[n]="+";continue}if(l[n]!=s[n])if(n.includes("rompt")&&l[n]!=""&&s[n]!=""){const p=l[n].split(","),C=s[n].split(",");let _=0;for(const v in p)p[v]!=C[v]&&_++;a.diff[n]=_}else a.diff[n]=[l[n],s[n]]}return a}return{getGenDiff:I,changeIndchecked:c,seedChangeChecked:u,getRawGenParams:()=>g(),getGenDiffWatchDep:F}};export{A as u};

4
vue/dist/index.html vendored
View File

@ -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-157194fb.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-af514ea9.css">
<script type="module" crossorigin src="/infinite_image_browsing/fe-static/assets/index-64cbe4df.js"></script>
<link rel="stylesheet" href="/infinite_image_browsing/fe-static/assets/index-d385cc4f.css">
</head>
<body>

View File

@ -27,6 +27,7 @@ export const de: Partial<IIBI18nMap> = {
tagGraphAllLayers: 'Alle Ebenen',
tagGraphFilterPlaceholder: 'Stichwort-Filter (Treffer + Nachbarn)',
tagGraphFilterHopsTitle: 'Erweitern (N Hops)',
tagGraphKeywordLimitTitle: 'Maximale Keywords in der Tag-Ebene',
tagGraphFilterApply: 'Filtern',
tagGraphFilterReset: 'Zurücksetzen',
tagGraphTooltipFilter: 'Filtern',
@ -61,8 +62,12 @@ export const de: Partial<IIBI18nMap> = {
topicSearchScopePlaceholder: 'Ordner auswählen (Mehrfachauswahl)',
topicSearchRecallMsg: '{0} / {1} abgerufen (TopK={2})',
topicSearchCacheStale: 'Zwischengespeichertes Ergebnis wird angezeigt (Update verfügbar)',
topicSearchCacheStaleDesc: 'Ordner im ausgewählten Bereich könnten geändert worden sein. Der Cache könnte veraltet sein. Klicken Sie auf „Update, um Themen neu zu erzeugen (Index wird zuerst aktualisiert).',
topicSearchCacheStaleDesc: 'Ordner im ausgewählten Bereich könnten geändert worden sein. Der Cache könnte veraltet sein. Klicken Sie auf „Update", um Themen neu zu erzeugen (Index wird zuerst aktualisiert).',
topicSearchCacheUpdate: 'Cache aktualisieren',
topicSearchCacheHit: 'Zwischengespeichertes Ergebnis',
topicSearchCacheHitDesc: 'Zeigt zwischengespeicherte Themen aus früheren Analysen an. Klicken Sie auf Update, um neu zu erzeugen.',
topicSearchCollapse: 'Einklappen',
topicSearchExpand: 'Ausklappen',
topicSearchGuideTitle: 'Schnellstart (Experimentell)',
topicSearchGuideStep1: 'Wählen Sie die Ordner (Bereich) zur Analyse aus (Mehrfachauswahl)',

View File

@ -42,6 +42,10 @@ export const en: IIBI18nMap = {
topicSearchCacheStale: 'Showing cached result (update available)',
topicSearchCacheStaleDesc: 'Folders in the selected scope may have changed. The cache may be stale. Click Update to regenerate topics (will update index first).',
topicSearchCacheUpdate: 'Update cache',
topicSearchCacheHit: 'Showing cached result',
topicSearchCacheHitDesc: 'Displaying cached topics from previous analysis. Click Update to regenerate.',
topicSearchCollapse: 'Collapse',
topicSearchExpand: 'Expand',
topicSearchGuideTitle: 'Quick Start (Experimental)',
topicSearchGuideStep1: 'Select the scope folders to analyze (multi-select)',
@ -264,6 +268,7 @@ You can specify which snapshot to restore to when starting IIB in the global set
tagGraphAllLayers: 'All layers',
tagGraphFilterPlaceholder: 'Keyword filter (match + neighbors)',
tagGraphFilterHopsTitle: 'Expand hops (N)',
tagGraphKeywordLimitTitle: 'Maximum keywords to display in Tag layer',
tagGraphFilterApply: 'Filter',
tagGraphFilterReset: 'Reset',
tagGraphTooltipFilter: 'Filter',

View File

@ -40,6 +40,10 @@ export const zhHans = {
topicSearchCacheStale: '已显示缓存结果(可更新)',
topicSearchCacheStaleDesc: '检测到范围内文件夹可能有变更,缓存可能已过期。可点击更新重新生成主题(会先更新索引)。',
topicSearchCacheUpdate: '更新缓存',
topicSearchCacheHit: '已显示缓存结果',
topicSearchCacheHitDesc: '显示之前的缓存主题。点击更新重新生成。',
topicSearchCollapse: '收起',
topicSearchExpand: '展开',
topicSearchGuideTitle: '快速上手(实验性)',
topicSearchGuideStep1: '选择要分析的文件夹范围(可多选)',
@ -281,6 +285,7 @@ export const zhHans = {
tagGraphAllLayers: '全部层级',
tagGraphFilterPlaceholder: '关键字过滤(命中 + 上下游)',
tagGraphFilterHopsTitle: '扩展层数N 跳)',
tagGraphKeywordLimitTitle: '标签层最大显示关键词数',
tagGraphFilterApply: '筛选',
tagGraphFilterReset: '重置',
tagGraphTooltipFilter: '过滤',

View File

@ -42,6 +42,10 @@ export const zhHant: Partial<IIBI18nMap> = {
topicSearchCacheStale: '已顯示快取結果(可更新)',
topicSearchCacheStaleDesc: '偵測到範圍內資料夾可能有變更,快取可能已過期。可點擊更新重新生成主題(會先更新索引)。',
topicSearchCacheUpdate: '更新快取',
topicSearchCacheHit: '已顯示快取結果',
topicSearchCacheHitDesc: '顯示之前的快取主題。點擊更新重新生成。',
topicSearchCollapse: '收合',
topicSearchExpand: '展開',
topicSearchGuideTitle: '快速上手(實驗性)',
topicSearchGuideStep1: '選擇要分析的資料夾範圍(可多選)',
@ -288,6 +292,7 @@ export const zhHant: Partial<IIBI18nMap> = {
tagGraphAllLayers: '全部層級',
tagGraphFilterPlaceholder: '關鍵字過濾(命中 + 上下游)',
tagGraphFilterHopsTitle: '擴展層數N 跳)',
tagGraphKeywordLimitTitle: '標籤層最大顯示關鍵詞數',
tagGraphFilterApply: '篩選',
tagGraphFilterReset: '重置',
tagGraphTooltipFilter: '過濾',

View File

@ -45,6 +45,15 @@
style="width: 92px;"
:title="t('tagGraphFilterHopsTitle')"
/>
<a-input-number
v-model:value="filterKeywordLimit"
size="small"
:min="10"
:max="1000"
:step="10"
style="width: 100px;"
:title="t('tagGraphKeywordLimitTitle')"
/>
<a-button size="small" @click="applyFilterManual">{{ t('tagGraphFilterApply') }}</a-button>
<a-button size="small" @click="resetFilter">{{ t('tagGraphFilterReset') }}</a-button>
<a-button
@ -66,6 +75,7 @@
</template>
<script setup lang="ts">
/* eslint-disable */
import { computed, ref, onMounted, watch, nextTick, onUnmounted } from 'vue'
import { getClusterTagGraph, getClusterTagGraphClusterPaths, type TagGraphReq, type TagGraphResp } from '@/api/db'
import { message } from 'ant-design-vue'
@ -104,6 +114,12 @@ const filterKeyword = ref<string>('')
const filterHops = ref<number>(3)
// When set, filter is anchored to this exact node id (so same-layer only keeps that node itself)
const filterExactNodeId = ref<string>('')
// Maximum number of keywords to display in Tag layer (prevents ECharts performance issues)
// Higher = more keywords but slower rendering. 200 is a good balance for typical image datasets.
const filterKeywordLimit = ref<number>(200)
// Temporary storage for expansion hops when filtering by node
const _tempHopsUp = ref<number>(0)
const _tempHopsDown = ref<number>(0)
const isFullscreen = ref(false)
const toggleFullscreen = async () => {
@ -142,6 +158,8 @@ const layerColors = [
'#7B68EE', // Layer 1: Tags - Purple
'#50C878', // Layer 2: Abstract-1 - Green
'#FF6B6B', // Layer 3: Abstract-2 - Red
'#FFD700', // Layer 4: Abstract-3 - Yellow
'#FF8C00', // Layer 5: Abstract-4 - Dark Orange
]
const getLayerColor = (layer: number): string => {
@ -164,7 +182,10 @@ const fetchGraphData = async () => {
}
graphData.value = await getClusterTagGraph(req)
displayGraphData.value = graphData.value
displayGraphData.value = {
...graphData.value,
layers: limitTagLayer(graphData.value.layers as any[], filterKeywordLimit.value || 200)
}
} catch (err: any) {
const detail = err.response?.data?.detail
error.value =
@ -186,16 +207,34 @@ const refreshChart = () => {
})
}
const limitTagLayer = (layers: any[], keywordLimit: number): any[] => {
const result: any[] = []
for (const l of layers) {
let nodes = l?.nodes ?? []
const layerLevel = Number(l?.level ?? 0)
if (layerLevel === 1 && nodes.length > keywordLimit) {
nodes = nodes.sort((a: any, b: any) => (b.size || 0) - (a.size || 0)).slice(0, keywordLimit)
}
if (nodes.length) {
result.push({ ...l, nodes })
}
}
return result
}
const applyFilterCore = () => {
const raw = graphData.value
if (!raw) return
const keyword = (filterKeyword.value || '').trim().toLowerCase()
const layer = filterLayer.value
const hops = Math.max(1, Math.min(20, Number(filterHops.value || 1)))
const keywordLimit = filterKeywordLimit.value || 200
// No filter -> show all
// No filter -> show all but still apply keyword limit
if (!filterExactNodeId.value && !keyword && (layer === '__all__' || !layer)) {
displayGraphData.value = raw
displayGraphData.value = {
...raw,
layers: limitTagLayer(raw.layers as any[], keywordLimit)
}
refreshChart()
return
}
@ -231,7 +270,7 @@ const applyFilterCore = () => {
}
const links = raw.links as any[]
// 2) include matched + N-hop neighbors (both directions)
// 2) Build adjacency for direction-aware filtering
const adj = new Map<string, Set<string>>()
const addEdge = (a: string, b: string) => {
if (!a || !b) return
@ -247,28 +286,105 @@ const applyFilterCore = () => {
}
const include = new Set<string>()
const q: Array<{ id: string; d: number }> = []
for (const id of matched) {
include.add(id)
q.push({ id, d: 0 })
}
while (q.length) {
const cur = q.shift()!
if (cur.d >= hops) continue
const ns = adj.get(cur.id)
if (!ns) continue
for (const nxt of ns) {
if (!include.has(nxt)) {
include.add(nxt)
q.push({ id: nxt, d: cur.d + 1 })
if (filterExactNodeId.value) {
// 3) Direction-aware BFS for exact node filtering
const startNode = nodeById.get(filterExactNodeId.value)
if (!startNode) return
const hopsUp = _tempHopsUp.value
const hopsDown = _tempHopsDown.value
// Separate upward expansion (to higher levels)
const expandUpward = (startId: string, maxHops: number) => {
const visited = new Set<string>([startId])
const q: Array<{ id: string; d: number }> = [{ id: startId, d: 0 }]
while (q.length) {
const cur = q.shift()!
if (cur.d >= maxHops) continue
const ns = adj.get(cur.id)
if (!ns) continue
const curNode = nodeById.get(cur.id)
const curLevel = curNode?.layerLevel ?? 0
for (const nxt of ns) {
if (visited.has(nxt)) continue
const nxtNode = nodeById.get(nxt)
const nxtLevel = nxtNode?.layerLevel ?? 0
// Only allow upward moves (to higher levels)
if (nxtLevel > curLevel) {
visited.add(nxt)
include.add(nxt)
q.push({ id: nxt, d: cur.d + 1 })
}
}
}
}
// Separate downward expansion (to lower levels)
const expandDownward = (startId: string, maxHops: number) => {
const visited = new Set<string>([startId])
const q: Array<{ id: string; d: number }> = [{ id: startId, d: 0 }]
while (q.length) {
const cur = q.shift()!
if (cur.d >= maxHops) continue
const ns = adj.get(cur.id)
if (!ns) continue
const curNode = nodeById.get(cur.id)
const curLevel = curNode?.layerLevel ?? 0
for (const nxt of ns) {
if (visited.has(nxt)) continue
const nxtNode = nodeById.get(nxt)
const nxtLevel = nxtNode?.layerLevel ?? 0
// Only allow downward moves (to lower levels)
if (nxtLevel < curLevel) {
visited.add(nxt)
include.add(nxt)
q.push({ id: nxt, d: cur.d + 1 })
}
}
}
}
// Add start node
include.add(filterExactNodeId.value)
// Expand upward
if (hopsUp > 0) {
expandUpward(filterExactNodeId.value, hopsUp)
}
// Expand downward
if (hopsDown > 0) {
expandDownward(filterExactNodeId.value, hopsDown)
}
} else {
// Manual mode: include all matched nodes (no hops limit)
for (const id of matched) {
include.add(id)
}
}
// 3) filter layers/nodes
// 4) filter layers/nodes
const filteredLayers: any[] = []
for (const l of raw.layers as any[]) {
const nodes = (l?.nodes ?? []).filter((n: any) => include.has(String(n?.id ?? '')))
let nodes = (l?.nodes ?? []).filter((n: any) => include.has(String(n?.id ?? '')))
const layerLevel = Number(l?.level ?? 0)
if (layerLevel === 1 && nodes.length > keywordLimit) {
nodes = nodes.sort((a: any, b: any) => (b.size || 0) - (a.size || 0)).slice(0, keywordLimit)
}
if (nodes.length) {
filteredLayers.push({ ...l, nodes })
}
@ -300,12 +416,26 @@ const applyFilterByNode = (nodeId: string, layerName: string, nodeName: string,
filterKeyword.value = nodeName || ''
filterExactNodeId.value = nodeId
// Suggested hops to reach Abstract-2 from different starting layers:
// cluster -> tag -> abstract-1 -> abstract-2 : 3 hops
// tag -> abstract-1 -> abstract-2 : 2 hops
// abstract-1 -> abstract-2 : 1 hop
const suggested = nodeType === 'cluster' ? 3 : (nodeType === 'tag' ? 2 : (nodeType === 'abstract' ? 1 : 2))
filterHops.value = Math.max(Number(filterHops.value || 1), suggested)
// Calculate hops based on node type to show full hierarchy path
// cluster (0) -> needs hopsUp=3 to reach abstract-2 (3)
// tag (1) -> needs hopsUp=2 to reach abstract-2 (3), hopsDown=1 to reach clusters (0)
// abstract-1 (2) -> needs hopsUp=1 to reach abstract-2 (3), hopsDown=2 to reach clusters (0)
// abstract-2 (3) -> needs hopsDown=3 to reach clusters (0)
if (nodeType === 'cluster') {
_tempHopsUp.value = 3
_tempHopsDown.value = 0
} else if (nodeType === 'tag') {
_tempHopsUp.value = 2
_tempHopsDown.value = 1
} else if (nodeType === 'abstract') {
_tempHopsUp.value = 1
_tempHopsDown.value = 2
} else {
_tempHopsUp.value = 2
_tempHopsDown.value = 2
}
applyFilterCore()
}
@ -314,7 +444,12 @@ const resetFilter = () => {
filterKeyword.value = ''
filterHops.value = 3
filterExactNodeId.value = ''
if (graphData.value) displayGraphData.value = graphData.value
if (graphData.value) {
displayGraphData.value = {
...graphData.value,
layers: limitTagLayer(graphData.value.layers as any[], filterKeywordLimit.value || 200)
}
}
refreshChart()
}
@ -331,32 +466,109 @@ const renderChart = () => {
chartInstance = echarts.init(chartRef.value)
const layers = displayGraphData.value.layers
// Reverse to show abstract on left
// Reverse to show abstract on left (Cluster layer on rightmost after reverse)
const reversedLayers = [...layers].reverse()
// Build nodes with scattered positions for better visualization
// Build nodes with improved layer-based layout
const nodes: any[] = []
const layerSpacing = 1500 / (reversedLayers.length + 1) // Increased from 1000 to 1200
const horizontalRange = 200 // Horizontal scatter range
// Canvas height for node placement
const graphHeight = 2400
// Minimum/maximum horizontal distance between nodes within the same layer
// Adjusted dynamically based on number of nodes to fit more in limited space
const minNodeSpacing = 120
const maxNodeSpacing = 180
_indexById = {}
reversedLayers.forEach((layer, layerIdx) => {
const baseX = layerSpacing * (layerIdx + 1)
// First pass: calculate layer widths for spacing
const layerWidths: number[] = []
for (const layer of reversedLayers) {
const numNodes = layer.nodes.length
const verticalSpacing = 800 / (numNodes + 1)
if (numNodes === 0) {
layerWidths.push(0)
continue
}
const spacingFactor = Math.max(0.3, 1 - numNodes / 500)
const nodeSpacing = minNodeSpacing + (maxNodeSpacing - minNodeSpacing) * spacingFactor
const gridSize = Math.ceil(Math.sqrt(numNodes))
const cols = gridSize
layerWidths.push(cols * nodeSpacing)
}
// Second pass: calculate positions with uniform gap based on adjacent layers
const layerPositions: Array<{ startX: number; width: number }> = []
let currentX = 300
reversedLayers.forEach((_, idx) => {
const layerWidth = layerWidths[idx]
if (layerWidth === 0) return
// Uniform gap: average of current and next layer width, multiplied by spacing factor
// This ensures consistent visual gap regardless of layer size differences
const nextLayerWidth = layerWidths[idx + 1] ?? layerWidth
const gapFactor = 0.5
const actualLayerSpacing = (layerWidth + nextLayerWidth) * gapFactor
layerPositions.push({ startX: currentX, width: layerWidth })
currentX += layerWidth + actualLayerSpacing
})
// Second pass: place nodes
reversedLayers.forEach((layer, layerIdx) => {
const numNodes = layer.nodes.length
if (numNodes === 0) return
const layerInfo = layerPositions[layerIdx]
const startX = layerInfo.startX
const spacingFactor = Math.max(0.3, 1 - numNodes / 500) * (layer.name.toLowerCase().includes("abstract") ? 2 : 1)
const nodeSpacing = minNodeSpacing + (maxNodeSpacing - minNodeSpacing) * spacingFactor
const gridSize = Math.ceil(Math.sqrt(numNodes))
const cols = gridSize
const rows = Math.ceil(numNodes / cols)
const layerHeight = rows * nodeSpacing
// Add vertical randomness to avoid perfect centering
const layerSeed = layer.nodes.reduce((acc, n) => acc + n.id.charCodeAt(0), 0)
const verticalOffset = ((layerSeed * 7) % 500) - 250 // -250 to +250
const startY = (graphHeight - layerHeight) / 2 + verticalOffset
// Place nodes with natural randomness to avoid perfect grid appearance
layer.nodes.forEach((node, nodeIdx) => {
const y = verticalSpacing * (nodeIdx + 1)
const row = Math.floor(nodeIdx / cols)
const col = nodeIdx % cols
// Add horizontal offset for visual spacing
// Alternate left/right based on index, with some randomness based on node id
const hashOffset = node.id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0)
const horizontalOffset = ((hashOffset % horizontalRange) - horizontalRange / 2)
const x = baseX + horizontalOffset
// Base grid position
let gridX = (col - (cols - 1) / 2) * nodeSpacing
let gridY = row * nodeSpacing
// Calculate size with max 3x ratio
// Deterministic random based on node ID
const seed = node.id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0)
// Add larger random offset (up to 80% of node spacing)
const randomAngle = (seed * 37.5) % (Math.PI * 2)
const randomRadius = nodeSpacing * 0.8 * ((seed * 13) % 100) / 100
// Also perturb grid position directly for more irregular layout
const gridPerturbX = nodeSpacing * 0.4 * ((seed * 23) % 100) / 100 - nodeSpacing * 0.2
const gridPerturbY = nodeSpacing * 0.4 * ((seed * 41) % 100) / 100 - nodeSpacing * 0.2
gridX += gridPerturbX
gridY += gridPerturbY
const offsetX = gridX + Math.cos(randomAngle) * randomRadius
const offsetY = gridY + Math.sin(randomAngle) * randomRadius
const x = startX + nodeSpacing / 2 + offsetX
const y = startY + offsetY
// Node size based on frequency (size = sqrt(frequency) scaled)
const minSize = 20
const maxSize = 60 // 3x ratio: 60 / 20 = 3
const maxSize = 60
const normalizedSize = Math.sqrt(node.size) / 5
const clampedSize = Math.max(minSize, Math.min(maxSize, minSize + normalizedSize))
@ -658,6 +870,16 @@ watch(
}
)
// Watch for keyword limit changes and apply filter immediately
watch(
filterKeywordLimit,
() => {
if (displayGraphData.value) {
applyFilterCore()
}
}
)
onMounted(() => {
// Rerender on window resize
_handleResize = () => {

View File

@ -38,6 +38,16 @@ const hideRequirements = () => {
showRequirements.value = false
}
// Cache result collapsed state
const _CACHE_COLLAPSED_KEY = 'iib_topic_search_cache_collapsed_v1'
const cacheResultCollapsed = useLocalStorage<boolean>(_CACHE_COLLAPSED_KEY, false)
const expandCacheResult = () => {
cacheResultCollapsed.value = false
}
const collapseCacheResult = () => {
cacheResultCollapsed.value = true
}
const job = ref<ClusterIibOutputJobStatusResp | null>(null)
const jobId = ref<string>('')
let _jobTimer: any = null
@ -446,22 +456,75 @@ watch(
</template>
</a-alert>
<a-alert
v-if="cacheInfo?.cache_hit && cacheInfo?.stale"
type="warning"
show-icon
style="margin: 10px 0 0 0;"
:message="$t('topicSearchCacheStale')"
<!-- Stale cache banner -->
<div
v-if="cacheInfo?.cache_hit && cacheInfo?.stale && !cacheResultCollapsed"
style="margin: 10px 0 0 0; position: relative;"
>
<template #description>
<div style="display: flex; align-items: center; gap: 10px; flex-wrap: wrap;">
<span style="opacity: 0.85;">{{ $t('topicSearchCacheStaleDesc') }}</span>
<a-alert
type="warning"
show-icon
:message="$t('topicSearchCacheStale')"
:description="$t('topicSearchCacheStaleDesc')"
>
<template #action>
<a-button size="small" :loading="loading || jobRunning" :disabled="g.conf?.is_readonly" @click="refresh">
{{ $t('topicSearchCacheUpdate') }}
</a-button>
</div>
</template>
</a-alert>
</template>
</a-alert>
<a-button
size="small"
style="position: absolute; top: 8px; right: 8px; z-index: 1;"
@click="collapseCacheResult"
>
^
</a-button>
</div>
<!-- Collapsed stale cache -->
<div
v-if="cacheInfo?.cache_hit && cacheInfo?.stale && cacheResultCollapsed"
style="margin: 10px 0 0 0; padding: 8px 12px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; display: flex; align-items: center; gap: 10px;"
>
<span>💾</span>
<a-button size="small" :loading="loading || jobRunning" :disabled="g.conf?.is_readonly" @click="refresh">
{{ $t('topicSearchCacheUpdate') }}
</a-button>
<a-button size="small" @click="expandCacheResult">
v
</a-button>
</div>
<!-- Fresh cache banner -->
<div
v-if="cacheInfo?.cache_hit && !cacheInfo?.stale && !cacheResultCollapsed"
style="margin: 10px 0 0 0; position: relative;"
>
<a-alert
type="success"
show-icon
:message="$t('topicSearchCacheHit')"
/>
<a-button
size="small"
style="position: absolute; top: 8px; right: 8px; z-index: 1;"
@click="collapseCacheResult"
>
^
</a-button>
</div>
<!-- Collapsed fresh cache -->
<div
v-if="cacheInfo?.cache_hit && !cacheInfo?.stale && cacheResultCollapsed"
style="margin: 10px 0 0 0; padding: 8px 12px; background: #f6ffed; border: 1px solid #b7eb8f; border-radius: 8px; display: flex; align-items: center; gap: 10px;"
>
<span></span>
<a-button size="small" @click="expandCacheResult">
v
</a-button>
</div>
<div v-if="jobRunning" style="margin: 10px 0 0 0;">
<a-alert type="info" show-icon :message="jobStageText" :description="jobDesc" />
@ -469,7 +532,7 @@ watch(
</div>
<!-- View Switcher -->
<div style="margin-top: 10px; display: flex; align-items: center; gap: 8px;">
<div style="margin : 10px 0; display: flex; align-items: center; gap: 8px;">
<span style="font-size: 13px; color: #666;">View:</span>
<a-switch
v-model:checked="activeTab"