Files
Oxicloud/static/js/app/state.js
T
George Wu 6a9554d23f feat: add breadcrumb navigation and refactor SPA view management
- Add breadcrumb navigation with folder hierarchy display
- Create setCurrentSection() helper to centralize view state management
- Derive nav item section dynamically from DOM data-i18n attribute
- Remove remnant /shared page and consolidate to SPA sharedView
- Add search input to sharedView for client-side filtering
- Fix 'Go to Files' button to use switchToFilesView()
2026-02-22 20:20:00 -08:00

31 lines
761 B
JavaScript

/**
* OxiCloud - App state container
* Centralized mutable state for app and cached DOM references.
*/
window.app = {
currentView: 'grid',
currentPath: '',
currentFolder: null,
contextMenuTargetFolder: null,
contextMenuTargetFile: null,
selectedTargetFolderId: '',
moveDialogMode: 'file',
isFilesView: true,
isTrashView: false,
isSharedView: false,
isFavoritesView: false,
isRecentView: false,
currentSection: 'files',
isSearchMode: false,
shareDialogItem: null,
shareDialogItemType: null,
notificationShareUrl: null,
userHomeFolderId: null,
userHomeFolderName: null,
breadcrumbPath: [] // Array of {id, name} tracking folder navigation hierarchy
};
window.appElements = {
};