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

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>

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script setup lang="ts" xmlns="http://www.w3.org/1999/html">
import ThreeColumn from '@/components/layout/ThreeColumn.vue'
import ReactionDisplay from '@/components/reaction/ReactionDisplay.vue'
import ReactionList from '@/components/reaction/ReactionList.vue'