Refactor frontend components for improved functionality and accessibility
- Consolidated global error handling in app.vue to redirect users to the login page on API authentication failure. - Enhanced MapView component by reintroducing event listeners for selected map and marker updates, improving interactivity. - Updated PasswordInput and various modal components to ensure proper input handling and accessibility compliance. - Refactored MapControls and MapControlsContent to streamline prop management and enhance user experience. - Improved error handling in local storage operations within useMapBookmarks and useRecentLocations composables. - Standardized input elements across forms for consistency in user interaction.
This commit is contained in:
@@ -39,7 +39,10 @@ export function uniqueListUpdate<T extends Identifiable>(
|
||||
if (addCallback) {
|
||||
elementsToAdd.forEach((it) => addCallback(it))
|
||||
}
|
||||
elementsToRemove.forEach((it) => delete list.elements[String(it.id)])
|
||||
const toRemove = new Set(elementsToRemove.map((it) => String(it.id)))
|
||||
list.elements = Object.fromEntries(
|
||||
Object.entries(list.elements).filter(([id]) => !toRemove.has(id))
|
||||
) as Record<string, T>
|
||||
elementsToAdd.forEach((it) => (list.elements[String(it.id)] = it))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user