Merge pull request #196 from jaredwolff/fix/ui-fixes
fix(ui): photos view bleeding into trash view
This commit is contained in:
+1
-23
@@ -445,40 +445,18 @@ function setupEventListeners() {
|
|||||||
|
|
||||||
// Check if this is the trash item
|
// Check if this is the trash item
|
||||||
if (item === elements.trashBtn) {
|
if (item === elements.trashBtn) {
|
||||||
// Hide shared view if active
|
setCurrentSection('trash');
|
||||||
if (app.isSharedView) {
|
|
||||||
// Hide shared view
|
|
||||||
if (window.sharedView) {
|
|
||||||
window.sharedView.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset shared view flag
|
|
||||||
app.isSharedView = false;
|
|
||||||
|
|
||||||
// Clean up shared containers if they exist
|
|
||||||
const sharedContainer = document.getElementById('shared-container');
|
|
||||||
if (sharedContainer) {
|
|
||||||
sharedContainer.style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hide breadcrumb (only shown in Files view)
|
// Hide breadcrumb (only shown in Files view)
|
||||||
const breadcrumb = document.querySelector('.breadcrumb');
|
const breadcrumb = document.querySelector('.breadcrumb');
|
||||||
if (breadcrumb) breadcrumb.style.display = 'none';
|
if (breadcrumb) breadcrumb.style.display = 'none';
|
||||||
|
|
||||||
// Show trash view
|
|
||||||
app.isTrashView = true;
|
|
||||||
app.currentSection = 'trash';
|
|
||||||
|
|
||||||
// Show files containers (to be filled with trash)
|
// Show files containers (to be filled with trash)
|
||||||
const filesGrid = document.getElementById('files-grid');
|
const filesGrid = document.getElementById('files-grid');
|
||||||
const filesListView = document.getElementById('files-list-view');
|
const filesListView = document.getElementById('files-list-view');
|
||||||
if (filesGrid) { filesGrid.style.display = app.currentView === 'grid' ? 'grid' : 'none'; filesGrid.classList.toggle('hidden', app.currentView !== 'grid'); }
|
if (filesGrid) { filesGrid.style.display = app.currentView === 'grid' ? 'grid' : 'none'; filesGrid.classList.toggle('hidden', app.currentView !== 'grid'); }
|
||||||
if (filesListView) { filesListView.style.display = app.currentView === 'list' ? 'flex' : 'none'; filesListView.classList.toggle('hidden', app.currentView !== 'list'); }
|
if (filesListView) { filesListView.style.display = app.currentView === 'list' ? 'flex' : 'none'; filesListView.classList.toggle('hidden', app.currentView !== 'list'); }
|
||||||
|
|
||||||
// Update UI
|
|
||||||
elements.pageTitle.textContent = window.i18n ? window.i18n.t('nav.trash') : 'Trash';
|
|
||||||
elements.pageTitle.setAttribute('data-i18n', 'nav.trash');
|
|
||||||
setActionsBarMode('trash');
|
setActionsBarMode('trash');
|
||||||
|
|
||||||
// Load trash items
|
// Load trash items
|
||||||
|
|||||||
Reference in New Issue
Block a user