From efc7607faa3e273cc23c72471a1bcf75b837d911 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Wed, 27 May 2026 23:20:48 +0200 Subject: Implement add song dialog without upload --- web-project/src/solo_tool_web.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'web-project/src') diff --git a/web-project/src/solo_tool_web.py b/web-project/src/solo_tool_web.py index 25beb6f..98cb9df 100644 --- a/web-project/src/solo_tool_web.py +++ b/web-project/src/solo_tool_web.py @@ -69,8 +69,17 @@ def sessionPage(sessionId: str): ui.keyboard(on_key=makeKeyboardHandler(st)) # Manage songs dialog - with ui.dialog() as manageSongsDialog: - ui.label("Under construction") + with ui.dialog() as manageSongsDialog, ui.card(): + with ui.list().props('bordered separator'): + for song in sessionManager.getSongs(): + def addSong(s): + st.addSong(s) + manageSongsDialog.close() + with ui.item(on_click=partial(addSong, song)): + with ui.item_section().props('avatar'): + ui.icon('music_note') + with ui.item_section(): + ui.item_label(basename(song)) # Header with ui.header().classes('items-center justify-between'): @@ -166,5 +175,5 @@ def main(port, refresh, reload, session_path, buffer_size, sampling_rate): # Hardcoded dev settings if __name__ in {"__main__", "__mp_main__"}: - start(8080, 0.5, False, "https://files.0xf7.com", 1024, 48000) + start(8080, 0.5, True, "https://files.0xf7.com", 1024, 48000) #start(8080, 0.5, True, "/home/eddy/music", 1024, 48000) -- cgit v1.2.3