Skip to content

Commit 24a2806

Browse files
author
Arman Badalyan
committed
geophystech#137 Modal Map
1 parent c07e8b2 commit 24a2806

File tree

8 files changed

+289
-196
lines changed

8 files changed

+289
-196
lines changed

package-lock.json

+116-99
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"leaflet-zoomhome": "github:armd-pro/leaflet.zoomhome",
2929
"leaflet.gridlayer.googlemutant": "^0.7.1",
3030
"leaflet.markercluster": "^1.4.1",
31-
"vue": "^2.5.21",
32-
"vue-analytics": "^5.16.1",
31+
"vue": "^2.5.22",
32+
"vue-analytics": "^5.16.2",
3333
"vue-axios": "^2.1.4",
3434
"vue-chartjs": "^2.8.7",
3535
"vue-flatpickr-component": "^7.0.6",
@@ -40,7 +40,7 @@
4040
"vue-simple-spinner": "^1.2.8",
4141
"vue-toasted": "^1.1.26",
4242
"vue-yandex-metrika": "^1.7.2",
43-
"vuex": "^3.0.1",
43+
"vuex": "^3.1.0",
4444
"vuex-persistedstate": "^2.5.4"
4545
},
4646
"devDependencies": {
@@ -56,10 +56,10 @@
5656
"babel-register": "^6.22.0",
5757
"bootstrap-vue": "^2.0.0-rc.11",
5858
"chai": "^3.5.0",
59-
"chalk": "^2.4.1",
59+
"chalk": "^2.4.2",
6060
"chromedriver": "^2.45.0",
6161
"compression-webpack-plugin": "^1.1.12",
62-
"connect-history-api-fallback": "^1.3.0",
62+
"connect-history-api-fallback": "^1.6.0",
6363
"copy-webpack-plugin": "^4.6.0",
6464
"cross-env": "^5.2.0",
6565
"cross-spawn": "^5.0.1",
@@ -107,14 +107,14 @@
107107
"sinon-chai": "^2.8.0",
108108
"style-loader": "^0.18.2",
109109
"url-loader": "^1.1.2",
110-
"vue-loader": "^14.2.3",
110+
"vue-loader": "^14.2.4",
111111
"vue-style-loader": "^3.1.2",
112112
"vue-template-compiler": "^2.5.21",
113-
"webpack": "^4.28.3",
113+
"webpack": "^4.29.0",
114114
"webpack-bundle-analyzer": "^2.13.1",
115-
"webpack-dev-middleware": "^3.4.0",
115+
"webpack-dev-middleware": "^3.5.1",
116116
"webpack-hot-middleware": "^2.24.3",
117-
"webpack-merge": "^4.1.5"
117+
"webpack-merge": "^4.2.1"
118118
},
119119
"engines": {
120120
"node": ">= 4.0.0",

src/components/event/LastEvents.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
</template>
3434

3535
<script>
36-
import { round } from '@/helpers/math.js'
36+
import apiSettings from '@/settings/app'
37+
import { round } from '@/helpers/math'
3738
3839
export default {
3940
props: ['event'],
@@ -44,7 +45,7 @@
4445
},
4546
methods: {
4647
fetchEvents: function() {
47-
this.$http.get(this.$root.$options.settings.api.endpointEvents, {
48+
this.$http.get(apiSettings.endpointEvents, {
4849
params: {
4950
datetime_min: this.$moment.utc().subtract(6, 'months').format('YYYY-MM-DD 00:00:00'),
5051
include: 'nearestCity',
@@ -64,7 +65,9 @@
6465
this.events.push(event)
6566
})
6667
})
67-
.catch(error => { console.log(error) })
68+
.catch(error => {
69+
console.log(error.response)
70+
})
6871
},
6972
highlightEvent: function(id) {
7073
if (this.event) return id === this.event.id
@@ -79,12 +82,9 @@
7982
</script>
8083

8184
<style lang="scss" scoped>
82-
$color-blue: #337ab7;
83-
$color-gray-dark: #444;
84-
$color-gray-light: #dfdfdf;
85-
$color-gray-light-2: #999;
86-
$color-orange: #ff7300;
87-
$color-white-2: #faf9f9;
85+
86+
@import '~scss/_variables';
87+
8888
$border: 1px $color-gray-light solid;
8989
9090
.last-events {

src/components/maps/ModalMap.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="modal-map">
3-
<b-btn size="sm" v-b-modal.map-dialog>Показать на карте</b-btn>
3+
<b-btn size="sm" id="map-dialog-btn" v-b-modal.map-dialog>Показать на карте</b-btn>
44
<b-modal
55
id="map-dialog"
66
size="lg"
@@ -17,6 +17,7 @@
1717

1818
<script>
1919
import {createMap, createMapEventMarker} from '@/map_functions'
20+
import apiSettings from '@/settings/app'
2021
2122
export default {
2223
name: 'ModalMap',
@@ -115,7 +116,7 @@
115116
116117
}.bind(this)
117118
118-
_getEvents(this.$root.$options.settings.api.endpointEventsLight)
119+
_getEvents(apiSettings.endpointEventsLight)
119120
}
120121
}
121122
}
@@ -128,7 +129,7 @@
128129
<style lang="scss" scoped>
129130
130131
@import '~scss/_variables';
131-
@import '~scss/mixins/_calc';
132+
@import '~scss/_mixins';
132133
133134
.modal-map
134135
{

src/components/maps/Settlements.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<script>
66
import { addEpicenter, createMap, id, convertMsk64, msk64Color, removeEpicenter, setView } from '@/map_functions.js'
7+
import apiSettings from '@/settings/app'
78
89
export default {
910
props: ['event', 'tab'],
@@ -54,7 +55,7 @@
5455
this.map.object = createMap(this.map.id, this.coordinates)
5556
},
5657
fetchData: function() {
57-
this.$http.get(this.$root.$options.settings.api.endpointEventMsk64(this.event.id))
58+
this.$http.get(apiSettings.endpointEventMsk64(this.event.id))
5859
.then(response => { this.addData(response.data.data) })
5960
.catch(error => { console.log(error) })
6061
},

test/unit/specs/Spinner.spec.js

-1
This file was deleted.

test/unit/specs/maps/ModalMap.spec.js

-23
This file was deleted.

0 commit comments

Comments
 (0)