Remove fat
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||
import { Map, NavigationControl, Marker, LngLatBounds, LngLat, Popup } from 'maplibre-gl';
|
||||
import { createApp, ref, provide, inject } from 'vue';
|
||||
import { Map, Marker, LngLatBounds, LngLat, Popup } from 'maplibre-gl';
|
||||
import { createApp } from 'vue';
|
||||
import Simplebar from 'simplebar-vue';
|
||||
|
||||
import Lightbox from '@scripts/lightbox';
|
||||
@@ -22,7 +22,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
server: this.consts.server,
|
||||
feed: {loading:false, updatable:true, outOfData:false, refIdFirst:0, refIdLast:0, firstChunk:true},
|
||||
refreshRate: 60,
|
||||
lastUpdate: { unix_time: 0, relative_time: '', formatted_time: ''},
|
||||
@@ -89,23 +88,12 @@ export default {
|
||||
if(this.hash.items.length == 0) this.hash.items[0] = this.projects.getDefaultCodeName();
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', this.handleResize);
|
||||
this.init();
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('resize', this.handleResize);
|
||||
this.quit();
|
||||
},
|
||||
methods: {
|
||||
handleResize() {
|
||||
//this.spot.tmp('map_offset', -1 * (this.feedPanelOpen?getOuterWidth(this.$refs.feed):0) / getOuterWidth(window));
|
||||
|
||||
/* TODO
|
||||
if(typeof this.spot.tmp('elev') != 'undefined' && this.spot.tmp('elev')._showState) {
|
||||
this.spot.tmp('elev').resize({width:this.getElevWidth()});
|
||||
}
|
||||
*/
|
||||
},
|
||||
async init() {
|
||||
this.initProject();
|
||||
this.initLightbox();
|
||||
@@ -335,7 +323,6 @@ export default {
|
||||
project: this.currProject
|
||||
});
|
||||
this.popup.content
|
||||
.provide('spot', this.spot)
|
||||
.provide('lang', this.lang)
|
||||
.provide('consts', this.consts)
|
||||
.mount($Popup);
|
||||
@@ -501,8 +488,6 @@ export default {
|
||||
this.feedPanelOpen = (typeof bShow === 'object' || typeof bShow === 'undefined')?(!this.feedPanelOpen):bShow;
|
||||
|
||||
if(bOldValue != this.feedPanelOpen && !this.isMobile()) {
|
||||
this.handleResize();
|
||||
|
||||
sMapAction = sMapAction || 'panTo';
|
||||
switch(sMapAction) {
|
||||
case 'none':
|
||||
@@ -516,17 +501,6 @@ export default {
|
||||
case 'panToInstant':
|
||||
this.map.panBy([(this.feedPanelOpen?1:-1) * getOuterWidth(this.$refs.feed) / 2, 0]);
|
||||
break;
|
||||
case 'fitBounds':
|
||||
/*
|
||||
this.map.fitBounds(
|
||||
this.spot.tmp('track').getBounds(),
|
||||
{
|
||||
paddingTopLeft: L.point(5, this.spot.tmp('marker_size').height + 5),
|
||||
paddingBottomRight: L.point(this.spot.tmp('$Feed').outerWidth(true) + 5, 5)
|
||||
}
|
||||
);
|
||||
break;
|
||||
*/
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -535,8 +509,6 @@ export default {
|
||||
this.settingsPanelOpen = (typeof bShow === 'object' || typeof bShow === 'undefined')?(!this.settingsPanelOpen):bShow;
|
||||
|
||||
if(bOldValue != this.settingsPanelOpen && !this.isMobile()) {
|
||||
this.handleResize();
|
||||
|
||||
sMapAction = sMapAction || 'panTo';
|
||||
switch(sMapAction) {
|
||||
case 'none':
|
||||
@@ -599,7 +571,7 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-section">
|
||||
<div class="settings-section newsletter">
|
||||
<ProjectNewsletter />
|
||||
</div>
|
||||
<div class="settings-section admin" v-if="user.hasClearance(consts.clearances.admin)">
|
||||
|
||||
@@ -53,17 +53,15 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="newsletter">
|
||||
<h1><SpotIcon :icon="'newsletter'" width="fixed" :text="lang.get('newsletter.title')" /></h1>
|
||||
<div class="newsletter-form">
|
||||
<input type="email" name="email" id="email" :placeholder="lang.get('newsletter.email_placeholder')" v-model="user.email" :disabled="loading || subscribed" />
|
||||
<SpotButton :classes="buttonClasses" :title="lang.get('newsletter.'+action)" :icon="action" @click="manage" />
|
||||
</div>
|
||||
<div id="settings-feedback" class="feedback">
|
||||
<p v-for="feedback in feedbacks" :key="feedback.type + '-' + feedback.msg" :class="feedback.type">
|
||||
<SpotIcon :icon="feedback.type" :text="feedback.msg" />
|
||||
</p>
|
||||
</div>
|
||||
{{ lang.get('newsletter.'+(subscribed?'subscribed':'unsubscribed')+'_desc') }}
|
||||
<h1><SpotIcon :icon="'newsletter'" width="fixed" :text="lang.get('newsletter.title')" /></h1>
|
||||
<div class="newsletter-form">
|
||||
<input type="email" name="email" id="email" :placeholder="lang.get('newsletter.email_placeholder')" v-model="user.email" :disabled="loading || subscribed" />
|
||||
<SpotButton :classes="buttonClasses" :title="lang.get('newsletter.'+action)" :icon="action" @click="manage" />
|
||||
</div>
|
||||
<div class="feedback">
|
||||
<p v-for="feedback in feedbacks" :key="feedback.type + '-' + feedback.msg" :class="feedback.type">
|
||||
<SpotIcon :icon="feedback.type" :text="feedback.msg" />
|
||||
</p>
|
||||
</div>
|
||||
{{ lang.get('newsletter.'+(subscribed?'subscribed':'unsubscribed')+'_desc') }}
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,6 @@ import projectMapLink from '@components/projectMapLink';
|
||||
import spotIcon from '@components/spotIcon';
|
||||
import projectRelTime from '@components/projectRelTime';
|
||||
import projectMediaLink from '@components/projectMediaLink';
|
||||
import { options } from '@scripts/lightbox';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user