Skip to content

Commit 9075712

Browse files
committed
feat(ui): refine config actions and collapse custom script by default
1 parent 368fc3a commit 9075712

File tree

1 file changed

+65
-13
lines changed

1 file changed

+65
-13
lines changed

src/routes/[username]/[slug]/+page.svelte

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,16 @@
188188
{/if}
189189
</button>
190190
</div>
191-
<button class="fork" onclick={forkConfig} disabled={forking}>
192-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><circle cx="18" cy="6" r="3"/><path d="M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9"/><path d="M12 12v3"/></svg>
193-
{forking ? 'Forking...' : 'Fork'}
194-
</button>
191+
<div class="install-actions">
192+
<button class="share-inline" onclick={openShareModal}>
193+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg>
194+
Share
195+
</button>
196+
<button class="fork" onclick={forkConfig} disabled={forking}>
197+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="18" r="3"/><circle cx="6" cy="6" r="3"/><circle cx="18" cy="6" r="3"/><path d="M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9"/><path d="M12 12v3"/></svg>
198+
{forking ? 'Forking...' : 'Fork to Dashboard'}
199+
</button>
200+
</div>
195201
{#if forkError}
196202
<div class="error">{forkError}</div>
197203
{/if}
@@ -364,7 +370,7 @@
364370
{/if}
365371

366372
{#if data.config.custom_script}
367-
<details class="detail-card" open>
373+
<details class="detail-card">
368374
<summary>
369375
<span class="detail-icon">⚡</span>
370376
<span class="detail-title">Custom Installation Script</span>
@@ -652,21 +658,51 @@
652658
align-items: center;
653659
justify-content: center;
654660
gap: 8px;
655-
width: 100%;
656-
padding: 14px 20px;
657-
background: var(--bg-secondary);
658-
border: 2px solid var(--border);
659-
border-radius: 12px;
660-
color: var(--text-primary);
661-
font-size: 0.95rem;
661+
padding: 10px 14px;
662+
background: color-mix(in srgb, var(--bg-secondary) 85%, transparent);
663+
border: 1px solid var(--border);
664+
border-radius: 999px;
665+
color: var(--text-secondary);
666+
font-size: 0.85rem;
662667
font-weight: 600;
663668
cursor: pointer;
664-
transition: all 0.2s;
669+
transition: all 0.2s ease;
670+
white-space: nowrap;
671+
}
672+
673+
.install-actions {
674+
display: flex;
675+
justify-content: flex-end;
676+
gap: 8px;
677+
}
678+
679+
.share-inline {
680+
display: flex;
681+
align-items: center;
682+
justify-content: center;
683+
gap: 8px;
684+
padding: 10px 14px;
685+
background: color-mix(in srgb, var(--bg-secondary) 85%, transparent);
686+
border: 1px solid var(--border);
687+
border-radius: 999px;
688+
color: var(--text-secondary);
689+
font-size: 0.85rem;
690+
font-weight: 600;
691+
cursor: pointer;
692+
transition: all 0.2s ease;
693+
white-space: nowrap;
694+
}
695+
696+
.share-inline:hover {
697+
border-color: var(--accent);
698+
color: var(--accent);
699+
background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
665700
}
666701
667702
.fork:hover:not(:disabled) {
668703
border-color: var(--accent);
669704
color: var(--accent);
705+
background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
670706
}
671707
672708
.fork:disabled {
@@ -1371,5 +1407,21 @@
13711407
width: 100%;
13721408
justify-content: center;
13731409
}
1410+
1411+
.install-actions {
1412+
justify-content: stretch;
1413+
}
1414+
1415+
.fork {
1416+
width: 100%;
1417+
border-radius: 12px;
1418+
padding: 12px 14px;
1419+
}
1420+
1421+
.share-inline {
1422+
width: 100%;
1423+
border-radius: 12px;
1424+
padding: 12px 14px;
1425+
}
13741426
}
13751427
</style>

0 commit comments

Comments
 (0)