\n"
+ "
\n"
"%s
\n"
"
\n"
"\n"
- "
\n"
- "
%s
\n"
+ "\n"
+ "
%s
\n"
"\n"
+ "
\n"
+ "
\n"
- "%s
\n"
+ "\n"
+
+ "\n"
"
\n" /** user setup **/
"
\n"
- "\n"
- "\n"
"
\n"
"\n";
@@ -530,6 +536,7 @@ d_char *html_top_controls(snac *snac, d_char *s)
xs *es6 = encode_html(purge_days);
xs *s1 = xs_fmt(_tmpl,
+ settings ? "style=\"display: none\"" : "",
L("New Post..."),
snac->actor,
L("Sensitive content"),
@@ -550,7 +557,8 @@ d_char *html_top_controls(snac *snac, d_char *s)
L("Post"),
- L("Preferences..."),
+ settings ? "style=\"display: none\"" : "",
+ L("Operations..."),
snac->actor,
L("Follow"), L("(by URL or user@host)"),
@@ -558,6 +566,8 @@ d_char *html_top_controls(snac *snac, d_char *s)
snac->actor,
L("Boost"), L("(by URL)"),
+ !settings ? "style=\"display: none\"" : "",
+
L("User Settings"),
snac->actor,
L("Display name"),
@@ -1376,7 +1386,7 @@ xs_str *html_timeline(snac *snac, const xs_list *list, int local, int skip, int
s = html_user_header(snac, s, local);
if (!local)
- s = html_top_controls(snac, s);
+ s = html_top_controls(snac, s, list == NULL ? 1 : 0);
s = xs_str_cat(s, "
\n");
s = xs_str_cat(s, "
\n");
@@ -1813,6 +1823,18 @@ int html_get_handler(const xs_dict *req, const char *q_path,
}
}
else
+ if (strcmp(p_path, "settings") == 0) { /** user settings **/
+ if (!login(&snac, req)) {
+ *body = xs_dup(uid);
+ status = 401;
+ }
+ else {
+ *body = html_timeline(&snac, NULL, 0, 0, 0, 0);
+ *b_size = strlen(*body);
+ status = 200;
+ }
+ }
+ else
if (strcmp(p_path, "notifications") == 0) { /** the list of notifications **/
if (!login(&snac, req)) {
*body = xs_dup(uid);