ProfileSets: Move buttons around downtown

This commit is contained in:
thororen1234 2026-05-29 16:03:24 -04:00
parent 2cbdc4406a
commit d1ce2d0e2a
No known key found for this signature in database
3 changed files with 29 additions and 59 deletions

View file

@ -68,6 +68,8 @@ export function PresetList({
onUpdate();
};
const showMoveOptions = actualIndex > 0 || actualIndex < allPresets.length - 1 || currentPage > 1;
return (
<div
key={actualIndex}
@ -192,7 +194,7 @@ export function PresetList({
}}
/>
)}
<Menu.MenuSeparator />
{showMoveOptions && <Menu.MenuSeparator />}
<Menu.MenuItem
id="delete"
label="Delete"

View file

@ -178,6 +178,31 @@ export function PresetManager({ section, guildId }: PresetManagerProps) {
{searchMode ? "Cancel Search" : "Search"}
</Button>
)}
<Button
size="small"
variant="secondary"
onClick={handleRandomPreset}
disabled={!presets.length || !canUseGuild}
>
Random
</Button>
</div>
<div className={cl("import")}>
<Button
size="small"
variant="secondary"
onClick={() => importPresets(forceUpdate, showImportPrompt, resolvedSection, resolvedGuildId)}
disabled={!canUseGuild}
>
Import
</Button>
<Button
size="small"
variant="secondary"
onClick={() => exportPresets(resolvedSection)}
>
Export All
</Button>
</div>
{hasPresets && (
@ -245,41 +270,6 @@ export function PresetManager({ section, guildId }: PresetManagerProps) {
<hr className={cl("block")} />
</>
)}
<div className={cl("import")}>
<Button
size="small"
variant="secondary"
onClick={handleRandomPreset}
className={cl("random")}
disabled={!presets.length || !canUseGuild}
>
<span className={cl("random-content")}>
<svg className={cl("random-icon")} viewBox="0 0 24 24" aria-hidden="true">
<path
fill="currentColor"
d="M20.5 4h-5a1 1 0 0 0 0 2h2.586l-4.293 4.293a1 1 0 0 0 1.414 1.414L19.5 7.414V10a1 1 0 1 0 2 0V5a1 1 0 0 0-1-1Zm-16 1a1 1 0 0 0 0 2h2.586l4.293 4.293a1 1 0 1 0 1.414-1.414L8.414 5H4.5ZM5 15a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-2.586l4.293 4.293a1 1 0 0 0 1.414-1.414L7.414 17H10a1 1 0 1 0 0-2H5Zm14.5 0a1 1 0 0 0 0 2h-2.586l-4.293 4.293a1 1 0 1 0 1.414 1.414L18.586 17H21a1 1 0 1 0 0-2h-1.5Z"
/>
</svg>
Random
</span>
</Button>
<Button
size="small"
variant="secondary"
onClick={() => importPresets(forceUpdate, showImportPrompt, resolvedSection, resolvedGuildId)}
disabled={!canUseGuild}
>
Import
</Button>
<Button
size="small"
variant="secondary"
onClick={() => exportPresets(resolvedSection)}
>
Export All
</Button>
</div>
<hr className={cl("block")} />
{resolvedSection === "server" && (
<hr className={cl("block")} />

View file

@ -99,28 +99,6 @@
margin-bottom: 16px;
}
.vc-profile-presets-random {
background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 50%, #8a7bff 100%);
color: #fff;
border: none;
}
.vc-profile-presets-random:hover {
filter: brightness(1.05);
}
.vc-profile-presets-random-content {
display: inline-flex;
align-items: center;
gap: 6px;
}
.vc-profile-presets-random-icon {
width: 16px;
height: 16px;
display: inline-block;
}
.vc-profile-presets-block {
margin: 16px 0;
border: none;
@ -234,4 +212,4 @@
border: 2px solid var(--background-modifier-accent);
border-radius: 4px;
color: var(--text-default);
}
}