Adjust learn page settings and defaults

This commit is contained in:
Remi
2025-09-19 11:29:57 +02:00
parent 0abd7c049e
commit d034116ea5
2 changed files with 6 additions and 2 deletions

View File

@@ -71,8 +71,10 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { useRoute } from '#imports';
const { hasConsent, analyticsEnabled, acceptAll, rejectAll, savePreferences } = useCookieConsent();
const route = useRoute();
const isDialogVisible = ref(!hasConsent.value);
const isManuallyOpened = ref(false);
@@ -108,7 +110,9 @@ watch(
}
);
const showManageButton = computed(() => hasConsent.value && !isDialogVisible.value);
const restrictedRoute = computed(() => route.path.startsWith('/learn') || route.path.startsWith('/pm'));
const showManageButton = computed(() => hasConsent.value && !isDialogVisible.value && !restrictedRoute.value);
const closeDialog = () => {
isDialogVisible.value = false;

View File

@@ -23,7 +23,7 @@ export const LEARN_CONFIG_DEFAULTS: LearnConfig = {
tts: false,
radioLevel: 4,
voice: '',
audioChallenge: false,
audioChallenge: true,
audioSpeed: 1,
}