Skip to content

feat: add button support#25

Merged
amrbashir merged 9 commits intotauri-apps:devfrom
vlabo:dev
May 15, 2024
Merged

feat: add button support#25
amrbashir merged 9 commits intotauri-apps:devfrom
vlabo:dev

Conversation

@vlabo
Copy link
Copy Markdown

@vlabo vlabo commented May 15, 2024

An option to add buttons to the notification.
Overview:

Toast::new(Toast::POWERSHELL_APP_ID)
        .on_activated(move |action| -> windows::core::Result<()> {
            match action {
                Some(action) => println!("You've clicked {}!", action), // yes or no button was clicked
                None => println!("You've clicked me!"), // No action, body of the notification was clicked
            }
        })
        .add_button("Yes", "yes")
        .add_button("No", "no")

@vlabo vlabo requested a review from a team as a code owner May 15, 2024 12:34
amrbashir
amrbashir previously approved these changes May 15, 2024
Copy link
Copy Markdown
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

amrbashir
amrbashir previously approved these changes May 15, 2024
@amrbashir amrbashir changed the title Add button support feat: add button support May 15, 2024
@amrbashir amrbashir merged commit c0b9b2f into tauri-apps:dev May 15, 2024
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants