mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-31 01:24:37 +02:00
fix redirection after error
This commit is contained in:
parent
9ffa3673d1
commit
7bc24185eb
@ -9,7 +9,6 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { lastPathStorageKey } from '../keys';
|
||||
|
||||
const props = defineProps({
|
||||
message: {
|
||||
@ -32,10 +31,8 @@ const countdown = () => {
|
||||
counter.value--;
|
||||
if (counter.value > 0)
|
||||
setTimeout(countdown, 1000);
|
||||
else {
|
||||
const lastLocation = localStorage.getItem(lastPathStorageKey) ?? '/';
|
||||
router.push(`/browse${lastLocation}`);
|
||||
}
|
||||
else
|
||||
router.push(`/browse/${cockpit.transport.host}/`);
|
||||
}
|
||||
setTimeout(countdown, 1000);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user