@aiyiran/myclaw 1.0.222 → 1.0.224
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.
|
@@ -507,11 +507,12 @@
|
|
|
507
507
|
coverDefaultOpt.value = '';
|
|
508
508
|
coverDefaultOpt.textContent = '\u4E0D\u9009\u62E9';
|
|
509
509
|
coverSelect.appendChild(coverDefaultOpt);
|
|
510
|
-
var
|
|
510
|
+
var imageTypes = ['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'bmp'];
|
|
511
|
+
var imageAssets = (cachedData.assets || []).filter(function (a) { return a.type && imageTypes.indexOf(a.type.toLowerCase()) !== -1; });
|
|
511
512
|
imageAssets.forEach(function (asset) {
|
|
512
513
|
var opt = document.createElement('option');
|
|
513
514
|
opt.value = asset.path;
|
|
514
|
-
opt.textContent = asset.
|
|
515
|
+
opt.textContent = asset.path;
|
|
515
516
|
coverSelect.appendChild(opt);
|
|
516
517
|
});
|
|
517
518
|
var coverPreview = document.createElement('img');
|
|
@@ -549,7 +550,7 @@
|
|
|
549
550
|
htmlAssets.forEach(function (asset) {
|
|
550
551
|
var opt = document.createElement('option');
|
|
551
552
|
opt.value = asset.path;
|
|
552
|
-
opt.textContent = asset.
|
|
553
|
+
opt.textContent = asset.path;
|
|
553
554
|
entrySelect.appendChild(opt);
|
|
554
555
|
});
|
|
555
556
|
entryGroup.appendChild(entryLabel);
|