feat: Add grid/table view toggle to listings overview (#305)

* feat: Add delete button to listing detail view

* feat: Add grid/table view toggle to listings overview

---------

Co-authored-by: datenwurm <git@datenwurm.net>
This commit is contained in:
datenwurm
2026-05-07 12:12:49 +02:00
committed by GitHub
parent ee54cc495b
commit f60c5859f9
9 changed files with 838 additions and 475 deletions

View File

@@ -321,6 +321,20 @@ export const useFredyState = create(
throw Exception;
}
},
async setListingsViewMode(listings_view_mode) {
try {
await xhrPost('/api/user/settings/listings-view-mode', { listings_view_mode });
set((state) => ({
userSettings: {
...state.userSettings,
settings: { ...state.userSettings.settings, listings_view_mode },
},
}));
} catch (Exception) {
console.error('Error while trying to update listings view mode setting. Error:', Exception);
throw Exception;
}
},
},
};