Skip to content

Commit

Permalink
Merge pull request #56 from baillysi/develop
Browse files Browse the repository at this point in the history
pull request
  • Loading branch information
baillysi authored Oct 23, 2024
2 parents e18210e + bc7238e commit 9057ce0
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 42 deletions.
144 changes: 138 additions & 6 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/CreateComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ async function onSubmit() {
<br/>
<div class="form-group inter-maps">
<label for="InputDifficulty">Difficulté</label>
<input v-model="difficulty" type="range" class="form-range range-cust" min="0" max="4" id="InputDifficulty">
<input v-model="difficulty" type="range" class="form-range range-cust" min="1" max="4" id="InputDifficulty">
</div>
<div class="form-group inter-maps">
<label for="InputRates">Intérêt</label>
<input v-model="rates" type="range" class="form-range range-cust" min="0" max="4" id="InputRates">
<input v-model="rates" type="range" class="form-range range-cust" min="1" max="4" id="InputRates">
</div>
<br/>
<div class="modal-footer">
Expand Down
27 changes: 14 additions & 13 deletions src/components/MapDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ async function getJourneys() {
// leaflet map
const myMap = ref(null)
const mapcenter = ref('')
const mapzoom = ref(13)
const mapcenterFixed = ref([-21.128756, 55.519246])
const mapzoom = ref(11)
const ismapdata = ref(false)
watch(mapcenter, () => {
Expand Down Expand Up @@ -254,8 +255,8 @@ async function zoomUpdated(zoom) {
mapzoom.value = zoom
}
async function fitBoundsZone(mapcenter) {
myMap.value.leafletObject.setView(mapcenter, 13)
async function fitBoundsZone(mapcenterFixed) {
myMap.value.leafletObject.setView(mapcenterFixed, 11)
}
async function downloadGPX(geojson, name) {
Expand Down Expand Up @@ -433,7 +434,7 @@ onMounted(async () => {
<br/>
<div class="mapContainer" v-if="ismapdata" style='border: 2px solid #3C002E;'>
<l-map ref="myMap" :zoom="13" :center="mapcenter" :use-global-leaflet="true" @ready="onReady()" @update:zoom="zoomUpdated">
<l-map ref="myMap" :zoom="11" :center="mapcenterFixed" :use-global-leaflet="true" @ready="onReady()" @update:zoom="zoomUpdated">
<l-control-layers position="topright"></l-control-layers>
Expand Down Expand Up @@ -484,7 +485,7 @@ onMounted(async () => {
:lat-lng="[item.coordinates[0], item.coordinates[1]]">
<l-popup class="inter-maps">{{ item.content }}</l-popup>
<l-icon
:iconSize="mapzoom >= 15 ? [25, 25] : [18, 18]"
:iconSize="mapzoom >= 15 ? [35, 35] : ((mapzoom >= 13 ? [25, 25] : [18, 18]))"
:icon-url="hostCustomMarker"
/>
</l-marker>
Expand Down Expand Up @@ -587,7 +588,7 @@ onMounted(async () => {
<br/>
<div class="row" style="margin-left: 10px; margin-right: 10px;">
<AlertComponent :message="message" v-if="showMessage && isloading == false"></AlertComponent>
<AlertComponent :message="message" v-if="showMessage"></AlertComponent>
</div>
</div>
Expand All @@ -596,8 +597,8 @@ onMounted(async () => {
<!-- Create -->
<CreateComponent :zoneId="alicia" :journeys="journeys"
@close="hideCreate(), isloading=true"
@exit="getZoneDetails(), message = 'Itinéraire créé!', showMessage = true, fitBoundsZone(mapcenter)">
@close="hideCreate(), isResponseLoading=true"
@exit="getZoneDetails(), message = 'Itinéraire créé!', showMessage = true, fitBoundsZone(mapcenterFixed)">
</CreateComponent>
<!-- Update -->
Expand All @@ -611,13 +612,13 @@ onMounted(async () => {
:currentRates="hikeDetails.rates"
:currentDescription="hikeDetails.description"
:hasTrail="hikeDetails.trail == 'None' ? false : true"
@close="hideUpdate(), isloading=true"
@exit="getZoneDetails(), message = 'Itinéraire mis à jour!', showMessage = true, fitBoundsZone(mapcenter), hikeDetails = ''">
@close="hideUpdate(), isResponseLoading=true"
@exit="getZoneDetails(), message = 'Itinéraire mis à jour!', showMessage = true, fitBoundsZone(mapcenterFixed), hikeDetails = ''">
</UpdateComponent>
<!-- Delete -->
<DeleteComponent :hikeId="String(hikeDetails.id)"
@close="hideDelete(), isloading=true"
@close="hideDelete(), isResponseLoading=true"
@exit="getZoneDetails(), message = 'Itinéraire supprimé!', showMessage = true, hikeDetails = ''">
</DeleteComponent>
Expand Down Expand Up @@ -725,11 +726,11 @@ onMounted(async () => {
}
.marker-cluster-small {
background-color: #9f0000 !important;
background-color: #FE8935 !important;
}
.marker-cluster-small div {
background-color: #9f0000 !important;
background-color: #FE8935 !important;
color: #fff !important;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/UpdateComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ async function onSubmit() {
<br/>
<div class="form-group inter-maps">
<label for="InputDifficulty">Difficulté</label>
<input v-model="updatedDifficulty" type="range" class="range-cust form-range" min="0" max="4" id="InputDifficulty">
<input v-model="updatedDifficulty" type="range" class="range-cust form-range" min="1" max="4" id="InputDifficulty">
</div>
<div class="form-group inter-maps">
<label for="InputRates">Intérêt</label>
<input v-model="updatedRates" type="range" class="range-cust form-range" min="0" max="4" id="InputRates">
<input v-model="updatedRates" type="range" class="range-cust form-range" min="1" max="4" id="InputRates">
</div>
<br/>
<div class="modal-footer">
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/host.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9057ce0

Please sign in to comment.