feat: demo flags (#1084)

This commit is contained in:
Jonas Plum
2024-07-21 04:07:23 +02:00
committed by GitHub
parent 91429effe2
commit a9e885598c
16 changed files with 217 additions and 108 deletions
+9 -6
View File
@@ -29,13 +29,16 @@ const { data: config } = useQuery({
queryFn: (): Promise<Record<string, Array<String>>> => pb.send('/api/config', {})
})
watch(config, (newConfig) => {
if (!newConfig) return
if (newConfig['flags'].includes('demo') || newConfig['flags'].includes('dev')) {
mail.value = 'user@catalyst-soar.com'
password.value = '1234567890'
watch(
() => config.value,
() => {
if (!config.value) return
if (config.value['flags'].includes('demo') || config.value['flags'].includes('dev')) {
mail.value = 'user@catalyst-soar.com'
password.value = '1234567890'
}
}
})
)
</script>
<template>