From 6417d238512853bcce53f09454d635e841ec60f8 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 26 Nov 2023 19:15:43 +0100 Subject: Use html_note() in html_top_controls(). --- html.c | 69 ++++++++++-------------------------------------------------------- 1 file changed, 10 insertions(+), 59 deletions(-) diff --git a/html.c b/html.c index f6c245b..c314da8 100644 --- a/html.c +++ b/html.c @@ -288,7 +288,7 @@ xs_html *html_note(snac *user, char *summary, /* no actor_id; ask for mentioned_only */ xs_html_add(form, xs_html_tag("p", NULL), - xs_html_text(L("Only for mentioned people")), + xs_html_text(L("Only for mentioned people: ")), xs_html_sctag("input", xs_html_attr("type", "checkbox"), xs_html_attr("name", "mentioned_only"), @@ -712,44 +712,6 @@ xs_str *html_user_header(snac *snac, xs_str *s, int local) xs_str *html_top_controls(snac *snac, xs_str *s) /* generates the top controls */ { - char *_tmpl = - "
\n" - "
%s\n" - "
\n" - "\n" - "\n" - "

%s: " - "\n" - "

%s: \n" - - "

%s\n" /** attach **/ - "

%s: \n" - "

%s: \n" - "

\n" - - "

" - "

%s\n" /** poll **/ - "

%s:
\n" - "\n" - "

\n" - "\n" - "

\n" - - "

\n" - "

\n" - "

\n" - "
\n"; - char *_tmpl3 = "
%s\n" @@ -862,26 +824,15 @@ xs_str *html_top_controls(snac *snac, xs_str *s) xs_str_cat(s, "
\n"); - xs *s1 = xs_fmt(_tmpl, - L("New Post..."), - snac->actor, - L("Sensitive content"), - L("Sensitive content description"), - L("Only for mentioned people"), - - L("Attachment..."), - L("File"), - L("File description"), - - L("Poll..."), - L("Poll options (one per line, up to 8)"), - L("One choice"), - L("Multiple choices"), - L("End in 5 minutes"), - L("End in 1 hour"), - L("End in 1 day"), - - L("Post")); + xs_html *new_note = html_note(snac, L("New Post..."), + "new_post_div", "new_post_form", + L("What's on your mind?"), "", + NULL, NULL, + xs_stock_false, "", + xs_stock_false, NULL, + NULL, 1); + + xs *s1 = xs_html_render(new_note); xs *s2 = NULL; -- cgit v1.2.3