diff --git a/plugins/index.json b/plugins/index.json index ab5bbfd..2ea50b7 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -46,7 +46,7 @@ "style": "styles.css", "version": "1.5.0", "files": { - "main.js": "e3ca1ab81500bad22d1aa7083639372f1665836891b432ac1acac7af4213fba7", + "main.js": "4b93ace92ee4b1ac203b884bd2202ab7b825359011f0b3ce9682b22c811992e2", "styles.css": "872ceeded7eb67599dfa159c86be1b1e1724f7cd1e04cae1d79d939bb0e1ebdf" } }, diff --git a/plugins/promptlib/main.js b/plugins/promptlib/main.js index 68fac6e..e702a15 100644 --- a/plugins/promptlib/main.js +++ b/plugins/promptlib/main.js @@ -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' diff --git a/plugins/promptlib/manifest.json b/plugins/promptlib/manifest.json index dabd949..25e70f3 100644 --- a/plugins/promptlib/manifest.json +++ b/plugins/promptlib/manifest.json @@ -13,7 +13,7 @@ "提示词" ], "files": { - "main.js": "e3ca1ab81500bad22d1aa7083639372f1665836891b432ac1acac7af4213fba7", + "main.js": "4b93ace92ee4b1ac203b884bd2202ab7b825359011f0b3ce9682b22c811992e2", "styles.css": "872ceeded7eb67599dfa159c86be1b1e1724f7cd1e04cae1d79d939bb0e1ebdf" } }