|
@@ -67,6 +67,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
|
|
|
const username = ref('')
|
|
const username = ref('')
|
|
const password = ref('')
|
|
const password = ref('')
|
|
@@ -76,7 +77,8 @@ const language = ref('en')
|
|
const handleLogin = () => {
|
|
const handleLogin = () => {
|
|
if (username.value === 'admin' && password.value === 'admin') {
|
|
if (username.value === 'admin' && password.value === 'admin') {
|
|
// Redirect to portal
|
|
// Redirect to portal
|
|
- window.location.href = '/portal'
|
|
|
|
|
|
+ const router = useRoute();
|
|
|
|
+ router.push('/portal')
|
|
} else {
|
|
} else {
|
|
alert('Invalid username or password')
|
|
alert('Invalid username or password')
|
|
}
|
|
}
|