diff --git a/src/base_page.c b/src/base_page.c index 07e3bf0..ac19237 100644 --- a/src/base_page.c +++ b/src/base_page.c @@ -45,6 +45,9 @@ void render_base_page(struct base_page* page, struct session* ssn, mastodont_t* read_config(ssn); + if (ssn->config.logged_in) + login_string = ""; + if (ssn->config.background_url) { easprintf(&background_url_css, BODY_STYLE, ssn->config.background_url); diff --git a/src/local_config.h b/src/local_config.h index 36950af..bd82e26 100644 --- a/src/local_config.h +++ b/src/local_config.h @@ -23,6 +23,7 @@ struct local_config { int changed; + char* logged_in; char* theme; char* background_url; int themeclr; diff --git a/src/local_config_set.c b/src/local_config_set.c index 7b8f258..093b450 100644 --- a/src/local_config_set.c +++ b/src/local_config_set.c @@ -102,6 +102,9 @@ void read_config(struct session* ssn) SET_COOKIE_CONFIG(ssn->post.jslive, ssn->cookies.jslive, ssn->config.jslive); + SET_COOKIE_CONFIG(0, + ssn->cookies.logged_in, + ssn->config.logged_in); SET_COOKIE_CONFIG((ssn->post.files.content && ssn->post.files.content[0].content), ssn->cookies.background_url, ssn->config.background_url); diff --git a/src/local_config_set.h b/src/local_config_set.h index 9c26064..6c7082b 100644 --- a/src/local_config_set.h +++ b/src/local_config_set.h @@ -32,5 +32,6 @@ int set_config_int(int* ssn, char* value); void load_config(struct session* ssn, mastodont_t* api); +void read_config(struct session* ssn); #endif // LOCAL_CONFIG_SET_H