mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 18:22:53 +01:00
Added + button next to playlists in sidebar
This commit is contained in:
1 parent
068e4da08b
commit
75cb0c8138
2 files changed
+20
-3
No files matched your search
@@ -1107,8 +1107,9 @@ Two independent apps that talk over HTTP:
|
||||
picker used to be a one-way door with `forcePicker` never set, so changing
|
||||
library meant restarting; switching confirms first when there are unsaved
|
||||
edits, since the adapter holds them in a native model that opening another
|
||||
library replaces — plus the playlist tree. **Creating is right-click
|
||||
only**: a folder's menu offers New Playlist / New Folder inside it, empty
|
||||
library replaces — plus the playlist tree. **Creating is right-click,
|
||||
or the Playlists header's +** (the top-level menu under the button; with
|
||||
no folders, straight to a new playlist): a folder's menu offers New Playlist / New Folder inside it, empty
|
||||
space below the rows creates at the top level, and the new node is named
|
||||
in place (Esc or an empty name creates nothing). Rename/Delete are on the
|
||||
same menu and the row's hover buttons, which share one set of actions.
|
||||
|
||||
@@ -774,10 +774,26 @@ export function Sidebar({
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="mt-3 shrink-0 px-4">
|
||||
<div className="mt-3 flex shrink-0 items-center justify-between px-4">
|
||||
<span className="text-[11px] font-semibold uppercase tracking-wider text-faint">
|
||||
Playlists
|
||||
</span>
|
||||
{/* The same choices as right-clicking below the rows: straight to a
|
||||
new playlist where there is nothing else to create, else the
|
||||
menu, opened under the button. */}
|
||||
{canCreate && (
|
||||
<button
|
||||
title={foldersSupported ? 'New playlist or folder' : 'New playlist'}
|
||||
onClick={(e) => {
|
||||
if (!foldersSupported) return startDraft('playlist', null)
|
||||
const r = e.currentTarget.getBoundingClientRect()
|
||||
setMenu({ x: r.left, y: r.bottom + 4, items: createItems(null) })
|
||||
}}
|
||||
className="rounded px-1 text-sm text-faint hover:text-text"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Right-click here (below the rows) creates at the top level; rows
|
||||
|
||||
Reference in new issue
Block a user