Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 4201755

Browse files
committed
ui: improve preview input design
1 parent df1a6d1 commit 4201755

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

components/PanelPreview.vue

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,19 @@ function navigate() {
4444
<div
4545
v-if="play.status === 'ready'"
4646
flex="~ items-center gap-2"
47-
border="b base dashed" bg-faded pl4 pr2
47+
border="b base dashed" bg-faded pl1 pr2
4848
>
49-
<div flex="~ gap-2 items-center" py2>
49+
<div
50+
v-if="guide.features.navigation"
51+
flex="~ auto gap-2 items-center"
52+
border="~ base"
53+
m1.5 rounded bg-faded px2 py0.5 tracking-wide
54+
>
5055
<div i-ph-globe-duotone />
51-
<span text-sm>Preview</span>
52-
</div>
53-
<div v-if="guide.features.navigation" flex px-2 py1>
56+
<span text-sm op50>Preview</span>
5457
<div
55-
flex="~ items-center justify-center"
56-
mx-auto min-w-100 w-full rounded bg-faded px2 text-sm
57-
border="base 1 hover:gray-500/30"
58+
text-sm
59+
flex="~ items-center justify-center auto"
5860
:class="{
5961
'pointer-events-none': !preview.url,
6062
}"
@@ -65,18 +67,24 @@ function navigate() {
6567
w-full flex-1 bg-transparent focus:outline-none
6668
>
6769
</form>
68-
<div flex="~ items-center justify-end">
69-
<button
70-
v-if="preview.url"
71-
mx1 op-75 hover:op-100
72-
@click="refreshIframe"
73-
>
74-
<div i-ph-arrow-clockwise-duotone text-sm />
75-
</button>
76-
</div>
7770
</div>
7871
</div>
79-
<div flex-auto />
72+
<div
73+
v-else
74+
flex="~ gap-2 auto items-center" px2 py2
75+
>
76+
<div i-ph-globe-duotone />
77+
<span text-sm>Preview</span>
78+
</div>
79+
<button
80+
v-if="preview.url && guide.features.navigation"
81+
rounded p1
82+
hover="bg-active"
83+
title="Refresh Preview"
84+
@click="refreshIframe"
85+
>
86+
<div i-ph-arrow-clockwise-duotone text-lg />
87+
</button>
8088
<VDropdown :distance="6">
8189
<button
8290
rounded p1

0 commit comments

Comments
 (0)