Skip to content

Commit 8582932

Browse files
committed
Merged in master (pull request #10)
iframe detection, more translations, bfsnumber and bfsname for signup, scroll fixes mobile, 15MB for django uploads
2 parents 4b22b92 + 853695d commit 8582932

File tree

15 files changed

+9061
-41
lines changed

15 files changed

+9061
-41
lines changed

django/main/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113

114114
MEDIA_ROOT = os.environ.get('DJANGO_MEDIA_DIR', '/var/services/django/media')
115115
MEDIA_URL = '/media/'
116+
DATA_UPLOAD_MAX_MEMORY_SIZE = 15728640
116117

117118
GRAPHENE = {'SCHEMA': 'main.schema.schema'}
118119

docker-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
hostname: pdb
77

88
vue:
9-
image: smartuse/gemeindescan-webui-vue:0.3.1
9+
image: smartuse/gemeindescan-webui-vue:0.3.2
1010
hostname: vue
1111

1212
django:

vue/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GEMEINDESCAN_WEBUI_VUE=0.3.1
1+
GEMEINDESCAN_WEBUI_VUE=0.3.2
22
DOCKER_VUE_NAME=$(shell basename $(shell dirname `pwd`))_vue_1
33
DOCKER_EXEC=$(shell command -v docker > /dev/null && echo "docker exec -it $(DOCKER_VUE_NAME)")
44

vue/docker/vue/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ COPY ./package/01/package.json ./package/01/yarn.lock /opt/vue/
3535
RUN --mount=type=cache,target=/tmp/yarn_cache \
3636
yarn install --ignore-optional
3737

38+
# vue/node layer 02 / vh-check
39+
COPY ./package/02/package.json ./package/02/yarn.lock /opt/vue/
40+
RUN --mount=type=cache,target=/tmp/yarn_cache \
41+
yarn install --ignore-optional
42+
3843
EXPOSE 8080
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "vue",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"@intlify/vue-i18n-loader": "^0.6.1",
12+
"@mapbox/geo-viewport": "^0.4.0",
13+
"apollo-cache-inmemory": "^1.6.5",
14+
"apollo-client": "^2.6.8",
15+
"apollo-link": "^1.2.13",
16+
"apollo-link-http": "^1.5.16",
17+
"core-js": "^3.4.4",
18+
"graphql": "^14.5.8",
19+
"graphql-tag": "^2.10.1",
20+
"mapbox.js": "^3.2.1",
21+
"vh-check": "^2.0.5",
22+
"vue": "^2.6.10",
23+
"vue-apollo": "^3.0.2",
24+
"vue-i18n": "^8.15.3",
25+
"vue-router": "^3.1.3",
26+
"vue-router-sitemap": "^0.0.4",
27+
"vuetify": "^2.1.0",
28+
"vuex": "^3.1.2",
29+
"whatwg-fetch": "^3.0.0"
30+
},
31+
"devDependencies": {
32+
"@vue/cli-plugin-babel": "^4.1.0",
33+
"@vue/cli-plugin-eslint": "^4.1.0",
34+
"@vue/cli-plugin-router": "^4.1.0",
35+
"@vue/cli-plugin-vuex": "^4.1.0",
36+
"@vue/cli-service": "^4.1.0",
37+
"@vue/eslint-config-airbnb": "^4.0.0",
38+
"babel-eslint": "^10.0.3",
39+
"eslint": "^5.16.0",
40+
"eslint-plugin-vue": "^5.0.0",
41+
"prerender-spa-plugin": "^3.2.1",
42+
"sass": "^1.19.0",
43+
"sass-loader": "^8.0.0",
44+
"vue-cli-plugin-prerender-spa": "~1.1.6",
45+
"vue-cli-plugin-vuetify": "^2.0.3",
46+
"vue-template-compiler": "^2.6.10",
47+
"vuetify-loader": "^1.3.0"
48+
}
49+
}

vue/docker/vue/package/02/yarn.lock

Lines changed: 8907 additions & 0 deletions
Large diffs are not rendered by default.

vue/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"graphql": "^14.5.8",
1919
"graphql-tag": "^2.10.1",
2020
"mapbox.js": "^3.2.1",
21+
"vh-check": "^2.0.5",
2122
"vue": "^2.6.10",
2223
"vue-apollo": "^3.0.2",
2324
"vue-i18n": "^8.15.3",

