mirror of
https://github.com/frappe/books.git
synced 2025-01-03 15:17:30 +00:00
fix: routing issue
- re-fix the blank screen issue - show get-started if not done
This commit is contained in:
parent
603f0a3be9
commit
ec99727e5a
@ -232,10 +232,10 @@ export default defineComponent({
|
||||
|
||||
let route = '/get-started';
|
||||
if (hideGetStarted || onboardingComplete) {
|
||||
route = '/';
|
||||
route = localStorage.getItem('lastRoute') || '/';
|
||||
}
|
||||
|
||||
await routeTo(localStorage.getItem('lastRoute') || route);
|
||||
await routeTo(route);
|
||||
},
|
||||
async showDbSelector(): Promise<void> {
|
||||
localStorage.clear();
|
||||
|
@ -15,7 +15,6 @@ import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
||||
import { historyState } from './utils/refs';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{ path: '/index.html', redirect: '/' },
|
||||
{
|
||||
path: '/',
|
||||
component: Dashboard,
|
||||
@ -128,6 +127,10 @@ router.afterEach(({ fullPath }) => {
|
||||
historyState.forward = !!state.forward;
|
||||
historyState.back = !!state.back;
|
||||
|
||||
if (fullPath.includes('index.html')) {
|
||||
return;
|
||||
}
|
||||
|
||||
localStorage.setItem('lastRoute', fullPath);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user