notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 808629c04ec25093fa5f2eba4d7f17b102c0d472
parent d3bf1273a5ebc2b5e3110c98712e2f290ea46fb9
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 18 Feb 2026 11:52:54 -0800

add clickable toggle for permission feedback on mobile

Replace the static "(⇧ for message)" hint with a clickable "+ msg"
link that enters tentative mode without needing a shift key. Also
make the "Will Allow"/"Will Deny" labels clickable to toggle between
accept and deny. This enables permission feedback from mobile clients
where no shift key is available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/ui/dave.rs | 105+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
1 file changed, 62 insertions(+), 43 deletions(-)

diff --git a/crates/notedeck_dave/src/ui/dave.rs b/crates/notedeck_dave/src/ui/dave.rs @@ -644,34 +644,43 @@ impl<'a> DaveUi<'a> { } } - // Show tentative state indicator OR shift hint + // Show tentative state indicator (clickable to toggle) or "+ msg" button match self.permission_message_state { PermissionMessageState::TentativeAccept => { - ui.label( - egui::RichText::new("✓ Will Allow") - .color(egui::Color32::from_rgb(100, 180, 100)) - .strong(), - ); + if ui + .link( + egui::RichText::new("✓ Will Allow") + .color(egui::Color32::from_rgb(100, 180, 100)) + .strong(), + ) + .clicked() + { + *action = Some(DaveAction::TentativeDeny); + } } PermissionMessageState::TentativeDeny => { - ui.label( - egui::RichText::new("✗ Will Deny") - .color(egui::Color32::from_rgb(200, 100, 100)) - .strong(), - ); + if ui + .link( + egui::RichText::new("✗ Will Deny") + .color(egui::Color32::from_rgb(200, 100, 100)) + .strong(), + ) + .clicked() + { + *action = Some(DaveAction::TentativeAccept); + } } PermissionMessageState::None => { - // Always show hint for adding message - let hint_color = if shift_held { - ui.visuals().warn_fg_color - } else { - ui.visuals().weak_text_color() - }; - ui.label( - egui::RichText::new("(⇧ for message)") - .color(hint_color) - .small(), - ); + if ui + .link( + egui::RichText::new("+ msg") + .color(ui.visuals().weak_text_color()) + .small(), + ) + .clicked() + { + *action = Some(DaveAction::TentativeAccept); + } } } }); @@ -770,33 +779,43 @@ impl<'a> DaveUi<'a> { } } - // Show tentative state indicator OR shift hint + // Show tentative state indicator (clickable to toggle) or "+ msg" button match self.permission_message_state { PermissionMessageState::TentativeAccept => { - ui.label( - egui::RichText::new("✓ Will Approve") - .color(egui::Color32::from_rgb(100, 180, 100)) - .strong(), - ); + if ui + .link( + egui::RichText::new("✓ Will Approve") + .color(egui::Color32::from_rgb(100, 180, 100)) + .strong(), + ) + .clicked() + { + action = Some(DaveAction::TentativeDeny); + } } PermissionMessageState::TentativeDeny => { - ui.label( - egui::RichText::new("✗ Will Reject") - .color(egui::Color32::from_rgb(200, 100, 100)) - .strong(), - ); + if ui + .link( + egui::RichText::new("✗ Will Reject") + .color(egui::Color32::from_rgb(200, 100, 100)) + .strong(), + ) + .clicked() + { + action = Some(DaveAction::TentativeAccept); + } } PermissionMessageState::None => { - let hint_color = if shift_held { - ui.visuals().warn_fg_color - } else { - ui.visuals().weak_text_color() - }; - ui.label( - egui::RichText::new("(⇧ for message)") - .color(hint_color) - .small(), - ); + if ui + .link( + egui::RichText::new("+ msg") + .color(ui.visuals().weak_text_color()) + .small(), + ) + .clicked() + { + action = Some(DaveAction::TentativeAccept); + } } } });