mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 01:32:33 +02:00
add a notifications when copied to clipboard
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -212,6 +212,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
if m.page == pageFindings {
|
||||
if md := m.findingsPage.CurrentMarkdown(); md != "" {
|
||||
copyUI.WriteClipboard(md)
|
||||
return m, func() tea.Msg {
|
||||
return notificationsUI.NotificationMsg{
|
||||
Title: "Copied",
|
||||
Body: "Finding copied to clipboard",
|
||||
Kind: notificationsUI.KindSuccess,
|
||||
}
|
||||
}
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user