cosmic-terminal/src/menu.rs

335 lines
12 KiB
Rust
Raw Normal View History

2023-12-22 15:00:50 -07:00
// SPDX-License-Identifier: GPL-3.0-only
2025-10-16 09:27:00 +02:00
use cosmic::iced::Point;
use cosmic::widget::menu::key_bind::KeyBind;
2025-09-10 14:33:46 +02:00
use cosmic::widget::menu::{Item as MenuItem, menu_button};
2026-03-18 12:21:57 -04:00
use cosmic::widget::{Column, space};
2023-12-22 15:00:50 -07:00
use cosmic::{
2025-09-10 14:33:46 +02:00
Element,
2025-04-15 17:38:49 -04:00
app::Core,
iced::core::Border,
2026-03-18 12:21:57 -04:00
iced::{Background, Length, advanced::widget::text::Style as TextStyle},
2025-06-27 11:44:40 -06:00
theme,
2024-01-09 10:16:32 -07:00
widget::{
self, divider,
2025-06-27 11:44:40 -06:00
menu::{ItemHeight, ItemWidth},
2025-04-15 17:38:49 -04:00
responsive_menu_bar, segmented_button,
2024-01-09 10:16:32 -07:00
},
2023-12-22 15:00:50 -07:00
};
2025-04-15 17:38:49 -04:00
use std::{collections::HashMap, sync::LazyLock};
2023-12-22 15:00:50 -07:00
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
use crate::{Action, ColorSchemeId, ColorSchemeKind, Config, Message, fl, terminal::MonitorKind};
2023-12-22 15:00:50 -07:00
2025-04-15 17:38:49 -04:00
static MENU_ID: LazyLock<cosmic::widget::Id> =
LazyLock::new(|| cosmic::widget::Id::new("responsive-menu"));
2025-10-16 09:27:00 +02:00
#[derive(Debug, Clone)]
pub struct MenuState {
pub position: Option<Point>,
pub local_position: Option<Point>,
2025-10-16 09:27:00 +02:00
pub link: Option<String>,
}
2024-01-19 11:44:59 -07:00
pub fn context_menu<'a>(
config: &Config,
key_binds: &HashMap<KeyBind, Action>,
entity: segmented_button::Entity,
2025-10-16 09:27:00 +02:00
link: Option<String>,
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
monitors: (bool, bool, bool),
2024-01-19 11:44:59 -07:00
) -> Element<'a, Message> {
let find_key = |action: &Action| -> String {
for (key_bind, key_action) in key_binds {
2024-01-19 11:44:59 -07:00
if action == key_action {
return key_bind.to_string();
}
}
String::new()
};
2025-06-27 11:44:40 -06:00
fn key_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background(false).component.on;
2025-06-27 11:44:40 -06:00
color.alpha *= 0.75;
TextStyle {
color: Some(color.into()),
2026-05-26 15:40:59 -04:00
..Default::default()
2025-06-27 11:44:40 -06:00
}
}
2024-01-19 11:44:59 -07:00
let menu_item = |label, action| {
let key = find_key(&action);
menu_button(vec![
widget::text(label).into(),
2026-03-18 12:21:57 -04:00
space::horizontal().into(),
2025-06-27 11:44:40 -06:00
widget::text(key)
.class(theme::Text::Custom(key_style))
.into(),
])
2024-01-19 11:44:59 -07:00
.on_press(Message::TabContextAction(entity, action))
};
2023-12-22 15:00:50 -07:00
2023-12-22 15:40:10 -07:00
let menu_checkbox = |label, value, action| {
menu_button(vec![
widget::text(label).into(),
2026-03-18 12:21:57 -04:00
widget::space::horizontal().into(),
2024-10-22 12:31:02 -06:00
widget::toggler(value)
.on_toggle(move |_| Message::TabContextAction(entity, action))
.size(16.0)
.into(),
])
2023-12-22 15:40:10 -07:00
.on_press(Message::TabContextAction(entity, action))
};
let mut rows = vec![
Element::from(menu_item(fl!("copy"), Action::Copy)),
Element::from(menu_item(fl!("paste"), Action::Paste)),
Element::from(menu_item(fl!("select-all"), Action::SelectAll)),
Element::from(divider::horizontal::light()),
Element::from(menu_item(fl!("clear-scrollback"), Action::ClearScrollback)),
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
Element::from(menu_item(fl!("save-output"), Action::SaveOutput)),
Element::from(divider::horizontal::light()),
Element::from(menu_checkbox(
fl!("monitor-activity"),
monitors.0,
Action::Monitor(MonitorKind::Activity),
)),
Element::from(menu_checkbox(
fl!("monitor-silence"),
monitors.1,
Action::Monitor(MonitorKind::Silence),
)),
Element::from(menu_checkbox(
fl!("monitor-process-finished"),
monitors.2,
Action::Monitor(MonitorKind::ProcessFinished),
)),
Element::from(divider::horizontal::light()),
Element::from(menu_item(
fl!("split-horizontal"),
Action::PaneSplitHorizontal,
)),
Element::from(menu_item(fl!("split-vertical"), Action::PaneSplitVertical)),
Element::from(menu_item(
fl!("pane-toggle-maximize"),
Action::PaneToggleMaximized,
)),
Element::from(divider::horizontal::light()),
Element::from(menu_item(fl!("new-tab"), Action::TabNew)),
Element::from(menu_item(fl!("rename-tab"), Action::TabRename)),
Element::from(menu_item(fl!("menu-settings"), Action::Settings)),
Element::from(menu_item(fl!("menu-about"), Action::About)),
];
2024-02-09 09:35:24 +01:00
#[cfg(feature = "password_manager")]
{
rows.push(Element::from(menu_item(
2024-02-09 09:35:24 +01:00
fl!("menu-password-manager"),
Action::PasswordManager,
)));
2024-02-09 09:35:24 +01:00
}
rows.push(Element::from(menu_checkbox(
2024-02-09 09:35:24 +01:00
fl!("show-headerbar"),
config.show_headerbar,
Action::ShowHeaderBar(!config.show_headerbar),
)));
//If we have a link
//prepend the Open Link item
if link.is_some() {
rows.insert(
0,
Element::from(menu_item(fl!("open-link"), Action::LaunchUrlByMenu)),
);
2026-02-15 10:23:49 +01:00
rows.insert(
1,
Element::from(menu_item(fl!("copy-link"), Action::CopyUrlByMenu)),
);
rows.insert(2, Element::from(divider::horizontal::light()));
}
let content = Column::with_children(rows);
2024-02-09 09:35:24 +01:00
widget::container(content)
.padding(1)
//TODO: move style to libcosmic
.style(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background(false).component;
2024-02-09 09:35:24 +01:00
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),
background: Some(Background::Color(component.base.into())),
border: Border {
radius: cosmic.radius_s().map(|x| x + 1.0).into(),
width: 1.0,
color: component.divider.into(),
},
..Default::default()
}
})
.width(Length::Fixed(360.0))
2024-02-09 09:35:24 +01:00
.into()
2023-12-22 15:00:50 -07:00
}
2024-01-09 10:16:32 -07:00
2024-02-22 11:18:13 -07:00
pub fn color_scheme_menu<'a>(
kind: ColorSchemeKind,
id_opt: Option<ColorSchemeId>,
2024-02-22 11:18:13 -07:00
name: &str,
) -> Element<'a, Message> {
let menu_item =
|label, message| menu_button(vec![widget::text(label).into()]).on_press(message);
let mut column = widget::column::with_capacity(if id_opt.is_some() { 3 } else { 1 });
if let Some(id) = id_opt {
column = column.push(menu_item(
fl!("rename"),
Message::ColorSchemeRename(kind, id, name.to_string()),
));
}
column = column.push(menu_item(
fl!("export"),
Message::ColorSchemeExport(kind, id_opt),
));
if let Some(id) = id_opt {
column = column.push(menu_item(
fl!("delete"),
Message::ColorSchemeDelete(kind, id),
));
}
widget::container(column)
.padding(1)
//TODO: move style to libcosmic
2024-10-22 12:31:02 -06:00
.style(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background(false).component;
2024-10-22 12:31:02 -06:00
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),
background: Some(Background::Color(component.base.into())),
border: Border {
radius: cosmic.radius_s().map(|x| x + 1.0).into(),
width: 1.0,
color: component.divider.into(),
},
..Default::default()
}
2024-10-22 12:31:02 -06:00
})
.width(Length::Fixed(120.0))
.into()
}
2025-04-15 17:38:49 -04:00
pub fn menu_bar<'a>(
core: &Core,
config: &Config,
key_binds: &HashMap<KeyBind, Action>,
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
monitors: (bool, bool, bool),
2025-04-15 17:38:49 -04:00
) -> Element<'a, Message> {
2024-02-09 15:45:46 -07:00
let mut profile_items = Vec::with_capacity(config.profiles.len());
for (name, id) in config.profile_names() {
2024-12-02 23:26:14 +01:00
profile_items.push(MenuItem::Button(name, None, Action::ProfileOpen(id)));
2024-02-09 15:45:46 -07:00
}
2024-02-09 15:45:46 -07:00
//TODO: what to do if there are no profiles?
let color_scheme_kind = config.color_scheme_kind(core.system_theme());
2025-04-15 17:38:49 -04:00
responsive_menu_bar()
.item_height(ItemHeight::Dynamic(40))
.item_width(ItemWidth::Uniform(320))
2025-04-15 17:38:49 -04:00
.spacing(4.0)
.into_element(
core,
key_binds,
MENU_ID.clone(),
Message::Surface,
vec![
(
fl!("file"),
vec![
MenuItem::Button(fl!("new-tab"), None, Action::TabNew),
MenuItem::Button(fl!("new-window"), None, Action::WindowNew),
MenuItem::Divider,
MenuItem::Folder(fl!("profile"), profile_items),
MenuItem::Button(fl!("menu-profiles"), None, Action::Profiles),
MenuItem::Divider,
MenuItem::Button(fl!("rename-tab"), None, Action::TabRename),
2025-04-15 17:38:49 -04:00
MenuItem::Button(fl!("close-tab"), None, Action::TabClose),
MenuItem::Divider,
MenuItem::Button(fl!("quit"), None, Action::WindowClose),
],
),
(
fl!("edit"),
vec![
MenuItem::Button(fl!("copy"), None, Action::Copy),
MenuItem::Button(fl!("paste"), None, Action::Paste),
MenuItem::Button(fl!("select-all"), None, Action::SelectAll),
MenuItem::Divider,
MenuItem::Button(fl!("clear-scrollback"), None, Action::ClearScrollback),
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
MenuItem::Button(fl!("save-output"), None, Action::SaveOutput),
2025-04-15 17:38:49 -04:00
MenuItem::Divider,
MenuItem::Button(fl!("find"), None, Action::Find),
],
),
(
fl!("view"),
vec![
MenuItem::Button(fl!("zoom-in"), None, Action::ZoomIn),
MenuItem::Button(fl!("zoom-reset"), None, Action::ZoomReset),
MenuItem::Button(fl!("zoom-out"), None, Action::ZoomOut),
MenuItem::Divider,
MenuItem::Button(fl!("next-tab"), None, Action::TabNext),
MenuItem::Button(fl!("previous-tab"), None, Action::TabPrev),
MenuItem::Divider,
MenuItem::Button(
fl!("split-horizontal"),
None,
Action::PaneSplitHorizontal,
),
MenuItem::Button(fl!("split-vertical"), None, Action::PaneSplitVertical),
MenuItem::Button(
fl!("pane-toggle-maximize"),
None,
Action::PaneToggleMaximized,
),
MenuItem::Divider,
feat: Konsole parity phase 1 (save output, search options, monitors, profile CLI) Implements the first batch of COSMIC_TERMINAL_KONSOLE_PARITY.md: Save output as text: - New SaveOutput action in the Edit menu, terminal context menu and keyboard shortcuts (Ctrl+Shift+S, Konsole parity, rebindable). - Terminal::scrollback_text() extracts history plus visible screen via alacritty bounds_to_string, trimming trailing empty lines. - Save-file dialog through cosmic-files; the file is written in a spawn_blocking task so large scrollbacks never stall the UI. Search options: - Case-sensitive and regex checkboxes in the find bar. - App::find_pattern() escapes the pattern when regex mode is off and prefixes (?i) when case-insensitive (same approach as Alacritty). Per-tab monitors (activity / silence / process finished): - Toggles in the View menu and terminal context menu, state stored in Terminal (monitor_* fields). - Activity alerts on PTY output (Wakeup) for non-active tabs; silence alerts after 10 s without output (Konsole default); process-finished compares the shell pgrp with the tty tpgid via /proc/<pid>/stat and alerts when the foreground job exits. - Silence and process checks run on a 1 s iced::time subscription that is only active while at least one tab needs it. - Tab bar shows an armed icon (view-reveal-symbolic) and per-kind alert icons; activating the tab acknowledges the alert. Profile CLI: - --profile/-p <name-or-id> applies a profile to the first tab only, unknown profiles exit(1) with the available list on stderr. - --list-profiles prints "id<TAB>name" and exits. - Config is now loaded before the daemonize fork so CLI output reaches the launching terminal. - --help now documents -e/--command, --no-daemon and the new flags (-e already worked; audit confirmed everything after it becomes the command and its arguments). i18n: new en/fr strings (save-output, monitor-*, find-case-sensitive, find-regex). Validated with ./check_cosmic_local.sh terminal, cargo fmt, and a debug build exercising the CLI flags and a 6 s live run. The shutdown panic in iced_winit ("async fn resumed after completion") pre-exists and is reproducible with the installed binary. Leyoda 2026 – GPLv3
2026-07-06 09:50:58 +02:00
MenuItem::CheckBox(
fl!("monitor-activity"),
None,
monitors.0,
Action::Monitor(MonitorKind::Activity),
),
MenuItem::CheckBox(
fl!("monitor-silence"),
None,
monitors.1,
Action::Monitor(MonitorKind::Silence),
),
MenuItem::CheckBox(
fl!("monitor-process-finished"),
None,
monitors.2,
Action::Monitor(MonitorKind::ProcessFinished),
),
MenuItem::Divider,
2025-04-15 17:38:49 -04:00
MenuItem::Button(
fl!("menu-color-schemes"),
None,
Action::ColorSchemes(color_scheme_kind),
2025-04-15 17:38:49 -04:00
),
2026-02-05 11:31:05 -07:00
MenuItem::Button(
fl!("menu-keyboard-shortcuts"),
None,
Action::KeyboardShortcuts,
),
2025-04-15 17:38:49 -04:00
MenuItem::Button(fl!("menu-settings"), None, Action::Settings),
2024-02-09 09:35:24 +01:00
#[cfg(feature = "password_manager")]
MenuItem::Button(
fl!("menu-password-manager"),
None,
Action::PasswordManager,
),
2025-04-15 17:38:49 -04:00
MenuItem::Divider,
MenuItem::Button(fl!("menu-about"), None, Action::About),
],
),
],
)
2024-01-09 10:16:32 -07:00
}