summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/html.c b/html.c
index 46ce5a5..4a04d7c 100644
--- a/html.c
+++ b/html.c
@@ -686,7 +686,7 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
686 686
687 const char *prev_src1 = xs_dict_get(msg, "sourceContent"); 687 const char *prev_src1 = xs_dict_get(msg, "sourceContent");
688 688
689 if (!xs_is_null(prev_src1) && strcmp(actor, snac->actor) == 0) { 689 if (!xs_is_null(prev_src1) && strcmp(actor, snac->actor) == 0) { /** edit **/
690 xs *prev_src = xs_replace(prev_src1, "<", "&lt;"); 690 xs *prev_src = xs_replace(prev_src1, "<", "&lt;");
691 const xs_val *sensitive = xs_dict_get(msg, "sensitive"); 691 const xs_val *sensitive = xs_dict_get(msg, "sensitive");
692 const char *summary = xs_dict_get(msg, "summary"); 692 const char *summary = xs_dict_get(msg, "summary");
@@ -724,7 +724,7 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
724 L("Sensitive content"), 724 L("Sensitive content"),
725 xs_type(sensitive) == XSTYPE_TRUE ? "checked" : "", 725 xs_type(sensitive) == XSTYPE_TRUE ? "checked" : "",
726 L("Sensitive content description"), 726 L("Sensitive content description"),
727 summary, 727 xs_is_null(summary) ? "" : summary,
728 L("Only for mentioned people"), 728 L("Only for mentioned people"),
729 L("Attach..."), 729 L("Attach..."),
730 L("File"), 730 L("File"),
@@ -736,10 +736,13 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
736 s = xs_str_cat(s, s1); 736 s = xs_str_cat(s, s1);
737 } 737 }
738 738
739 { 739 { /** reply **/
740 /* the post textarea */ 740 /* the post textarea */
741 xs *ct = build_mentions(snac, msg); 741 xs *ct = build_mentions(snac, msg);
742 742
743 const xs_val *sensitive = xs_dict_get(msg, "sensitive");
744 const char *summary = xs_dict_get(msg, "summary");
745
743 xs *s1 = xs_fmt( 746 xs *s1 = xs_fmt(
744 "<p><details><summary>%s</summary>\n" 747 "<p><details><summary>%s</summary>\n"
745 "<p><div class=\"snac-note\" id=\"%s_reply\">\n" 748 "<p><div class=\"snac-note\" id=\"%s_reply\">\n"
@@ -749,8 +752,8 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
749 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n" 752 "rows=\"4\" wrap=\"virtual\" required=\"required\">%s</textarea>\n"
750 "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n" 753 "<input type=\"hidden\" name=\"in_reply_to\" value=\"%s\">\n"
751 754
752 "<p>%s: <input type=\"checkbox\" name=\"sensitive\"> " 755 "<p>%s: <input type=\"checkbox\" name=\"sensitive\" %s> "
753 "<input type=\"text\" name=\"summary\" placeholder=\"%s\">\n" 756 "<input type=\"text\" name=\"summary\" placeholder=\"%s\" value=\"%s\">\n"
754 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n" 757 "<p>%s: <input type=\"checkbox\" name=\"mentioned_only\">\n"
755 758
756 "<details><summary>%s</summary>\n" 759 "<details><summary>%s</summary>\n"
@@ -770,7 +773,9 @@ xs_str *html_entry_controls(snac *snac, xs_str *os, const xs_dict *msg, const ch
770 ct, 773 ct,
771 id, 774 id,
772 L("Sensitive content"), 775 L("Sensitive content"),
776 xs_type(sensitive) == XSTYPE_TRUE ? "checked" : "",
773 L("Sensitive content description"), 777 L("Sensitive content description"),
778 xs_is_null(summary) ? "" : summary,
774 L("Only for mentioned people"), 779 L("Only for mentioned people"),
775 L("Attach..."), 780 L("Attach..."),
776 L("File"), 781 L("File"),