Skip to content

Commit 3e4bd6c

Browse files
committed
visual(pages): highlight active horizontal page
1 parent 5553d2f commit 3e4bd6c

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

apps/client/src/layouts/PagesLayout/MainContent/DisplayUI/DisplayHorizontalPage.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div
33
class="horizontal-page"
4+
:class="{ active }"
45
@click="internals.pages.goToPage(pageId)"
56
>
67
<div class="group-title">
@@ -28,6 +29,7 @@ import { useRealtimeContext } from 'src/code/realtime/context';
2829
2930
const props = defineProps<{
3031
pageId: string;
32+
active: boolean;
3133
}>();
3234
3335
const realtimeCtx = useRealtimeContext();
@@ -70,6 +72,16 @@ const isEmpty = computed(
7072
cursor: pointer;
7173
7274
max-width: min(120px, 100vw / 4);
75+
76+
padding-top: 6px;
77+
padding-right: 5px;
78+
padding-bottom: 2px;
79+
padding-left: 5px;
80+
}
81+
.horizontal-page.active {
82+
border-radius: 4px;
83+
84+
background-color: rgba(255, 255, 255, 0.1);
7385
}
7486
7587
.group-title {

apps/client/src/layouts/PagesLayout/MainContent/DisplayUI/DisplayHorizontalPath.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"
1717
>
1818
<div style="display: inline-block; pointer-events: auto">
19-
<div style="display: flex; gap: 5px; direction: ltr">
19+
<div style="display: flex; align-items: center; direction: ltr">
2020
<template
2121
v-for="(pageId, index) in internals.pages.react.pathPageIds.slice(
2222
0,
@@ -26,12 +26,15 @@
2626
>
2727
<span
2828
v-if="index > 0"
29-
style="color: #808080"
29+
style="color: #808080; margin-top: -2px"
3030
>
3131
>
3232
</span>
3333

34-
<DisplayHorizontalPage :page-id="pageId" />
34+
<DisplayHorizontalPage
35+
:page-id="pageId"
36+
:active="index === internals.pages.react.pageIndex"
37+
/>
3538
</template>
3639
</div>
3740
</div>

0 commit comments

Comments
 (0)