style(ui): request that all types defined
- check in more restrictive mode = request types - define main types in static/js/core/types.js
This commit is contained in:
@@ -271,7 +271,7 @@ const fileOps = {
|
||||
|
||||
/**
|
||||
* Upload files to the server with real-time progress indication
|
||||
* @param {FileList} files - Files to upload
|
||||
* @param {FileList | File[]} files - Files to upload
|
||||
*/
|
||||
async uploadFiles(files) {
|
||||
const originalFiles = Array.from(files || []);
|
||||
|
||||
@@ -146,14 +146,14 @@ const search = {
|
||||
if (previousSearchHeader) {
|
||||
previousSearchHeader.replaceWith(searchHeader);
|
||||
} else {
|
||||
pageStickyHeader.appendChild(searchHeader);
|
||||
pageStickyHeader?.appendChild(searchHeader);
|
||||
}
|
||||
|
||||
// Sort dropdown — re-searches with new sort order (server-side)
|
||||
const sortSelect = document.getElementById('search-sort-select');
|
||||
const sortSelect = /** @type {HTMLSelectElement} */ (document.getElementById('search-sort-select'));
|
||||
if (sortSelect) {
|
||||
sortSelect.addEventListener('change', () => {
|
||||
const searchInput = document.querySelector('.search-container input');
|
||||
const searchInput = /** @type {HTMLInputElement} */ (document.querySelector('.search-container input'));
|
||||
if (searchInput?.value.trim()) {
|
||||
const event = new CustomEvent('search-resort', {
|
||||
detail: { sort_by: sortSelect.value }
|
||||
@@ -167,11 +167,12 @@ const search = {
|
||||
const clearSearchBtn = document.getElementById('clear-search-btn');
|
||||
if (clearSearchBtn) {
|
||||
clearSearchBtn.addEventListener('click', () => {
|
||||
document.querySelector('.search-container input').value = '';
|
||||
const searchInput = /** @type {HTMLInputElement} */ (document.querySelector('.search-container input'));
|
||||
searchInput.value = '';
|
||||
app.currentPath = '';
|
||||
app.isSearchMode = false;
|
||||
document.querySelector('.search-results-header')?.remove();
|
||||
ui.updateBreadcrumb('');
|
||||
ui.updateBreadcrumb();
|
||||
loadFiles();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
import { loadFiles } from '../../app/filesView.js';
|
||||
import { ui } from '../../app/ui.js';
|
||||
|
||||
class WopiEditor {
|
||||
constructor() {
|
||||
@@ -46,9 +47,7 @@ class WopiEditor {
|
||||
window.open(hostUrl, '_blank');
|
||||
} catch (error) {
|
||||
console.error('Failed to open WOPI editor in tab:', error);
|
||||
if (window.showNotification) {
|
||||
window.showNotification('Could not open the document editor.', 'error');
|
||||
}
|
||||
ui.showNotification('Could not open the document editor.', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user