Open room present link with p
This commit is contained in:
parent
20186bda5c
commit
acb03b1f09
2 changed files with 15 additions and 1 deletions
|
|
@ -14,6 +14,9 @@ Procedure when bumping the version number:
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Key binding to open present page
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Always connect to &rl2dev in ephemeral mode
|
- Always connect to &rl2dev in ephemeral mode
|
||||||
- Reduce amount of messages per &rl2dev log request
|
- Reduce amount of messages per &rl2dev log request
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,7 @@ impl EuphRoom {
|
||||||
// Inspecting messages
|
// Inspecting messages
|
||||||
bindings.binding("i", "inspect message");
|
bindings.binding("i", "inspect message");
|
||||||
bindings.binding("I", "show message links");
|
bindings.binding("I", "show message links");
|
||||||
|
bindings.binding("ctrl+p", "open room's plugh.de/present page");
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_room_input_event(&mut self, event: &InputEvent, status: &RoomStatus) -> bool {
|
async fn handle_room_input_event(&mut self, event: &InputEvent, status: &RoomStatus) -> bool {
|
||||||
|
|
@ -425,7 +426,7 @@ impl EuphRoom {
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inspecting messages
|
// Always applicable
|
||||||
match event {
|
match event {
|
||||||
key!('i') => {
|
key!('i') => {
|
||||||
if let Some(id) = self.chat.cursor().await {
|
if let Some(id) = self.chat.cursor().await {
|
||||||
|
|
@ -443,6 +444,16 @@ impl EuphRoom {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
key!(Ctrl + 'p') => {
|
||||||
|
let link = format!("https://plugh.de/present/{}/", self.vault.room());
|
||||||
|
if let Err(error) = open::that(&link) {
|
||||||
|
self.popups.push_front(RoomPopup::Error {
|
||||||
|
description: format!("Failed to open link: {link}"),
|
||||||
|
reason: format!("{error}"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue