Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heylocal parking admin #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Nuxt.js Team",
"private": true,
"scripts": {
"dev": "MINIMAL=1 CSB=1 nuxt",
"dev": "MINIMAL=1 CSB=1 HOST=0.0.0.0 nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
Expand All @@ -23,6 +23,7 @@
"js-cookie": "2.2.1",
"js-sha1": "0.6.0",
"ky-universal": "0.8.1",
"material-design-icons": "^3.0.1",
"nuxt": "^2.12.2",
"redirect-ssl": "^2.0.0",
"reqlim": "0.0.0",
Expand Down
9 changes: 8 additions & 1 deletion pages/parken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@
map.panTo(userPos);
});
}, (error) => {
this.$toasted.show(error);
switch (error.code) {
case error.PERMISSION_DENIED:
return this.$toasted.show("Bitte gib uns die Erlaubnis auf deine GPS-Daten zuzugreifen.");
case error.POSITION_UNAVAILABLE:
return this.$toasted.show("Leider konnten wir deine Koordinaten nicht abrufen.");
default:
return this.$toasted.show(`Ein unerwarteter Fehler ist aufgetreten.`);
}
});
} else {
if (this.userMarker) {
Expand Down
5 changes: 4 additions & 1 deletion plugins/vue-toasted.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Vue from "vue"
import Toasted from "vue-toasted"

Vue.use(Toasted);
Vue.use(Toasted, {
theme: "toasted-primary",
duration: 3000
});
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5583,6 +5583,11 @@ marker-clusterer-plus@^2.1.4:
resolved "https://registry.yarnpkg.com/marker-clusterer-plus/-/marker-clusterer-plus-2.1.4.tgz#f8eff74d599dab3b7d0e3fed5264ea0e704f5d67"
integrity sha1-+O/3TVmdqzt9Dj/tUmTqDnBPXWc=

material-design-icons@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/material-design-icons/-/material-design-icons-3.0.1.tgz#9a71c48747218ebca51e51a66da682038cdcb7bf"
integrity sha1-mnHEh0chjrylHlGmbaaCA4zct78=

md5.js@^1.3.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
Expand Down