From 9ae5aa2280eb40c7a6345a6f7c2f3f79f596074a Mon Sep 17 00:00:00 2001
From: vicrodh <103399283+vicrodh@users.noreply.github.com>
Date: Sun, 25 Jan 2026 00:28:31 -0600
Subject: [PATCH] refactor(PlaylistModal): improve layout and move danger zone
to footer
- Move delete button to footer (left-aligned, compact style)
- Make modal 50px wider (490px)
- Remove "(optional)" from Folder label
- Put "Make playlist public" and "Hide from sidebar" inline
- Add compact delete confirmation in footer
---
src/lib/components/PlaylistModal.svelte | 220 +++++++++++++++++-------
1 file changed, 158 insertions(+), 62 deletions(-)
diff --git a/src/lib/components/PlaylistModal.svelte b/src/lib/components/PlaylistModal.svelte
index 3a2fcdf80..f6c7db158 100644
--- a/src/lib/components/PlaylistModal.svelte
+++ b/src/lib/components/PlaylistModal.svelte
@@ -499,22 +499,11 @@
>
-
-
-
-
{#if folders.length > 0}
@@ -608,7 +610,7 @@
.modal {
width: 100%;
- max-width: 440px;
+ max-width: 490px;
max-height: 90vh;
overflow: hidden;
display: flex;
@@ -741,14 +743,38 @@
color: var(--text-primary);
}
+ .checkbox-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-top: 8px;
+ }
+
+ .checkbox-row .form-group {
+ margin-bottom: 0;
+ }
+
.modal-footer {
display: flex;
- justify-content: flex-end;
+ justify-content: space-between;
+ align-items: center;
gap: 12px;
padding: 16px 24px;
border-top: 1px solid var(--bg-tertiary);
}
+ .footer-left {
+ display: flex;
+ align-items: center;
+ }
+
+ .footer-right {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-left: auto;
+ }
+
.btn-secondary,
.btn-primary {
padding: 10px 20px;
@@ -791,6 +817,76 @@
gap: 6px;
}
+ /* Compact footer delete button */
+ .btn-danger-sm {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ padding: 8px 14px;
+ background: rgba(239, 68, 68, 0.1);
+ border: 1px solid rgba(239, 68, 68, 0.3);
+ border-radius: 8px;
+ font-size: 13px;
+ color: #ef4444;
+ cursor: pointer;
+ transition: all 150ms ease;
+ }
+
+ .btn-danger-sm:hover:not(:disabled) {
+ background: rgba(239, 68, 68, 0.2);
+ border-color: rgba(239, 68, 68, 0.5);
+ }
+
+ .btn-danger-sm:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+ }
+
+ .delete-confirm-inline {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ }
+
+ .delete-confirm-inline span {
+ font-size: 13px;
+ color: #ef4444;
+ }
+
+ .btn-delete-sm,
+ .btn-cancel-sm {
+ padding: 8px 12px;
+ border-radius: 6px;
+ font-size: 13px;
+ cursor: pointer;
+ transition: all 150ms ease;
+ border: none;
+ }
+
+ .btn-cancel-sm {
+ background: var(--bg-tertiary);
+ color: var(--text-primary);
+ }
+
+ .btn-cancel-sm:hover:not(:disabled) {
+ background: var(--bg-hover);
+ }
+
+ .btn-delete-sm {
+ background: #ef4444;
+ color: white;
+ }
+
+ .btn-delete-sm:hover:not(:disabled) {
+ background: #dc2626;
+ }
+
+ .btn-delete-sm:disabled,
+ .btn-cancel-sm:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+ }
+
.danger-zone {
margin-top: 24px;
padding-top: 20px;