@aiyiran/myclaw 1.0.221 → 1.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -285,10 +285,9 @@
|
|
|
285
285
|
row.onclick = function () {
|
|
286
286
|
if (isLatest && !isLatestSeen) localStorage.setItem(latestSeenKey, '1');
|
|
287
287
|
if (isUpdated && !isUpdateSeen) localStorage.setItem(updateSeenKey, '1');
|
|
288
|
+
openPreviewModal(data, asset);
|
|
288
289
|
if (asset.type === 'html') {
|
|
289
290
|
window.open(buildPreviewUrl(data, asset.path), '_blank');
|
|
290
|
-
} else {
|
|
291
|
-
openPreviewModal(data, asset);
|
|
292
291
|
}
|
|
293
292
|
};
|
|
294
293
|
|
|
@@ -416,6 +415,9 @@
|
|
|
416
415
|
function openPublishModal() {
|
|
417
416
|
if (document.querySelector('#myclaw-artifacts-publish-modal')) return;
|
|
418
417
|
if (!cachedData) return;
|
|
418
|
+
console.log('[myclaw-artifacts-publish] cachedData.assets:', cachedData.assets);
|
|
419
|
+
console.log('[myclaw-artifacts-publish] html assets:', cachedData.assets.filter(function (a) { return a.type && a.type.toLowerCase() === 'html'; }));
|
|
420
|
+
console.log('[myclaw-artifacts-publish] image assets:', cachedData.assets.filter(function (a) { return a.type && a.type.toLowerCase() === 'image'; }));
|
|
419
421
|
|
|
420
422
|
var overlay = document.createElement('div');
|
|
421
423
|
overlay.id = 'myclaw-artifacts-publish-modal';
|
|
@@ -505,7 +507,7 @@
|
|
|
505
507
|
coverDefaultOpt.value = '';
|
|
506
508
|
coverDefaultOpt.textContent = '\u4E0D\u9009\u62E9';
|
|
507
509
|
coverSelect.appendChild(coverDefaultOpt);
|
|
508
|
-
var imageAssets = (cachedData.assets || []).filter(function (a) { return a.type === 'image'; });
|
|
510
|
+
var imageAssets = (cachedData.assets || []).filter(function (a) { return a.type && a.type.toLowerCase() === 'image'; });
|
|
509
511
|
imageAssets.forEach(function (asset) {
|
|
510
512
|
var opt = document.createElement('option');
|
|
511
513
|
opt.value = asset.path;
|
|
@@ -543,7 +545,7 @@
|
|
|
543
545
|
entryDefaultOpt.value = '';
|
|
544
546
|
entryDefaultOpt.textContent = '\u4E0D\u9009\u62E9';
|
|
545
547
|
entrySelect.appendChild(entryDefaultOpt);
|
|
546
|
-
var htmlAssets = (cachedData.assets || []).filter(function (a) { return a.type === 'html'; });
|
|
548
|
+
var htmlAssets = (cachedData.assets || []).filter(function (a) { return a.type && a.type.toLowerCase() === 'html'; });
|
|
547
549
|
htmlAssets.forEach(function (asset) {
|
|
548
550
|
var opt = document.createElement('option');
|
|
549
551
|
opt.value = asset.path;
|