chore(plugins): promptlib 1.6.6 同步(节点封面修复)
This commit is contained in:
1 parent
c9c07e340c
commit
64d40b7ac6
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -46,7 +46,7 @@
|
||||
"style": "styles.css",
|
||||
"version": "1.5.0",
|
||||
"files": {
|
||||
"main.js": "e3ca1ab81500bad22d1aa7083639372f1665836891b432ac1acac7af4213fba7",
|
||||
"main.js": "4b93ace92ee4b1ac203b884bd2202ab7b825359011f0b3ce9682b22c811992e2",
|
||||
"styles.css": "872ceeded7eb67599dfa159c86be1b1e1724f7cd1e04cae1d79d939bb0e1ebdf"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
function fileApi (ctx) {
|
||||
if (ctx.files && typeof ctx.files.put === 'function') return ctx.files
|
||||
var P = ctx.promptlib
|
||||
if (P && typeof P.filePut === 'function') {
|
||||
if (P && typeof P.fileGet === 'function') {
|
||||
return {
|
||||
put: function (n, d) { return P.filePut(n, d) },
|
||||
get: function (n) { return P.fileGet(n) },
|
||||
@@ -1598,7 +1598,7 @@
|
||||
}
|
||||
if (!on || !key) { done(''); return }
|
||||
if (typeof cover === 'string' && cover.indexOf('data:') === 0) { done(cover); return }
|
||||
if (ctx.files) Promise.resolve(ctx.files.get(key)).then(function (r) { done(r && r.ok ? r.url : '') }).catch(function () { done('') })
|
||||
if (fileApi(ctx)) Promise.resolve(fileApi(ctx).get(key)).then(function (r) { done(r && r.ok ? r.url : '') }).catch(function () { done('') })
|
||||
else done('')
|
||||
})
|
||||
return st
|
||||
@@ -1644,7 +1644,7 @@
|
||||
if (url) { st.thumb.src = url; st.thumb.style.display = '' } else st.thumb.style.display = 'none'
|
||||
}
|
||||
if (typeof cover === 'string' && cover.indexOf('data:') === 0) show(cover)
|
||||
else if (coverKey && ctx.files) Promise.resolve(ctx.files.get(coverKey)).then(function (r) { show(r && r.ok ? r.url : '') }).catch(function () { show('') })
|
||||
else if (coverKey && fileApi(ctx)) Promise.resolve(fileApi(ctx).get(coverKey)).then(function (r) { show(r && r.ok ? r.url : '') }).catch(function () { show('') })
|
||||
else show('')
|
||||
}
|
||||
if (!coverKey) st.thumb.style.display = 'none'
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"提示词"
|
||||
],
|
||||
"files": {
|
||||
"main.js": "e3ca1ab81500bad22d1aa7083639372f1665836891b432ac1acac7af4213fba7",
|
||||
"main.js": "4b93ace92ee4b1ac203b884bd2202ab7b825359011f0b3ce9682b22c811992e2",
|
||||
"styles.css": "872ceeded7eb67599dfa159c86be1b1e1724f7cd1e04cae1d79d939bb0e1ebdf"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user