mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 21:35:04 +00:00
Started refactoring html_top_controls().
This commit is contained in:
parent
6be3b06823
commit
1d7619ab83
1 changed files with 9 additions and 5 deletions
14
html.c
14
html.c
|
@ -750,8 +750,9 @@ xs_str *html_top_controls(snac *snac, xs_str *s)
|
||||||
"<p><input type=\"submit\" class=\"button\" value=\"%s\">\n"
|
"<p><input type=\"submit\" class=\"button\" value=\"%s\">\n"
|
||||||
"</form><p>\n"
|
"</form><p>\n"
|
||||||
"</details>\n"
|
"</details>\n"
|
||||||
"</div>\n"
|
"</div>\n";
|
||||||
|
|
||||||
|
char *_tmpl2 =
|
||||||
"<div class=\"snac-top-controls-more\">\n"
|
"<div class=\"snac-top-controls-more\">\n"
|
||||||
"<details><summary>%s</summary>\n"
|
"<details><summary>%s</summary>\n"
|
||||||
|
|
||||||
|
@ -764,8 +765,9 @@ xs_str *html_top_controls(snac *snac, xs_str *s)
|
||||||
"<input type=\"text\" name=\"id\" required=\"required\" placeholder=\"https://fedi.example.com/bob/...\">\n"
|
"<input type=\"text\" name=\"id\" required=\"required\" placeholder=\"https://fedi.example.com/bob/...\">\n"
|
||||||
"<input type=\"submit\" name=\"action\" value=\"%s\"> %s\n"
|
"<input type=\"submit\" name=\"action\" value=\"%s\"> %s\n"
|
||||||
"</form><p>\n"
|
"</form><p>\n"
|
||||||
"</details>\n"
|
"</details>\n";
|
||||||
|
|
||||||
|
char *_tmpl3 =
|
||||||
"<details><summary>%s</summary>\n"
|
"<details><summary>%s</summary>\n"
|
||||||
|
|
||||||
"<div class=\"snac-user-setup\">\n" /** user setup **/
|
"<div class=\"snac-user-setup\">\n" /** user setup **/
|
||||||
|
@ -896,16 +898,18 @@ xs_str *html_top_controls(snac *snac, xs_str *s)
|
||||||
L("End in 1 hour"),
|
L("End in 1 hour"),
|
||||||
L("End in 1 day"),
|
L("End in 1 day"),
|
||||||
|
|
||||||
L("Post"),
|
L("Post"));
|
||||||
|
|
||||||
|
xs *s2 = xs_fmt(_tmpl2,
|
||||||
L("Operations..."),
|
L("Operations..."),
|
||||||
|
|
||||||
snac->actor,
|
snac->actor,
|
||||||
L("Follow"), L("(by URL or user@host)"),
|
L("Follow"), L("(by URL or user@host)"),
|
||||||
|
|
||||||
snac->actor,
|
snac->actor,
|
||||||
L("Boost"), L("(by URL)"),
|
L("Boost"), L("(by URL)"));
|
||||||
|
|
||||||
|
xs *s3 = xs_fmt(_tmpl3,
|
||||||
L("User Settings..."),
|
L("User Settings..."),
|
||||||
snac->actor,
|
snac->actor,
|
||||||
L("Display name"),
|
L("Display name"),
|
||||||
|
@ -938,7 +942,7 @@ xs_str *html_top_controls(snac *snac, xs_str *s)
|
||||||
L("Update user info")
|
L("Update user info")
|
||||||
);
|
);
|
||||||
|
|
||||||
s = xs_str_cat(s, s1);
|
s = xs_str_cat(s, s1, s2, s3);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue