Make "New Workspace" button add workspace

This commit is contained in:
Ian Douglas Scott 2023-12-12 15:36:20 -08:00
parent 80e4fb0227
commit ea9298c021
2 changed files with 19 additions and 5 deletions

View file

@ -120,8 +120,11 @@ fn workspaces_sidebar<'a>(
.map(|w| workspace_sidebar_entry(w, output))
.collect();
if amount != WorkspaceAmount::Dynamic {
// TODO implement
sidebar_entries.push(widget::button(widget::text("New Workspace")).into());
sidebar_entries.push(
widget::button(widget::text("New Workspace"))
.on_press(Msg::NewWorkspace)
.into(),
);
}
let sidebar_entries_container: cosmic::Element<'_, _> = match layout {
WorkspaceLayout::Vertical => column(sidebar_entries).into(),