Seamless host switching
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<Navbar v-model:server="server" :user="user" />
|
||||
<div class="container">
|
||||
<Login :secret="secret" v-model:client="client" v-model:server="server" v-model:user="user" />
|
||||
<router-view v-if="user"></router-view>
|
||||
<router-view v-if="user" :client="client"></router-view>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -38,10 +38,10 @@
|
||||
if(this.heartbeat) window.clearInterval(this.heartbeat);
|
||||
else {
|
||||
[
|
||||
{ path: '/', component: RouteSchedule, props: { client: this.client } },
|
||||
{ path: '/patient', component: RoutePatientLookup, props: { client: this.client } },
|
||||
{ path: '/patient/:id', component: RoutePatientDetail, props: { client: this.client } },
|
||||
{ path: '/recall', component: RouteRecall, props: { client: this.client } },
|
||||
{ path: '/', component: RouteSchedule },
|
||||
{ path: '/patient', component: RoutePatientLookup },
|
||||
{ path: '/patient/:id', component: RoutePatientDetail },
|
||||
{ path: '/recall', component: RouteRecall },
|
||||
].forEach(route => this.$root.$router.addRoute(route));
|
||||
await this.$root.$router.replace(this.$route);
|
||||
}
|
||||
|
Reference in New Issue
Block a user