more tracking; hide arb from welcome splash

This commit is contained in:
tim
2025-04-15 19:21:39 -04:00
parent f35b30e337
commit 14b8b50812
11 changed files with 48 additions and 17 deletions

View File

@@ -12,9 +12,11 @@ const props = defineProps({
name: {type: String, required: true},
when: {type: Boolean, default: true}, // optional conditional for when to show
after: {type: String, default: null}, // set to the name of another hint that must happen before this hint, to chain hints into a tutorial.
onComplete: {type: Function, default: null},
})
const forceClose = ref(false)
const shown = ref(false)
const show = computed({
get() {
@@ -23,11 +25,13 @@ const show = computed({
const afterOk = props.after === null || prefs.hints[props.after];
const result = !forceClose.value && !shownBefore && whenOk && afterOk
// console.log(`show ${props.name}? ${result} <=`, !forceClose.value, whenOk, afterOk, prefs.hints)
if (result)
if (result) {
shown.value = true
prefs.hints[props.name] = true
}
return result
},
set(v) { if(!v) forceClose.value=true; }
set(v) { if(!v) { forceClose.value=true; if (shown.value && props.onComplete) props.onComplete(); } }
})
</script>