feat(themes): improve workshop filtering and fork controls
Add a compact used-tag filter, preserve workshop ownership across theme reloads, and let authors disable forking for their themes.
This commit is contained in:
1 parent
ebc5fbf9c4
commit
3ef59f94ee
6 files changed
+349
-50
No files matched your search
@@ -3422,6 +3422,7 @@
|
||||
version: definition.version || '1.0.0',
|
||||
apiVersion: definition.apiVersion || '2.0.0',
|
||||
tags: definition.tags ?? [],
|
||||
allowForking: definition.allowForking !== false,
|
||||
onProgress: (msg, pct) => {
|
||||
publishStatusMessage = msg;
|
||||
publishProgress = pct;
|
||||
@@ -3439,6 +3440,15 @@
|
||||
} catch (err) {
|
||||
console.warn('[Workshop] Could not store the theme ID in theme.json:', err);
|
||||
}
|
||||
|
||||
// The launcher window owns the installed-theme list. Tell it about the
|
||||
// new workshop ID so reporting is hidden immediately after publishing.
|
||||
await emit('theme-published', {
|
||||
themeId: result.themeId,
|
||||
name: definition.name,
|
||||
}).catch((err) => {
|
||||
console.warn('[Workshop] Could not notify the launcher about the published theme:', err);
|
||||
});
|
||||
}
|
||||
|
||||
sileo.success({
|
||||
@@ -5073,6 +5083,27 @@
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="flex items-start justify-between gap-3 rounded-md border border-theme-800 bg-theme-950 px-3 py-2.5"
|
||||
>
|
||||
<div class="space-y-0.5">
|
||||
<Label for="theme-allow-forking" class="text-xs font-medium text-theme-100">
|
||||
Allow forking
|
||||
</Label>
|
||||
<p class="text-[10px] leading-relaxed text-muted-foreground">
|
||||
Let other creators fork this theme from the workshop. Takes effect when you publish
|
||||
or update it; existing forks are not affected.
|
||||
</p>
|
||||
</div>
|
||||
<Checkbox
|
||||
id="theme-allow-forking"
|
||||
class="mt-0.5"
|
||||
checked={definition.allowForking !== false}
|
||||
onCheckedChange={(checked) => {
|
||||
definition.allowForking = checked === true;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div class="space-y-1.5">
|
||||
<Label for="theme-accent" class={labelClass}>Accent</Label>
|
||||
<div class="flex items-center gap-2">
|
||||
|
||||
Reference in new issue
Block a user