From ec65830c6dcbf829149d7c9a132f1b9066364dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Due=20Bonde?= Date: Tue, 2 Jul 2024 00:10:01 +0200 Subject: [PATCH 01/10] OS2UOL-129: Removed title for user homepage field --- components/views/userView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/views/userView.vue b/components/views/userView.vue index ec50775..a1614a2 100644 --- a/components/views/userView.vue +++ b/components/views/userView.vue @@ -136,7 +136,7 @@ const practicalInfoData = computed(() => { class="user__link" target="_blank" :to="data?.field_homepage?.url" - >{{ data?.field_homepage?.title }}{{ data?.field_homepage?.url }} From 2b16c72ef9f34feebcae011a0e9f8e0313703834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Due=20Bonde?= Date: Tue, 2 Jul 2024 00:10:24 +0200 Subject: [PATCH 02/10] OS2UOL-129: Added error handling SiteTracking.vue --- components/globals/SiteTracking.vue | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/components/globals/SiteTracking.vue b/components/globals/SiteTracking.vue index 8dd7089..5d55494 100644 --- a/components/globals/SiteTracking.vue +++ b/components/globals/SiteTracking.vue @@ -14,23 +14,25 @@ if (settingsDataStore.settingsData === null) { settingsDataStore.setSettingsData(data.value.settings); } -const scriptSrcFull = ref(data.value?.settings.site_tracking_script.trim()); - -const extractScriptSrc = (scriptString: string) => { - const srcMatch = scriptString.match(/src=['"]?([^'"> ]+)['"]?/i); - return srcMatch ? srcMatch[1] : ''; -}; - -let scriptSrc = extractScriptSrc(scriptSrcFull.value); - -useHead({ - script: [ - { - src: scriptSrc, - async: true, - }, - ], -}); +if (data.value?.settings.site_tracking_script !== null) { + const scriptSrcFull = ref(data.value?.settings.site_tracking_script.trim()); + + const extractScriptSrc = (scriptString: string) => { + const srcMatch = scriptString.match(/src=['"]?([^'"> ]+)['"]?/i); + return srcMatch ? srcMatch[1] : ''; + }; + + let scriptSrc = extractScriptSrc(scriptSrcFull.value); + + useHead({ + script: [ + { + src: scriptSrc, + async: true, + }, + ], + }); +} From 6cde67f661619f2c4e89c347572741877e0cfc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Due=20Bonde?= Date: Tue, 2 Jul 2024 00:23:31 +0200 Subject: [PATCH 03/10] OS2UOL-129: Added fields 'Brancher' and 'Muligheder' to PracticalInformation data --- components/views/userView.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/components/views/userView.vue b/components/views/userView.vue index a1614a2..3eab1f3 100644 --- a/components/views/userView.vue +++ b/components/views/userView.vue @@ -1,5 +1,6 @@