Enhance MapView component with new features and icons

- Added fullscreen and measurement mode buttons for improved map interaction.
- Introduced a bookmarks section to save and navigate to locations easily.
- Implemented a search feature for quick access to coordinates and markers.
- Added keyboard shortcuts overlay for enhanced usability.
- Refactored MapControls and MapControlsContent to support new functionalities.
- Introduced new icon components for better visual representation in the UI.
This commit is contained in:
2026-03-01 16:00:25 +03:00
parent 945b803dba
commit 7f990c0c11
17 changed files with 825 additions and 4 deletions

View File

@@ -1,5 +1,15 @@
<template>
<div class="flex flex-col gap-4">
<!-- Search -->
<MapSearch
v-if="currentMapId != null && currentCoords != null"
:maps="maps"
:quest-givers="questGivers"
:current-map-id="currentMapId"
:current-coords="currentCoords"
:touch-friendly="touchFriendly"
@jump-to-marker="$emit('jumpToMarker', $event)"
/>
<!-- Zoom -->
<section class="flex flex-col gap-2">
<h3 class="text-xs font-semibold uppercase tracking-wider text-base-content/70 flex items-center gap-1.5">
@@ -105,11 +115,19 @@
</select>
</fieldset>
</section>
<!-- Saved locations -->
<MapBookmarks
:maps="maps"
:current-map-id="currentMapId ?? null"
:current-coords="currentCoords ?? null"
:touch-friendly="touchFriendly"
/>
</div>
</template>
<script setup lang="ts">
import type { MapInfo } from '~/types/api'
import MapBookmarks from '~/components/map/MapBookmarks.vue'
interface QuestGiver {
id: number
@@ -131,14 +149,17 @@ const props = withDefaults(
overlayMapId: number
selectedMarkerIdSelect: string
selectedPlayerIdSelect: string
currentMapId?: number
currentCoords?: { x: number; y: number; z: number } | null
}>(),
{ touchFriendly: false }
{ touchFriendly: false, currentMapId: 0, currentCoords: null }
)
const emit = defineEmits<{
zoomIn: []
zoomOut: []
resetView: []
jumpToMarker: [id: number]
'update:showGridCoordinates': [v: boolean]
'update:hideMarkers': [v: boolean]
'update:selectedMapIdSelect': [v: string]