From 04967de2b73f5d983c2c67c28d123964eb469cdf Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Thu, 26 Sep 2024 10:44:35 -0600 Subject: [PATCH 01/16] add matomo framework --- src/lib/vue/vuex/CommonActions.js | 7 ++++++- src/renderer/src/views/LandingPage/MapcacheWelcome.vue | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/vue/vuex/CommonActions.js b/src/lib/vue/vuex/CommonActions.js index 514f20b3..7531785d 100644 --- a/src/lib/vue/vuex/CommonActions.js +++ b/src/lib/vue/vuex/CommonActions.js @@ -29,8 +29,13 @@ async function addGeoPackage (projectId, filePath) { } } +function logMatomoEvent (eventString) { + console.log("*********** matomo: " + eventString) +} + export { setDataSourceVisible, addGeoPackage, - deleteProject + deleteProject, + logMatomoEvent } \ No newline at end of file diff --git a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue index 96a767db..2f1f9b0f 100644 --- a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue +++ b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue @@ -32,6 +32,7 @@ diff --git a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue index 96a767db..b50fb6cc 100644 --- a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue +++ b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue @@ -32,6 +32,8 @@ From b29ff9ec5c1a341ee83f9376c9500648a2b2c377 Mon Sep 17 00:00:00 2001 From: Joe Clark Date: Tue, 15 Oct 2024 10:34:42 -0600 Subject: [PATCH 13/16] disable matomo until consent accepted, save consent --- src/lib/vue/vuex/ProjectActions.js | 5 +++++ src/renderer/src/store/modules/UIState.js | 10 ++++++++- .../src/views/LandingPage/MapcacheWelcome.vue | 22 ++++++++++++++----- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/lib/vue/vuex/ProjectActions.js b/src/lib/vue/vuex/ProjectActions.js index 7c24e541..4d0de03f 100644 --- a/src/lib/vue/vuex/ProjectActions.js +++ b/src/lib/vue/vuex/ProjectActions.js @@ -553,6 +553,10 @@ function setActiveGeoPackageFeatureLayer (projectId, geopackageId, tableName) { } } +function setConsent (consent) { + return store.dispatch('UIState/setConsent', {consent}) +} + function setDarkTheme (projectId, enabled) { return store.dispatch('UIState/setDarkTheme', { projectId, enabled }) } @@ -724,6 +728,7 @@ export { setActiveGeoPackage, setActiveGeoPackageFeatureLayer, updateStyleKey, + setConsent, setDarkTheme, notifyTab, clearNotification, diff --git a/src/renderer/src/store/modules/UIState.js b/src/renderer/src/store/modules/UIState.js index 228042e6..0bb0f272 100644 --- a/src/renderer/src/store/modules/UIState.js +++ b/src/renderer/src/store/modules/UIState.js @@ -1,5 +1,7 @@ const getDefaultState = () => { - return {} + return { + consent: false + } } const state = getDefaultState() @@ -28,6 +30,9 @@ const mutations = { deleteProject (state, { projectId }) { delete state[projectId] }, + setConsent (state, consent) { + state.consent = consent + }, setDarkTheme (state, { projectId, enabled }) { state[projectId].dark = enabled }, @@ -77,6 +82,9 @@ const actions = { deleteProject ({ commit }, { projectId }) { commit('deleteProject', { projectId }) }, + setConsent ({ commit }, consent) { + commit('setConsent', consent) + }, setDarkTheme ({ commit }, { projectId, enabled }) { commit('setDarkTheme', { projectId, enabled }) }, diff --git a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue index c03d2db1..1107960d 100644 --- a/src/renderer/src/views/LandingPage/MapcacheWelcome.vue +++ b/src/renderer/src/views/LandingPage/MapcacheWelcome.vue @@ -11,7 +11,6 @@ -
GeoPackage Icon

MapCache

@@ -44,6 +43,8 @@