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

Commit 58fd454

Browse files
committed
fix: move "show solutions" to editor panel
1 parent df1467d commit 58fd454

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

components/PanelDocs.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ const sourceUrl = computed(() => page.value?._file
1212
<div flex="~ gap-2 items-center" border="b base dashed" bg-faded px4 py2>
1313
<div i-ph-book-duotone />
1414
<span text-sm>Guide</span>
15-
<div flex-auto />
16-
<button
17-
v-if="guide.currentGuide?.solutions"
18-
my--1 mr--2 rounded px2 py1 text-sm op50
19-
hover="bg-active op100"
20-
flex="~ gap-2 items-center"
21-
@click="guide.toggleSolutions()"
22-
>
23-
<div v-if="!guide.showingSolution " i-ph-lightbulb-filament-duotone />
24-
<div v-else i-ph-arrow-counter-clockwise-duotone />
25-
{{ guide.showingSolution ? 'Reset challenge' : 'Show solution' }}
26-
</button>
2715
</div>
2816
<article class="max-w-none prose" of-auto p6>
2917
<ContentDoc />

components/PanelEditor.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ const panelInitEditor = computed(() => isMounted.value || {
5555
>
5656
<div i-ph-text-t-duotone />
5757
<span text-sm>Editor</span>
58+
<div flex-auto />
59+
<button
60+
v-if="guide.currentGuide?.solutions"
61+
my--1 mr--3 rounded px2 py1 text-sm op50
62+
hover="bg-active op100"
63+
flex="~ gap-2 items-center"
64+
@click="guide.toggleSolutions()"
65+
>
66+
<div v-if="!guide.showingSolution " i-ph-lightbulb-filament-duotone />
67+
<div v-else i-ph-arrow-counter-clockwise-duotone />
68+
{{ guide.showingSolution ? 'Reset challenge' : 'Show solution' }}
69+
</button>
5870
</div>
5971
<Splitpanes
6072
of-hidden

0 commit comments

Comments
 (0)