mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-04 16:22:48 +08:00
Adjust learn page settings and defaults
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -23,7 +23,7 @@ export const LEARN_CONFIG_DEFAULTS: LearnConfig = {
|
||||
tts: false,
|
||||
radioLevel: 4,
|
||||
voice: '',
|
||||
audioChallenge: false,
|
||||
audioChallenge: true,
|
||||
audioSpeed: 1,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user