fix(ui): dedupe custom theme buttons, background list spacing, folder icon colour

This commit is contained in:
SethBurkart123 committed 2026-10-29 10:59:45 +11:00
1 parent a967e2c2fb
commit 9bfc0989c1
3 files changed
+5 -35

No files matched your search

@@ -182,7 +182,7 @@
{#if !(videoBackgrounds.length === 0 && isEditMode)} {#if !(videoBackgrounds.length === 0 && isEditMode)}
<h2 class="py-2 text-lg font-bold">Background Videos</h2> <h2 class="py-2 text-lg font-bold">Background Videos</h2>
<div class="flex flex-wrap gap-4"> <div class="flex flex-wrap gap-4 mb-4">
{#if !isEditMode} {#if !isEditMode}
<BackgroundUploader onFileChange={handleFileChange} /> <BackgroundUploader onFileChange={handleFileChange} />
{/if} {/if}
@@ -138,8 +138,6 @@
const customThemeActionClass = const customThemeActionClass =
'flex h-12 items-center justify-center gap-2 w-full rounded-xl transition bg-zinc-100 text-xl dark:bg-zinc-900 dark:text-white hover:bg-zinc-200 dark:hover:bg-zinc-800' 'flex h-12 items-center justify-center gap-2 w-full rounded-xl transition bg-zinc-100 text-xl dark:bg-zinc-900 dark:text-white hover:bg-zinc-200 dark:hover:bg-zinc-800'
const customThemeActionCompactClass = customThemeActionClass
const handleToggleFavorite = async (theme: CustomTheme, e: MouseEvent) => { const handleToggleFavorite = async (theme: CustomTheme, e: MouseEvent) => {
e.stopPropagation(); e.stopPropagation();
if (!cloudLoggedIn) { if (!cloudLoggedIn) {
@@ -280,27 +278,8 @@
No custom themes yet No custom themes yet
</h3> </h3>
<p class="mt-2 max-w-md text-base text-zinc-500 dark:text-zinc-400" style="text-wrap: pretty"> <p class="mt-2 max-w-md text-base text-zinc-500 dark:text-zinc-400" style="text-wrap: pretty">
Create a theme with the builder, or follow our guide to get started. Use the theme builder above to get started.
</p> </p>
<div class="mt-6 grid w-full max-w-md grid-cols-1 gap-2 sm:grid-cols-2">
<button
type="button"
onclick={() => void openThemeCreator()}
class="flex h-11 items-center justify-center gap-2 rounded-lg bg-zinc-200 px-4 font-medium text-zinc-900 transition-[background-color,color,transform] duration-150 hover:bg-zinc-300 active:scale-[0.96] focus:outline-none focus:ring-2 focus:ring-zinc-400 dark:bg-zinc-700 dark:text-white dark:hover:bg-zinc-600"
>
<span class="font-IconFamily text-lg" aria-hidden="true">&#xec60;</span>
Create a theme
</button>
<a
href="https://docs.betterseqta.org/theme-creation/"
target="_blank"
rel="noopener noreferrer"
class="flex h-11 items-center justify-center gap-2 rounded-lg bg-zinc-200 px-4 font-medium text-zinc-900 transition-[background-color,color,transform] duration-150 hover:bg-zinc-300 active:scale-[0.96] focus:outline-none focus:ring-2 focus:ring-zinc-400 dark:bg-zinc-700 dark:text-white dark:hover:bg-zinc-600"
>
<span class="font-IconFamily text-lg" aria-hidden="true">{'\uecb3'}</span>
View docs
</a>
</div>
{:else if listMode === 'downloaded'} {:else if listMode === 'downloaded'}
<h3 class="text-xl font-semibold text-zinc-900 dark:text-white" style="text-wrap: balance"> <h3 class="text-xl font-semibold text-zinc-900 dark:text-white" style="text-wrap: balance">
No downloaded themes No downloaded themes
@@ -356,20 +335,11 @@
{#if listMode === 'custom'} {#if listMode === 'custom'}
<div class="grid grid-cols-2 gap-2 {useTwoColumnLayout ? 'col-span-2' : ''}"> <div class="grid grid-cols-2 gap-2 {useTwoColumnLayout ? 'col-span-2' : ''}">
<button
type="button"
onclick={() => void openThemeCreator()}
class={customThemeActionCompactClass}
>
<span class="text-2xl font-IconFamily" aria-hidden="true">&#xec60;</span>
<span>Create theme</span>
</button>
<a <a
href="https://docs.betterseqta.org/theme-creation/" href="https://docs.betterseqta.org/theme-creation/"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class={customThemeActionCompactClass} class={customThemeActionClass}
> >
<span class="text-2xl font-IconFamily" aria-hidden="true">{'\uecb3'}</span> <span class="text-2xl font-IconFamily" aria-hidden="true">{'\uecb3'}</span>
<span>View docs</span> <span>View docs</span>
@@ -378,7 +348,7 @@
<button <button
type="button" type="button"
onclick={() => void openCommunitySubmit()} onclick={() => void openCommunitySubmit()}
class="{customThemeActionClass} col-span-2" class={customThemeActionClass}
> >
<span class="text-2xl font-IconFamily" aria-hidden="true">&#xe9fc;</span> <span class="text-2xl font-IconFamily" aria-hidden="true">&#xe9fc;</span>
<span>Create & submit</span> <span>Create & submit</span>
+1 -1
View File
@@ -35,7 +35,7 @@ const FOLDER_HEROICONS = [
folderHeroicon('<path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>'), folderHeroicon('<path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>'),
]; ];
const FOLDER_ICON_SVG = `<svg style="width:24px;height:24px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#888" d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>`; const FOLDER_ICON_SVG = `<svg style="width:24px;height:24px;flex-shrink:0" viewBox="0 0 24 24"><path fill="currentColor" d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>`;
const PLUS_SVG = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#888" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>`; const PLUS_SVG = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#888" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>`;
const CHECK_SVG_WHITE = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#fff" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`; const CHECK_SVG_WHITE = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#fff" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`;
const CLOSE_SVG = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#888" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>`; const CLOSE_SVG = `<svg style="width:14px;height:14px;flex-shrink:0" viewBox="0 0 24 24"><path fill="#888" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>`;