Fix action snippets

This commit is contained in:
ranfdev
2023-10-25 23:42:01 +02:00
parent fbc776539e
commit 6d3c3ad1a7

View File

@ -344,9 +344,9 @@ impl NotifyWindow {
add_css_class: "small", add_css_class: "small",
set_label: "View Action", set_label: "View Action",
connect_clicked[text_view] => move |_| { connect_clicked[text_view] => move |_| {
text_view.buffer().insert_at_cursor(r#""action": [ text_view.buffer().insert_at_cursor(r#""actions": [
{ {
"type": "view", "action": "view",
"label": "torvalds boosted your toot", "label": "torvalds boosted your toot",
"url": "https://joinmastodon.org" "url": "https://joinmastodon.org"
} }
@ -358,9 +358,9 @@ impl NotifyWindow {
add_css_class: "small", add_css_class: "small",
set_label: "HTTP Action", set_label: "HTTP Action",
connect_clicked[text_view] => move |_| { connect_clicked[text_view] => move |_| {
text_view.buffer().insert_at_cursor(r#""action": [ text_view.buffer().insert_at_cursor(r#""actions": [
{ {
"type": "http", "action": "http",
"label": "Turn off lights", "label": "Turn off lights",
"method": "post", "method": "post",
"url": "https://api.example.com/lights", "url": "https://api.example.com/lights",