Commit abddadd5 authored by Johannes Winter's avatar Johannes Winter

Merge branch 'fix/167' into 'develop'

become GDPR compliant

See merge request !58
parents cdd8d5b0 f5aa2779
Pipeline #410 passed with stages
in 5 minutes and 24 seconds
......@@ -2375,7 +2375,7 @@
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
......@@ -3151,7 +3151,7 @@
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
......@@ -3255,7 +3255,7 @@
},
"babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=",
"dev": true
},
......@@ -5715,7 +5715,7 @@
},
"eslint": {
"version": "4.19.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz",
"resolved": "http://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz",
"integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==",
"dev": true,
"optional": true,
......@@ -6148,7 +6148,7 @@
},
"external-editor": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
"resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz",
"integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==",
"dev": true,
"optional": true,
......@@ -7672,7 +7672,7 @@
},
"html-webpack-plugin": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
"resolved": "http://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz",
"integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=",
"dev": true,
"requires": {
......@@ -9096,7 +9096,7 @@
"dependencies": {
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
}
......@@ -9589,7 +9589,7 @@
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
......@@ -12017,7 +12017,7 @@
},
"os-locale": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"dev": true,
"requires": {
......@@ -13602,6 +13602,11 @@
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
"dev": true
},
"tiny-cookie": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tiny-cookie/-/tiny-cookie-2.3.1.tgz",
"integrity": "sha512-C4x1e8dHfKf03ewuN9aIZzzOfN2a6QKhYlnHdzJxmmjMTLqcskI20F+EplszjODQ4SHmIGFJrvUUnBMS/bJbOA=="
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
......@@ -14191,6 +14196,14 @@
"clipboard": "^2.0.0"
}
},
"vue-cookie-accept-decline": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/vue-cookie-accept-decline/-/vue-cookie-accept-decline-5.3.1.tgz",
"integrity": "sha512-jM7FplHH+CgLS+bcezH3kwl0dCwHO1FZBE/8tfSn/YwgohqhOauv9+Wo3Ee7rj+Z68FGoOVRGvA1Bn0Rj2MfsA==",
"requires": {
"tiny-cookie": "^2.1.2"
}
},
"vue-eslint-parser": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",
......@@ -14243,6 +14256,11 @@
"vue-style-loader": "^4.1.0"
}
},
"vue-matomo": {
"version": "3.13.0-4",
"resolved": "https://registry.npmjs.org/vue-matomo/-/vue-matomo-3.13.0-4.tgz",
"integrity": "sha512-RInrx3Slyy7/5PbMVMVZGFIzVE99f7tYJG+jEbVtw7XJLmi5Aj4rFVVPUWgYL/fBrPxqLDlhV7O4S4+2NGNnPg=="
},
"vue-nprogress": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/vue-nprogress/-/vue-nprogress-0.1.5.tgz",
......
......@@ -13,22 +13,5 @@
<strong>We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setCookieDomain", "*.app.solidbase.info"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.allmende.io/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '18']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</body>
</html>
<template>
<consent-banner
:ref="'cnsntbnnr'"
:elementId="'cnsntbnnr'"
:debug="false"
:position="'bottom'"
:type="'bar'"
:disableDecline="false"
:transitionName="'slideFromBottom'"
:showPostponeButton="true"
@status="checkState"
@clicked-accept="accept"
@clicked-decline="decline">
<div slot="postponeContent">
&times;
</div>
<div slot="message" v-html="$t('banner-msg')"/>
<div slot="declineContent">
{{ $t('cancel')}}
</div>
<div slot="acceptContent">
OK
</div>
</consent-banner>
</template>
<script>
/* eslint-disable no-console */
import ConsentBanner from 'vue-cookie-accept-decline'
export default {
name: 'matomo-consent-banner',
components: { ConsentBanner },
data() {
return {
'cookieDuration': 14, // Number of days before the cookie expires, and the banner reappears
}
},
methods: {
'checkCookie': function(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
},
'accept': function() {
this.$matomo.rememberConsentGiven(this.cookieDuration*24)
},
'decline': function() {
this.$matomo.forgetConsentGiven()
},
'consent': function () {
return this.checkCookie('mtm_consent') != null
},
'checkState': function (state) {
switch (state) {
case 'accept' : {
if (! this.consent()) {
this.$refs.cnsntbnnr.removeCookie()
this.$refs.cnsntbnnr.init()
}
}
break
case 'decline': {
if (this.consent()) {
this.$refs.cnsntbnnr.removeCookie()
this.$refs.cnsntbnnr.init()
}
}
}
}
}
}
</script>
<style>
@import '../../node_modules/vue-cookie-accept-decline/dist/vue-cookie-accept-decline.css';
</style>
Subproject commit 60dbd1993c2354dab9d3065ef1879e877bc7c50d
Subproject commit 4db17512e132e38e2b03ac5e608d1ca3ef3a32b3
......@@ -10,6 +10,81 @@ import './registerServiceWorker'
import './plugins/axios'
import './assets/scss/app.scss'
import VueMatomo from 'vue-matomo'
Vue.use(VueMatomo, {
// Configure your matomo server and site by providing
host: 'https://piwik.allmende.io',
siteId: 18,
// Changes the default .js and .php endpoint's filename
// Default: 'matomo'
trackerFileName: 'matomo',
// Overrides the autogenerated tracker endpoint entirely
// Default: undefined
// trackerUrl: 'https://example.com/whatever/endpoint/you/have',
// Overrides the autogenerated tracker script path entirely
// Default: undefined
// trackerScriptUrl: 'https://example.com/whatever/script/path/you/have',
// Enables automatically registering pageviews on the router
router: router,
// Enables link tracking on regular links. Note that this won't
// work for routing links (ie. internal Vue router links)
// Default: true
enableLinkTracking: true,
// Require consent before sending tracking information to matomo
// Default: false
requireConsent: true,
// Whether to track the initial page view
// Default: true
trackInitialView: true,
// Run Matomo without cookies
// Default: false
disableCookies: false,
// Enable the heartbeat timer (https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page)
// Default: false
enableHeartBeatTimer: false,
// Set the heartbeat timer interval
// Default: 15
heartBeatTimerInterval: 15,
// Whether or not to log debug information
// Default: false
debug: false,
// UserID passed to Matomo (see https://developer.matomo.org/guides/tracking-javascript-guide#user-id)
// Default: undefined
userId: undefined,
// Share the tracking cookie across subdomains (see https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains)
// Default: undefined, example '*.example.com'
cookieDomain: '*.solidbase.info',
// Tell Matomo the website domain so that clicks on these domains are not tracked as 'Outlinks'
// Default: undefined, example: '*.example.com'
domains: '*.solidbase.info',
// A list of pre-initialization actions that run before matomo is loaded
// Default: []
// Example: [
// ['API_method_name', parameter_list],
// ['setCustomVariable','1','VisitorType','Member'],
// ['appendToTrackingUrl', 'new_visit=1'],
// etc.
// ]
preInitActions: []
});
Vue.use(Buefy, {
defaultIconPack: 'fas'
})
......
......@@ -13,6 +13,7 @@
<strong>Build number: </strong>{{ commits }}<strong>&nbsp;Build date:</strong> {{ buildDate }}
<h2><br><br>data</h2>
<h3>solid</h3>
<p class="blocktext" v-html="$t('about-data-1')" />
<p class="blocktext" v-html="$t('about-data-2')" />
<br>
......@@ -30,6 +31,11 @@
</template>
</b-table>
<h3><br>matomo</h3>
<p class="blocktext" v-html="$t('about-data-3')" />
<b-button type="is-primary" @click="removeCookie" style="margin:5px">{{ $t('review-tracker-settings') }}</b-button>
<h2><br><br>{{$t('translation')}}</h2>
<p v-html="$t('about-translation-p1')" />
<p v-html="$t('about-translation-p2')" />
......@@ -54,17 +60,23 @@
style="margin:auto;" />
<p v-html="$t('about-funding')" />
</div>
<mtmConsent ref="mtmcnsnt"/>
</div>
</template>
<script>
import locale2 from 'locale2'
import mtmConsent from '@/components/matomo-consent-banner.vue'
import {
version
} from '../../package.json'
export default {
name: 'About',
components: {
mtmConsent
},
data() {
return {
idps: [
......@@ -82,7 +94,7 @@ export default {
{
provider: {
displayName: "solid.community",
url: "https://forum.solidproject.org/t/support-proposals-for-solid-community-pod-server/2666?u=yova"
url: "https://forum.solidproject.org/t/support-proposals-for-solid-community-pod-server/2666"
},
terms: {
displayName: "None yet",
......@@ -93,7 +105,7 @@ export default {
{
provider: {
displayName: "SolidBase Development",
url: "https://forum.solidproject.org/t/support-proposals-for-solid-community-pod-server/2666?u=yova"
url: "https://lab.allmende.io/solidbase/solidbase/"
},
terms: {
displayName: "solidbase.info",
......@@ -133,6 +145,13 @@ export default {
mounted() {
this.$locale = locale2.substr(0, 2)
this.$store.state.locale = this.$locale
},
methods: {
removeCookie() {
_paq.push(['forgetConsentGiven']);
this.$refs.mtmcnsnt.$refs.cnsntbnnr.removeCookie()
this.$refs.mtmcnsnt.$refs.cnsntbnnr.init()
}
}
}
</script>
......@@ -326,6 +326,7 @@
<b-icon pack="fas" icon="sync-alt" size="is-large" custom-class="fa-spin">
</b-icon>
</b-loading>
<mtmConsent />
</div>
</template>
......@@ -341,6 +342,8 @@ import ControlField from '@/components/ControlField.vue'
import editPintModalButton from '@/components/editPintModalButton.vue'
import joinIntentsModal from '@/components/joinIntentsModal.vue'
import money from '@/components/money.vue'
import mtmConsent from '@/components/matomo-consent-banner.vue'
const months = ['january', 'february', 'march', 'april', 'may', 'june', 'july',
'august', 'september', 'october', 'november', 'december'
......@@ -372,7 +375,8 @@ export default {
ControlField,
editPintModalButton,
joinIntentsModal,
money
money,
mtmConsent
},
props: ['url'],
data() {
......
......@@ -34,6 +34,7 @@
<hr>
</div>
</div>
<mtmConsent/>
<!-- <div> TODO: make work
<b-loading :is-full-page="true" :active="loggedIn">
......@@ -52,6 +53,7 @@ import locale2 from 'locale2'
import LoginButton from '@/components/LoginButton.vue'
import PersonalInfo from '@/components/PersonalInfo.vue'
import classEditor from '@/components/classEditor.vue'
import mtmConsent from '@/components/matomo-consent-banner.vue'
export default {
name: 'Config',
......@@ -68,7 +70,8 @@ export default {
components: {
LoginButton,
PersonalInfo,
classEditor
classEditor,
mtmConsent
},
computed: {
loggedIn() {
......
......@@ -18,14 +18,19 @@
<p v-html="$t('home-usage-p4')"/>
<p v-html="$t('home-usage-p5')"/>
</div>
<mtmConsent />
</div>
</template>
<script>
import locale2 from 'locale2'
import mtmConsent from '@/components/matomo-consent-banner.vue'
export default {
name: 'home',
components: {
mtmConsent
},
mounted () {
this.$locale = locale2.substr(0,2)
this.$store.state.locale = this.$locale
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment