Skip to content

Commit ae80637

Browse files
feat: replace is_public checkbox with 3-option visibility selector
Dashboard shows public/unlisted/private select. Fork defaults to unlisted. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 82464e4 commit ae80637

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
description: `Forked from @${data.configUser.username}`,
7070
base_preset: data.config.base_preset,
7171
packages: data.config.packages,
72-
is_public: true,
72+
visibility: 'unlisted',
7373
custom_script: data.config.custom_script || '',
7474
dotfiles_repo: data.config.dotfiles_repo || '',
7575
snapshot: data.config.snapshot || null,

src/routes/dashboard/+page.svelte

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
name: string;
1313
description: string;
1414
base_preset: string;
15-
is_public: number;
15+
visibility: string;
1616
alias: string | null;
1717
packages?: any[];
1818
custom_script?: string;
@@ -34,7 +34,7 @@
3434
name: '',
3535
description: '',
3636
base_preset: 'developer',
37-
is_public: true,
37+
visibility: 'unlisted' as string,
3838
alias: '',
3939
packages: [] as string[],
4040
custom_script: '',
@@ -238,7 +238,7 @@
238238
name: config.name,
239239
description: config.description || '',
240240
base_preset: config.base_preset,
241-
is_public: config.is_public === 1,
241+
visibility: config.visibility || 'unlisted',
242242
alias: config.alias || '',
243243
packages: config.packages || [],
244244
custom_script: config.custom_script || '',
@@ -267,7 +267,7 @@
267267
name: '',
268268
description: '',
269269
base_preset: 'developer',
270-
is_public: true,
270+
visibility: 'unlisted',
271271
alias: '',
272272
packages: [],
273273
custom_script: '',
@@ -441,7 +441,7 @@
441441
name: 'Imported Config',
442442
description: `Imported from Brewfile (${data.packages.length} packages)`,
443443
base_preset: 'minimal',
444-
is_public: true,
444+
visibility: 'unlisted',
445445
alias: '',
446446
packages: data.packages,
447447
custom_script: '',
@@ -535,9 +535,9 @@
535535
{/if}
536536
</div>
537537
</div>
538-
<span class="badge" class:public={config.is_public} class:private={!config.is_public}>
539-
{config.is_public ? 'Public' : 'Private'}
540-
</span>
538+
<span class="badge" class:public={config.visibility === 'public'} class:unlisted={config.visibility === 'unlisted'} class:private={config.visibility === 'private'}>
539+
{config.visibility}
540+
</span>
541541
</div>
542542
{#if config.description}
543543
<p class="config-description">{config.description}</p>
@@ -598,11 +598,14 @@
598598
</div>
599599

600600
<div class="form-group">
601-
<label class="checkbox-label">
602-
<input type="checkbox" bind:checked={formData.is_public} />
603-
<span>Public (anyone can use this install URL)</span>
604-
</label>
605-
</div>
601+
<label class="form-label" for="config-visibility">Visibility</label>
602+
<select id="config-visibility" class="form-select" bind:value={formData.visibility}>
603+
<option value="public">Public — listed on profile, install URL works</option>
604+
<option value="unlisted">Unlisted — not listed, but install URL works</option>
605+
<option value="private">Private — only you can access</option>
606+
</select>
607+
<p class="form-hint">Unlisted configs can still be installed by anyone with the URL.</p>
608+
</div>
606609

607610
<div class="form-group">
608611
<label class="form-label" for="config-alias">Short Alias (Optional)</label>
@@ -1034,6 +1037,11 @@
10341037
color: var(--accent);
10351038
}
10361039
1040+
.badge.unlisted {
1041+
background: rgba(234, 179, 8, 0.2);
1042+
color: #eab308;
1043+
}
1044+
10371045
.badge.private {
10381046
background: rgba(239, 68, 68, 0.2);
10391047
color: var(--danger);
@@ -1153,18 +1161,7 @@
11531161
margin-top: 6px;
11541162
}
11551163
1156-
.checkbox-label {
1157-
display: flex;
1158-
align-items: center;
1159-
gap: 8px;
1160-
cursor: pointer;
1161-
}
11621164
1163-
.checkbox-label input {
1164-
width: 16px;
1165-
height: 16px;
1166-
accent-color: var(--accent);
1167-
}
11681165
11691166
.alias-input {
11701167
display: flex;

0 commit comments

Comments
 (0)