feat(gui): added an ability to copy ``pwsp-cli action play`` command for every sound (#133)

This commit is contained in:
Tarasov Aleksandr
2026-06-04 20:06:35 +03:00
committed by GitHub
parent 3576c634fd
commit c173e602ad
2 changed files with 29 additions and 0 deletions
+18
View File
@@ -412,6 +412,24 @@ impl SoundpadGui {
actions.push(FileAction::AssignHotkey(path.clone()));
ui.close();
}
ui.separator();
if ui
.button(format!(
"{} {}",
ICON_FILE_COPY.codepoint,
t!("gui.context.files.copy_cli_command")
))
.clicked()
{
ui.ctx().copy_text(format!(
"pwsp-cli action play \"{}\"",
path.to_string_lossy()
.replace('\\', "\\\\")
.replace('"', "\\\"")
));
}
});
});
}