Refactor: remove unused APIs, controllers, models and data files. Update: icon picker all system, Dashboard, Main UI more respone, Change: Logo, favicon.

This commit is contained in:
2026-04-23 18:44:37 +07:00
parent 8ce6cf3c7e
commit 4ba3eb4a82
48 changed files with 438 additions and 14850 deletions
+21 -2
View File
@@ -112,7 +112,13 @@
_renderGrid(ALL_ICONS);
}
new bootstrap.Modal(document.getElementById('iconPickerModal')).show();
const modal = new bootstrap.Modal(document.getElementById('iconPickerModal'));
modal.show();
document.getElementById('iconPickerModal').addEventListener('shown.bs.modal', function handler() {
document.getElementById('iconSearchInput').focus();
this.removeEventListener('shown.bs.modal', handler);
});
}
function _renderGrid(icons) {
@@ -137,10 +143,22 @@
`).join('');
document.fonts.ready.then(() => {
grid.style.visibility = 'visible';
grid.style.visibility = 'visible';
});
}
function iconPickerInput(cssClass, currentValue) {
return (
'<div class="input-group">' +
'<span class="input-group-text icon-preview-cell" style="min-width:38px">' +
(currentValue ? '<i class="' + escHtml(currentValue) + '"></i>' : '') +
'</span>' +
'<input type="text" class="form-control ' + cssClass + '" value="' + escHtml(currentValue) + '" ' +
'placeholder="Click to pick..." readonly style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">' +
'</div>'
);
}
function pick(value) {
if (!_targetInput) return;
_targetInput.value = value;
@@ -164,6 +182,7 @@
// ── Expose global ─────────────────────────────────────────────────────────
window.IconPicker = { init, open, pick };
window.IconPicker = { init, open, pick, inputHtml: iconPickerInput };
window.IconPicker.pick = pick;
window.IconPickerPick = pick;
})();