Add desktop Batch toggle, fix xAIGen library hide/selection, per-engine steps/CFG, and mobile prompt editor.
Desktop Batch splits only on double blank lines when enabled; library hide actually conceals thumbs and pinned clicks stick; steps/CFG restore per image model; mobile opens a near-fullscreen prompt editor.
This commit is contained in:
@@ -9,5 +9,13 @@ export function normalizeStyles(value={}) {
|
||||
}
|
||||
export function toggleStyle(value,chip,negative=false) { const next=normalizeStyles(value),key=negative?'negative':'positive',other=negative?'positive':'negative';next[other]=next[other].filter(s=>s!==chip);next[key]=next[key].includes(chip)?next[key].filter(s=>s!==chip):[...next[key],chip];return next }
|
||||
export function stylePrompt(value,negative=false){return normalizeStyles(value)[negative?'negative':'positive'].join(', ')}
|
||||
/** Single blank line (mobile / video / edit batchText). */
|
||||
export function parseBatch(value){return String(value||'').split(/\r?\n\s*\r?\n/).map(s=>s.trim()).filter(Boolean)}
|
||||
/**
|
||||
* Desktop image Batch toggle: split only on a double blank line (two empty lines → \n\n\n+).
|
||||
* A single newline or a single blank line stays inside the same prompt.
|
||||
*/
|
||||
export function parseBatchDoubleBlank(value){
|
||||
return String(value||'').split(/\r?\n(?:[ \t]*\r?\n){2,}/).map(s=>s.trim()).filter(Boolean)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ export function folderAssets(library, jobs, folderId) {
|
||||
export function newestOutput(jobs, seen, folderId) {
|
||||
return jobs.filter(j=>j.request.folderId===folderId).flatMap(j=>j.outputs || []).filter(a=>!seen.has(a.id)).sort((a,b)=>(a.studio2?.savedAt || 0)-(b.studio2?.savedAt || 0)).at(-1) || null
|
||||
}
|
||||
export function reconcileSelection(selected, assets) { return assets.find(a=>a.id===selected?.id) || assets.at(-1) || null }
|
||||
export function reconcileSelection(selected, assets) {
|
||||
if (!selected?.id) return assets.at(-1) || null
|
||||
return assets.find(a => a.id === selected.id) || selected
|
||||
}
|
||||
export function activeJobs(jobs) { return jobs.filter(j=>['waking','enhancing','submitting','rendering','saving'].includes(j.state)) }
|
||||
export function previewHidden(asset, revealed, xaigen) {
|
||||
if (!xaigen || !asset?.id) return false
|
||||
|
||||
Reference in New Issue
Block a user