Enhance frontend components and introduce new features
- Added a custom light theme in app.css to match the dark theme's palette. - Introduced AdminBreadcrumbs component for improved navigation in admin pages. - Implemented Skeleton component for loading states in various views. - Added ToastContainer for displaying notifications and alerts. - Enhanced MapView with loading indicators and improved marker handling. - Updated MapCoordsDisplay to allow copying of shareable links. - Refactored MapControls and MapContextMenu for better usability. - Improved user experience in profile and admin pages with loading states and search functionality.
This commit is contained in:
@@ -48,8 +48,10 @@ const mapsLoaded = ref(false)
|
||||
const form = ref({ name: '', hidden: false, priority: false })
|
||||
const loading = ref(false)
|
||||
const error = ref('')
|
||||
const adminMapName = useState<string | null>('admin-breadcrumb-map-name', () => null)
|
||||
|
||||
onMounted(async () => {
|
||||
adminMapName.value = null
|
||||
try {
|
||||
const maps = await api.adminMaps()
|
||||
mapsLoaded.value = true
|
||||
@@ -57,6 +59,7 @@ onMounted(async () => {
|
||||
if (found) {
|
||||
map.value = found
|
||||
form.value = { name: found.Name, hidden: found.Hidden, priority: found.Priority }
|
||||
adminMapName.value = found.Name
|
||||
}
|
||||
} catch {
|
||||
mapsLoaded.value = true
|
||||
@@ -64,6 +67,10 @@ onMounted(async () => {
|
||||
}
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
adminMapName.value = null
|
||||
})
|
||||
|
||||
async function submit() {
|
||||
if (!map.value) return
|
||||
error.value = ''
|
||||
|
||||
Reference in New Issue
Block a user