feat(viewPref): keep record of user view preferences per section (groupBy, order, list or grid)

This commit is contained in:
Edouard Vanbelle
2026-05-28 11:12:36 +02:00
parent 7f4b329718
commit bd474aa67e
7 changed files with 204 additions and 7 deletions
+3
View File
@@ -7,6 +7,7 @@
import { i18n } from '../core/i18n.js';
import { OxiIcons } from '../core/icons.js';
import * as viewPrefs from '../core/viewPrefs.js';
import { batchToolbar } from '../features/files/batchToolbar.js';
import { contextMenus } from '../features/files/contextMenus.js';
import { fileOps } from '../features/files/fileOperations.js';
@@ -419,6 +420,7 @@ const ui = {
switchToGridView() {
app.currentView = 'grid';
localStorage.setItem('oxicloud-view', 'grid');
if (app.currentSection) viewPrefs.saveView(app.currentSection, 'grid');
syncViewContainers();
},
@@ -429,6 +431,7 @@ const ui = {
switchToListView() {
app.currentView = 'list';
localStorage.setItem('oxicloud-view', 'list');
if (app.currentSection) viewPrefs.saveView(app.currentSection, 'list');
syncViewContainers();
},