Handle demo version of the app (#256)

This commit is contained in:
mchev
2025-01-12 13:56:52 +01:00
committed by GitHub
parent f52b73f517
commit 9bed81fe8f
7 changed files with 115 additions and 23 deletions

View File

@@ -57,7 +57,7 @@
<script setup>
import axios from 'axios'
import { ref, computed } from 'vue'
import { ref, computed, onMounted } from 'vue'
import { useNotificationStore } from '@/scripts/stores/notification'
import { useRouter } from 'vue-router'
import { required, email, helpers } from '@vuelidate/validators'
@@ -120,4 +120,12 @@ async function onSubmit() {
isLoading.value = false
}
}
// Pre-fill demo credentials if in demo environment
onMounted(() => {
if (window.demo_mode) {
authStore.loginData.email = 'demo@invoiceshelf.com'
authStore.loginData.password = 'demo'
}
})
</script>