Prepare LaySite 1.4.5 site icons, Head settings and release images

This commit is contained in:
2026-11-27 21:21:41 +08:00
parent 1609e7fc39
commit 00e8a70e06
34 changed files with 686 additions and 36 deletions
+7 -6
View File
@@ -121,7 +121,7 @@ jQuery(function ($) {
$cards.each(function () {
const $card = $(this);
const mime = $card.data('mime');
const matchesType = category === 'other' ? !/^(image|audio|video)\//.test(mime) : mime.startsWith(category);
const matchesType = category === 'other' ? !/^(image|audio|video|text)\//.test(mime) : mime.startsWith(category);
const visible = matchesType && $card.data('search').toLowerCase().includes(query);
$card.prop('hidden', !visible);
if (visible) count++;
@@ -407,9 +407,10 @@ jQuery(function ($) {
let deletedSections = [];
const propertyInput = (name) => $propertyForm.find('[name="' + name + '"]');
const pageInput = (name) => $settings.find('[name="' + name + '"]');
const settingsSnapshot = () => $settings.serializeArray()
.filter(({name}) => !['csrf', 'canvas_sections', 'canvas_order', 'provider_secret'].includes(name));
let savedSettings = JSON.stringify(settingsSnapshot());
const settingsSnapshot = (includeHead = false) => $settings.serializeArray()
.filter(({name}) => !['csrf', 'canvas_sections', 'canvas_order', 'provider_secret'].includes(name)
&& (includeHead || name !== 'head_html'));
let savedSettings = JSON.stringify(settingsSnapshot(true));
let dialogAction;
let doc;
let activeBody;
@@ -620,7 +621,7 @@ jQuery(function ($) {
$(window).on('beforeunload', (event) => {
if (!saveComplete && (sectionChanges(false).length || pageInput('provider_secret').filter(':enabled').val()
|| initialOrder !== undefined && canvasOrder() !== initialOrder
|| JSON.stringify(settingsSnapshot()) !== savedSettings)) {
|| JSON.stringify(settingsSnapshot(true)) !== savedSettings)) {
event.preventDefault();
event.originalEvent.returnValue = '';
}
@@ -2355,7 +2356,7 @@ jQuery(function ($) {
initialOrder = canvasOrder();
syncMemberSettings();
syncPagePresentation();
savedSettings = JSON.stringify(settingsSnapshot());
savedSettings = JSON.stringify(settingsSnapshot(true));
history.length = 0;
historyIndex = 0;
lastHistoryGroup = null;