Skip to content

Commit

Permalink
feat: better notification title on peer IP copied
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Jul 11, 2024
1 parent c396fff commit c9e9260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/tailscale/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ pub fn copy_peer_ip(peer_ip: &str, notif_title: &str) -> Result<(), Box<dyn std:
let clip_ip = get_from_clipboard()?;

// log success
info!("Copied IP address {} to the Clipboard", clip_ip);
info!("Copied IP address {} to the clipboard", clip_ip);

// send a notification through dbus
let body = format!("Copied IP address {} to the Clipboard", clip_ip);
let body = format!("Copied IP address {} to the clipboard", clip_ip);
Notification::new()
.summary(notif_title)
.body(&body)
Expand Down
2 changes: 1 addition & 1 deletion src/tray/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl Tray for SysTray {
self.ctx.status.this_machine.display_name, self.ctx.ip
),
activate: Box::new(move |_| {
if let Err(e) = copy_peer_ip(&my_ip, "This device") {
if let Err(e) = copy_peer_ip(&my_ip, "Peer IP copied to clipboard!") {
eprintln!("failed to copy ip for this device: {}", e);
}
}),
Expand Down

0 comments on commit c9e9260

Please sign in to comment.