Fix action snippets
This commit is contained in:
@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user