Skip to content

Commit 7829c22

Browse files
committed
chore: ui improvements on footer and buttons to edit
1 parent 9ad324d commit 7829c22

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

src/app/src/App.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function detectActiveDocuments() {
2323
})
2424
}
2525
26-
async function onContentSelect(id: string) {
26+
async function editContentFile(id: string) {
2727
await documentTree.selectItemById(id)
2828
ui.openPanel(StudioFeature.Content)
2929
}
@@ -59,19 +59,20 @@ host.on.mounted(() => {
5959
>
6060
<UButton
6161
icon="i-lucide-panel-left-open"
62-
size="lg"
63-
color="primary"
64-
class="shadow-lg"
62+
size="sm"
63+
color="neutral"
64+
class="shadow"
6565
@click="ui.panels.content = true"
6666
/>
6767
<UButton
6868
v-if="activeDocuments.length === 1"
69-
icon="i-lucide-file-text"
70-
size="lg"
69+
icon="i-lucide-pen"
70+
size="sm"
71+
color="neutral"
7172
variant="outline"
72-
label="Edit This Page"
73-
class="shadow-lg bg-white hover:bg-gray-100"
74-
@click="onContentSelect(activeDocuments[0].id)"
73+
label="Edit this page"
74+
class="shadow"
75+
@click="editContentFile(activeDocuments[0].id)"
7576
/>
7677
</div>
7778
</UApp>

src/app/src/components/panel/base/PanelBaseFooter.vue

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,47 @@ const userMenuItems = computed(() => [
1919
</script>
2020

2121
<template>
22-
<UFooter class="h-var(--ui-footer-height) sticky bottom-0 bg-white">
22+
<UFooter
23+
class="h-var(--ui-footer-height) sticky bottom-0 bg-white"
24+
:ui="{ container: 'px-2 sm:px-2 lg:px-2', right: 'gap-0' }"
25+
>
2326
<template #left>
2427
<UDropdownMenu
2528
:portal="false"
2629
:items="userMenuItems"
27-
:ui="{ slots: { content: 'w-full' } }"
28-
placeholder="Select a content"
30+
:ui="{ content: 'w-full' }"
31+
size="xs"
2932
>
3033
<UButton
3134
color="neutral"
3235
variant="ghost"
33-
size="xs"
34-
>
35-
<UAvatar
36-
:src="user?.avatar"
37-
size="xs"
38-
/>
39-
<span>{{ user?.name }}</span>
40-
</UButton>
36+
size="sm"
37+
:avatar="{ src: user?.avatar, alt: user?.name, size: '2xs' }"
38+
class="px-2 font-medium"
39+
:label="user?.name"
40+
/>
4141
</UDropdownMenu>
4242
</template>
4343

4444
<template #right>
45-
<UTooltip :text="uiConfig.syncEditorAndRoute ? 'Disable synchronization between editor and host' : 'Enable synchronization between editor and host'">
45+
<UTooltip
46+
:text="uiConfig.syncEditorAndRoute ? 'Unlink editor and preview' : 'Link editor and preview'"
47+
:delay-duration="0"
48+
>
4649
<UButton
4750
icon="i-lucide-arrow-left-right"
48-
variant="link"
49-
:color="uiConfig.syncEditorAndRoute ? 'success' : 'neutral'"
50-
size="md"
51+
variant="ghost"
52+
:color="uiConfig.syncEditorAndRoute ? 'info' : 'neutral'"
53+
:class="!uiConfig.syncEditorAndRoute && 'opacity-50'"
54+
size="sm"
5155
@click="uiConfig.syncEditorAndRoute = !uiConfig.syncEditorAndRoute"
5256
/>
5357
</UTooltip>
5458
<UButton
5559
icon="i-lucide-panel-left-close"
56-
variant="link"
60+
variant="ghost"
5761
color="neutral"
58-
size="md"
62+
size="sm"
5963
@click="ui.closePanels()"
6064
/>
6165
</template>

0 commit comments

Comments
 (0)