# HG changeset patch # User Thomas Junk # Date 1536248548 -7200 # Node ID fb5d9d5ff320a76f677bc709dce8ed0d20a41bc1 # Parent e78bdbb6cac829a125abf7bdd2aee01cb57975a9 refac: UI redesign diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/App.vue --- a/client/src/App.vue Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/App.vue Thu Sep 06 17:42:28 2018 +0200 @@ -1,7 +1,9 @@ @@ -18,9 +20,19 @@ background-color: #efefef !important; } +.userinterface { + position: absolute; + top: 0; + left: 0; + height: 100vh; + width: 100vw; + z-index: 4; + pointer-events: none; +} + #app { - height: 100%; - width: 100%; + height: 100vh; + width: 100vw; font-family: "Avenir", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/assets/application.scss --- a/client/src/assets/application.scss Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/assets/application.scss Thu Sep 06 17:42:28 2018 +0200 @@ -18,3 +18,7 @@ left: 50%; transform: translate(-50%, -50%); } + +.ui-element { + pointer-events: auto; +} diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/components/Maplayer.vue --- a/client/src/components/Maplayer.vue Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/components/Maplayer.vue Thu Sep 06 17:42:28 2018 +0200 @@ -1,20 +1,9 @@ @@ -27,23 +16,19 @@ } .mapdisplay { - height: 100%; + height: 100vh; } #map { - margin-top: $topbarheight; - height: 50vh; + height: 100vh; } -.layerselection { - position: absolute; - top: 40px + $small-offset; - margin-top: $small-offset; - right: $small-offset; - min-height: 20%; - min-width: 10%; +.ol-zoom { + display: flex; + left: 15vw; + margin-top: 2vh; + z-index: 5; background-color: white; - z-index: 10; } @@ -54,72 +39,30 @@ // needed for vector filter example // import { greaterThan as greaterThanFilter } from "ol/format/filter.js"; import { WFS, GeoJSON } from "ol/format.js"; -import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; -import VectorSource from "ol/source/Vector.js"; -import { Stroke, Style } from "ol/style.js"; -import OSM from "ol/source/OSM"; -import TileWMS from "ol/source/TileWMS.js"; -import Layerselect from "./Layerselect"; +import { mapGetters } from "vuex"; import Fairwayprofile from "./Fairwayprofile"; export default { name: "maplayer", props: ["lat", "long", "zoom"], components: { - Layerselect, Fairwayprofile }, data() { return { projection: "EPSG:3857", - openLayersMap: null, - layers: [ - { - name: "Open Streetmap", - data: new TileLayer({ - source: new OSM() - }), - isVisible: true - }, - { - name: "D4D", - data: new TileLayer({ - source: new TileWMS({ - url: "https://demo.d4d-portal.info/wms", - params: { LAYERS: "d4d", VERSION: "1.1.1", TILED: true } - }) - }), - isVisible: true - }, - { - name: "Fairways Dimensions", - data: new VectorLayer({ - source: new VectorSource(), - style: new Style({ - stroke: new Stroke({ - color: "rgba(0, 0, 255, 1.0)", - width: 2 - }) - }) - }), - isVisible: true - } - ] + openLayersMap: null }; }, computed: { + ...mapGetters("mapstore", ["layers"]), layerData() { return this.layers.map(x => { return x.data; }); } }, - methods: { - visibilityToggled(layer) { - this.layers[layer].isVisible = !this.layers[layer].isVisible; - this.layers[layer].data.setVisible(this.layers[layer].isVisible); - } - }, + methods: {}, mounted() { var that = this; this.openLayersMap = new Map({ diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/components/Sidebar.vue --- a/client/src/components/Sidebar.vue Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/components/Sidebar.vue Thu Sep 06 17:42:28 2018 +0200 @@ -6,19 +6,24 @@

- + Users
+ diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/router.js --- a/client/src/router.js Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/router.js Thu Sep 06 17:42:28 2018 +0200 @@ -6,7 +6,7 @@ /* facilitate codesplitting */ const Login = () => import("./views/Login.vue"); const Main = () => import("./views/Main.vue"); -const Users = () => import("./views/Users.vue"); +const Usermanagement = () => import("./views/Usermanagement.vue"); Vue.use(Router); @@ -18,9 +18,9 @@ component: Login }, { - path: "/users", - name: "users", - component: Users, + path: "/usermanagement", + name: "usermanagement", + component: Usermanagement, meta: { requiresAuth: true }, diff -r e78bdbb6cac8 -r fb5d9d5ff320 client/src/store.js --- a/client/src/store.js Thu Sep 06 16:27:17 2018 +0200 +++ b/client/src/store.js Thu Sep 06 17:42:28 2018 +0200 @@ -3,6 +3,7 @@ import Application from "./stores/application"; import user from "./stores/user"; import usermanagement from "./stores/usermanagement"; +import mapstore from "./stores/mapstore"; Vue.use(Vuex); @@ -10,6 +11,7 @@ modules: { application: Application, user: user, - usermanagement: usermanagement + usermanagement: usermanagement, + mapstore: mapstore } });