Skip to content

Commit af9cb8c

Browse files
authored
Merge pull request #9 from rezigned/fix/build-web-update-keymap
chore: update keymap to rc5 + fix keyboard help style
2 parents 4e0a258 + dee9313 commit af9cb8c

7 files changed

Lines changed: 25 additions & 19 deletions

File tree

Cargo.lock

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

platforms/action/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ edition.workspace = true
66
license.workspace = true
77

88
[dependencies]
9-
keymap = { version = "1.0.0-rc.3" }
9+
serde = { version = "1.0", features = ["derive"] }
10+
keymap = "1.0.0-rc.5"

platforms/tui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ tur = { path = "../../", version = "0.1.0" }
1919
action = { path = "../action/", version = "0.0.1" }
2020
crossterm = "0.29"
2121
ratatui = "0.29.0"
22-
keymap = { version = "1.0.0-rc.3", features = ["crossterm"] }
22+
keymap = { version = "1.0.0-rc.5", features = ["crossterm"] }
2323
atty = "0.2"
2424
clap = { version = "4.0", features = ["derive"] }

platforms/tui/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ fn section<'a>(title: &'a str, content: Vec<Line<'a>>) -> Paragraph<'a> {
448448
Paragraph::new(content).block(block(title))
449449
}
450450

451-
fn block(title: &str) -> Block {
451+
fn block(title: &str) -> Block<'_> {
452452
Block::default()
453453
.borders(Borders::ALL)
454454
.border_type(BorderType::Rounded)

platforms/web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ wasm-logger = "0.2"
2222
gloo-timers = { version = "0.3", features = ["futures"] }
2323
gloo-events = "0.2"
2424
regex = "1.10"
25-
keymap = { version = "1.0.0-rc.3", features = ["wasm"] }
25+
keymap = { version = "1.0.0-rc.5", features = ["wasm"] }
2626

2727
[features]
2828
default = ["console_error_panic_hook"]

platforms/web/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl Component for App {
342342
fn view(&self, ctx: &Context<Self>) -> Html {
343343
let link = ctx.link();
344344
let help_text_items = self.keymap.items.iter().filter(|(_, item)| !item.description.contains("Quit")).map(|(_, item)| {
345-
html! { <li><kbd class="kbd">{ item.keys.join(", ") }</kbd>{ format!(": {}", item.description) }</li> }
345+
html! { <li><kbd class="kbd">{ item.keys.join(", ") }</kbd>{ format!(" {}", item.description) }</li> }
346346
}).collect::<Html>();
347347

348348
html! {

platforms/web/styles.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,12 @@ body {
612612
color: #333;
613613
}
614614

615-
.help-kbd {
616-
display: inline-block;
615+
.help-section .kbd {
616+
display: inline-flex;
617+
justify-content: center;
618+
align-items: center;
617619
padding: 0.1em 0.6em;
620+
margin-right: 0.5em;
618621
font-family: var(--font-family-mono);
619622
font-size: 0.85em;
620623
line-height: 1;
@@ -624,6 +627,7 @@ body {
624627
border-radius: 3px;
625628
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
626629
white-space: nowrap;
630+
min-width: 4.5em;
627631
}
628632

629633
/* Graph View */

0 commit comments

Comments
 (0)