gitlab_tracker_redmine/shortcuts.rs
1use gitlab_tracker_core::{ShortcutBlock, ShortcutEntry, ShortcutFactory};
2
3/// Produces the Redmine shortcut block — shortcuts specific to the Redmine integration.
4///
5/// Auto-registered via `inventory::submit!`: when the `redmine` feature is enabled
6/// this crate is linked and the submit! runs automatically at startup.
7/// No mention of Redmine is needed anywhere in `main.rs`.
8fn redmine_shortcuts() -> ShortcutBlock {
9 ShortcutBlock {
10 section: "Redmine",
11 priority: 100,
12 entries: &[
13 ShortcutEntry {
14 key: "l / L",
15 description: "Open Log Time popup on the linked ticket",
16 },
17 ShortcutEntry {
18 key: "p / P",
19 description: "Cycle Tracker pane view (Ticket Info / Time Log)",
20 },
21 ShortcutEntry {
22 key: "t / T",
23 description: "Open linked Redmine ticket in browser",
24 },
25 ],
26 }
27}
28
29// Auto-registration: executes at startup when this crate is linked (i.e. feature "redmine").
30inventory::submit!(ShortcutFactory(redmine_shortcuts));