new usersetting to blacklist (filter) also on description

This commit is contained in:
orangecoding
2026-06-10 17:10:39 +02:00
parent c17a815263
commit a2a765f43d
11 changed files with 362 additions and 9 deletions

View File

@@ -337,6 +337,28 @@ export const useFredyState = create(
throw Exception;
}
},
async setBlacklistFilterOnProviderDetails(enabled) {
try {
await xhrPost('/api/user/settings/blacklist-filter-on-details', {
blacklist_filter_on_provider_details: enabled,
});
set((state) => ({
userSettings: {
...state.userSettings,
settings: {
...state.userSettings.settings,
blacklist_filter_on_provider_details: enabled,
},
},
}));
} catch (Exception) {
console.error(
'Error while trying to update blacklist-filter-on-provider-details setting. Error:',
Exception,
);
throw Exception;
}
},
async setListingsViewMode(listings_view_mode) {
try {
await xhrPost('/api/user/settings/listings-view-mode', { listings_view_mode });