From 93ef853403c7fb384d10aca8c3caa341ea1c760c Mon Sep 17 00:00:00 2001 From: Oliver Fritz Date: Tue, 30 Jul 2024 12:52:56 +0200 Subject: [PATCH] feat: send app version and client type with results to Firebase --- src/views/ProjectView.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/ProjectView.vue b/src/views/ProjectView.vue index 1392524..8938156 100644 --- a/src/views/ProjectView.vue +++ b/src/views/ProjectView.vue @@ -15,6 +15,7 @@ import { decode } from 'base-64' import { mapStores } from 'pinia' import { i18nRoute } from '@/i18n/translation' import { useCurrentUserStore } from '@/stores/currentUser' +import { version } from '../../package.json' import matchIcon from '@/utils/matchIcon' import BasicPage from '@/components/BasicPage.vue' import CompareProject from '@/components/CompareProject.vue' @@ -55,9 +56,14 @@ export default defineComponent({ saveResults: (results, startTime) => { const numberOfTasks = Object.keys(results).length const endTime = new Date().toISOString() + const dev = import.meta.env.DEV + const appVersion = version + (dev ? '-dev' : '') + const clientType = 'web' this.mappingSpeed = (Date.parse(endTime) - Date.parse(startTime)) / numberOfTasks const entry = { + appVersion, + clientType, endTime, results, startTime,