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:
+41
-1
@@ -3,15 +3,27 @@
|
||||
* Centralized mutable state for app and cached DOM references.
|
||||
*/
|
||||
|
||||
/** @import {FolderInfo} from '../core/types.js' */
|
||||
|
||||
export const app = {
|
||||
currentView: 'grid',
|
||||
|
||||
/** @type {string | null} */
|
||||
currentPath: '',
|
||||
currentFolder: null,
|
||||
|
||||
/** @type {FolderInfo | null} */
|
||||
currentFolderInfo: null,
|
||||
|
||||
/** @type {Object | null} */
|
||||
contextMenuTargetFolder: null,
|
||||
|
||||
/** @type {Object | null} */
|
||||
contextMenuTargetFile: null,
|
||||
selectedTargetFolderId: '',
|
||||
moveDialogMode: 'file',
|
||||
|
||||
/** @type {String | null} */
|
||||
currentSection: null, // will be defined on first call
|
||||
isSearchMode: false,
|
||||
shareDialogItem: null,
|
||||
@@ -19,8 +31,36 @@ export const app = {
|
||||
notificationShareUrl: null,
|
||||
userHomeFolderId: null,
|
||||
userHomeFolderName: null,
|
||||
/** @type {Object[]} */
|
||||
breadcrumbPath: [], // Array of {id, name} tracking folder navigation hierarchy
|
||||
|
||||
/** @type {String | null} */
|
||||
viewFile: null // current file in inline view
|
||||
};
|
||||
|
||||
export const appElements = {};
|
||||
export const appElements = {
|
||||
/** @type {HTMLElement | null} */
|
||||
uploadBtn: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
dropzone: null,
|
||||
/** @type {HTMLInputElement | null} */
|
||||
fileInput: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
filesList: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
newFolderBtn: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
gridViewBtn: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
listViewBtn: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
breadcrumb: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
pageTitle: null,
|
||||
/** @type {HTMLElement | null} */
|
||||
actionsBar: null,
|
||||
/** @type {NodeListOf<HTMLElement> | null} */
|
||||
navItems: null,
|
||||
/** @type {HTMLInputElement | null} */
|
||||
searchInput: null
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user