Skip to content

Commit

Permalink
fix(server-routes): persistence between route switches (#186)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
arashsheyda and antfu committed Apr 17, 2023
1 parent f47060e commit 2791d3e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/devtools/client/pages/modules/server-routes.vue
Expand Up @@ -46,6 +46,7 @@ const filtered = computed(() => {
<template v-for="item of filtered" :key="item.id">
<NuxtLink
flex="~ gap-2" items-center hover-bg-active px2 py1
:class="[{ 'bg-active': selected?.path === item.path }]"
:to="{ query: { path: item.path } }"
>
<div w-12 flex-none text-right>
Expand All @@ -61,12 +62,14 @@ const filtered = computed(() => {
</template>
</template>
<template #right>
<ServerRouteDetails
v-if="selected"
:key="selected.path"
:route="selected"
/>
<NPanelGrids v-else>
<KeepAlive :max="10">
<ServerRouteDetails
v-if="selected"
:key="selected.path"
:route="selected"
/>
</KeepAlive>
<NPanelGrids v-if="!selected">
<NCard px6 py2>
<span op75>Select a route to start</span>
</NCard>
Expand Down

0 comments on commit 2791d3e

Please sign in to comment.