vue/src/components/SnapshotMeta.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<div class="smaller">
44
<h3>{{ title }}</h3>
55
<p >
6-
<a class="legend--hash" :href="'https://gemeindescan.ch/' + hash" target="_blank">
7-
gemeindescan.ch/{{ hash }}
6+
<a class="legend--hash" :href="'https://gemeindescan.ch/' + hash + '/'" target="_blank">
7+
gemeindescan.ch/{{ hash }}/
88
</a>
99
</p>
1010
<p>{{ description }}</p>
@@ -19,11 +19,16 @@
1919
>
2020
<v-list-item-icon class="my-0 mr-2">
2121
<v-icon v-if="item.shape === 'circle'"
22-
:color="item.color" :style="{ fontSize: item.size + 'em'}">mdi-circle</v-icon>
22+
:color="item.color"
23+
:style="{ fontSize: 1.6 * item.size + 'em', opacity: item.opacity}">mdi-circle</v-icon>
2324
<v-icon v-else-if="item.shape === 'square'"
24-
:color="item.color" :style="{ fontSize: item.size + 'em'}">mdi-square</v-icon>
25+
:color="item.color"
26+
:style="{ fontSize: 1.6 * item.size + 'em', opacity: item.opacity}">mdi-square</v-icon>
2527
<span v-else-if="item.shape === 'line'" class="legend--line"
26-
:style="{ backgroundColor: item.color, height: 0.5 * item.size + 'em'}">&nbsp;
28+
:style="{
29+
backgroundColor: item.color,
30+
height: 0.5 * item.size + 'em',
31+
opacity: item.opacity}">&nbsp;
2732
</span>
2833
</v-list-item-icon>
2934
<v-list-item-content class="py-0">

vue/src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ApolloClient } from 'apollo-client';
44
import { HttpLink } from 'apollo-link-http';
55
import { InMemoryCache } from 'apollo-cache-inmemory';
66
import VueApollo from 'vue-apollo';
7+
import vhCheck from 'vh-check';
78
import vuetify from './plugins/vuetify';
89
import router from './router';
910
import store from './store';
@@ -19,6 +20,8 @@ require('@/assets/styles/main.css');
1920

2021
Vue.config.productionTip = false;
2122

23+
vhCheck();
24+
2225
const apiLink = new HttpLink({
2326
uri: process.env.VUE_APP_GRAPHQL_URI
2427
});

vue/src/router/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ const routes = [
4242
component: () => import('@/views/Signup.vue'),
4343
meta: {
4444
layout: () => import('@/layouts/LayoutDefault.vue')
45-
},
46-
props: { bfsnumber: '' }
45+
}
4746
},
4847
{
4948
path: 'about/',
@@ -70,7 +69,8 @@ const routes = [
7069
}
7170
},
7271
{
73-
path: 'new-municipality/:bfsNumber',
72+
path: 'new-municipality/:bfsNumber/',
73+
pathToRegexpOptions: { strict: true },
7474
name: 'snapshotNew',
7575
component: () => import('@/views/Snapshot.vue'),
7676
meta: {
@@ -81,8 +81,8 @@ const routes = [
8181
}
8282
},
8383
{
84-
path: ':hash([0-9A-Z]{6})',
85-
pathToRegexpOptions: { sensitive: true },
84+
path: ':hash([0-9A-Z]{6})/',
85+
pathToRegexpOptions: { sensitive: true, strict: true },
8686
name: 'snapshot',
8787
component: () => import('@/views/Snapshot.vue'),
8888
meta: {
@@ -93,10 +93,10 @@ const routes = [
9393
}
9494
},
9595
{
96-
path: ':hash([0-9a-z]{6})',
97-
pathToRegexpOptions: { sensitive: true },
96+
path: ':hash([0-9a-z]{6})/',
97+
pathToRegexpOptions: { sensitive: true, strict: true },
9898
name: 'snapshotRedirect',
99-
redirect: to => `/${to.params.lang}/${to.params.hash.toUpperCase()}`
99+
redirect: to => `/${to.params.lang}/${to.params.hash.toUpperCase()}/`
100100
}
101101
]
102102
},

0 commit comments

Comments
 (0)