Skip to content

Commit

Permalink
Highlight current view in the edit-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Sep 27, 2023
1 parent 51b5d45 commit 319310a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/EditMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
:key="view.hash"
class="flex items-center justify-between w-full my-1"
>
<Button class="flex items-center justify-center w-full h-8 overflow-auto" @click="store.selectView(view)">
<Button
class="flex items-center justify-center w-full h-8 overflow-auto"
:class="{ 'selected-view': view === store.currentView }"
@click="store.selectView(view)"
>
<p class="overflow-hidden text-sm text-ellipsis ml-7 whitespace-nowrap">{{ view.name }}</p>
<div class="grow" />
<div class="icon-btn mdi mdi-cog" @click="renameView(view)" />
Expand Down Expand Up @@ -365,4 +369,8 @@ const { pressed: mousePressed } = useMousePressed()
.icon-btn:hover {
@apply bg-slate-500;
}
.selected-view {
@apply bg-slate-400;
}
</style>

0 comments on commit 319310a

Please sign in to comment.