Authenticated Media Support (#51)

* Fix AvatarField to work with authenticated media

* Fix ViewMediaButton to work for user's media tab and reported events

* remove console.log

* cleanup AvatarField

* use correct thumbnail size

* fix AvatarField.test

* ignore postgres data for watchman

* fix new avatar preview

* watchman should ignore testdata completely, instead of specific subdirs

* update README

* change user's media icon in sidebar - use the same icon as the media tab

* Add preview for user media files if mimeType is image/*

* Add new line in user media Dialog
This commit is contained in:
Borislav Pantaleev
2024-10-03 00:38:35 +03:00
committed by GitHub
parent 470f1b5455
commit a79c3597d6
14 changed files with 259 additions and 83 deletions

View File

@@ -96,8 +96,13 @@ const authProvider: AuthProvider = {
};
if (typeof access_token === "string") {
await fetchUtils.fetchJson(logout_api_url, options);
storage.removeItem("access_token");
try {
await fetchUtils.fetchJson(logout_api_url, options);
} catch (err) {
console.log("Error logging out", err);
} finally {
storage.removeItem("access_token");
}
}
},
// called when the API returns an error