From df27783706635c3596a03e1d2ffbb0ba933b9b23 Mon Sep 17 00:00:00 2001 From: nekobit Date: Thu, 19 May 2022 04:44:05 +0000 Subject: [PATCH] Solarized theme by Coyote Also fixed up options FossilOrigin-Name: 961da4797b37b2cbe3954d43603e68c5b7f1b12d2900ae5ee87be9650356dd3b --- dist/treebird40.css | 1251 --------------------------------- src/cookie.c | 3 +- src/cookie.h | 3 +- src/local_config.h | 2 +- src/local_config_set.c | 3 +- src/main.c | 2 +- src/page_config.c | 22 +- src/query.c | 2 +- src/query.h | 2 +- static/config_appearance.html | 4 +- static/config_general.html | 24 +- 11 files changed, 44 insertions(+), 1274 deletions(-) delete mode 100644 dist/treebird40.css diff --git a/dist/treebird40.css b/dist/treebird40.css deleted file mode 100644 index 7ac8b7e..0000000 --- a/dist/treebird40.css +++ /dev/null @@ -1,1251 +0,0 @@ -/* Look, I tried my best to make this theme compatible with browsers like Netsurf and stuff, I HATE - the modern web and flexboxes and stuff, so as a result, you WILL see some fugly things in here - that you will probably want to cleanup or throw out completely, this CSS is a big hack. - - Other themes do not need to be compatible with Netsurf and older browsers or use tables, - I just wanted this to be as compatible as possible, go wild with your own themes */ - -* -{ - margin: 0; - padding: 0; -} - -html, body -{ - margin: 0; - padding: 0; - margin-top: 0px; -} - -html -{ - height: 100%; - background-color: #f6f6f6; -} - -body -{ - background-attachment: fixed !important; - background-size: cover !important; - background-color: unset; - font-family: Arial, Helvetica, sans-serif; - min-height: 100%; -} - -/* Basic elements */ -h1, h2, h3, h4 -{ - margin: 12px 0px 6px 0px; -} - -ul -{ - margin: 12px; -} - -#main-page-container -{ - padding: 8px; -} - -#main-page -{ - background: url("/img/noise.png"); - background-color: rgba(255, 255, 255, 0.95); - background-attachment: fixed; - backdrop-filter: saturate(600%) blur(12px); - width: 1000px; - margin-left: auto; - margin-right: auto; - box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.3); - border-width: 0; - border-radius: 8px; -} - -.hidden -{ - display: none; -} - -.pointer -{ - cursor: pointer; -} - -a, a:visited, a:hover, a:active -{ - color: inherit; -} - -.mention -{ - color: #cc0000; - text-decoration: none; - background-color: #ffcccc; - border-radius: 3px; - padding-left: 2px; - padding-right: 2px; -} - -.greentext -{ - color: #00aa00; -} - -/* Cleans up most of the tables */ -table.ui-table td -{ - padding: 0; - margin: 0; - border-collapse: collapse !important; - vertical-align: top; -} - -#content -{ - overflow: hidden; - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; -} - -#navbar -{ - border-top-left-radius: 8px; - border-top-right-radius: 8px; - background: rgba(253, 253, 253, 0.85); - backdrop-filter: saturate(500%) blur(12px); - width: 1000px; - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05); - z-index: 999; - position: sticky; - top: 0px; -} - -#navbar img -{ - vertical-align: middle; - display: inline-block; - margin: 8px 3px 10px 14px; -} - -#navbar span.info -{ - vertical-align: middle; - margin-left: 15px; - color: #202020; - /* font-variant: small-caps; */ - font-size: 28px; -} - -#navbar-right-container -{ - width: 782px; - display: inline-block; - position: relative; - top: 11px; - padding-right: 8px; - align-items: center; -} - -#navbar-right form -{ - float: right; -} - -#navbar-right -{ - display: inline-block; - float: right; -} - -#login-header -{ - vertical-align: middle; - float: left; - position: relative; - top: 4px; - margin-right: 15px; - text-decoration: none; -} - -#main -{ - background-color: rgba(255, 255, 255, 0.7); - width: 608px; - max-width: 608px !important; - min-width: 608px; - border-collapse: collapse !important; - padding: 0; -} - -#content -{ - border-collapse: collapse !important; - min-height: 600px; -} - -#leftbar -{ - border-right: 1px solid #eaeaea; -} - -#rightbar -{ - border-left: 1px solid #eaeaea; -} - -.sidebar -{ - width: 180px; - min-height: 600px; - max-width: 180px; - min-width: 180px; -} - -#leftbar -{ -} - -#leftbar ul -{ - margin: 0; - padding: 0; -} - -#leftbar ul li -{ - list-style-type: none; -} - - -#rightbar -{ - min-width: 210px; - max-width: 210px; -} - - -/************************************************* - * COMMON ELEMENTS * - *************************************************/ - -table.present -{ - border: 1px solid #cacaca; -} - -table.present th, table.present td -{ - padding: 2px 5px; -} - -#env-table -{ - margin-top: 5px; -} - -.e-error -{ - display: block; - background-color: #fcb0b0; - color: #000; - border: 1px solid #bb1c1f; - padding: 15px; - font-weight: bold; -} - -.error-pad -{ - margin: 5px; - border-radius: 4px; -} - -.e-notice -{ - display: block; - background-color: #ddeeff; - color: #000; - border: 1px solid #66ccff; - padding: 15px; - font-weight: bold; -} - -/************************************************* - * BUTTONS * - *************************************************/ -.btn -{ - background-color: #fff; - color: #000; - border-bottom: 1px solid #dadada; - text-decoration: none; - transition: background-color .15s, border .15s; -} - -.btn:hover -{ - background-color: #dddddd; - border-bottom: 1px solid #aa4040; - color: #000; - cursor: pointer; -} - -.btn:active -{ - background-color: #ffcccc; - border-color: #400000; - color: #fff; - cursor: pointer; -} - -.btn-disabled -{ - color: #cacaca !important; - background: #f3f3f3 !important; -} - -.btn-disabled:hover -{ - background: #f3f3f3; -} - -.btn-disabled:active -{ - background: #f3f3f3; -} - - -input[type=button], input[type=submit] -{ - border: 1px solid #cacaca; - padding: 3px 15px; -} - -.sidebarbtn -{ - position: relative; - top: 0px; - border: 1px solid transparent; - display: block; - padding: 10px 8px 10px 16px; - margin: 4px; - border-radius: 8px; - transition: top .2s, - box-shadow .2s, - background-color .2s, - transform .2s; -} - -.sidebarbtn:hover -{ - background-color: rgba(255, 255, 255, 0.6); - border: 1px solid #efefef; - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05); - -; -} - -.sidebarbtn:active -{ - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.02); - transform: scale(.9); -} - - -.sidebarbtn.focused -{ - -} - -.sidebarbtn-sub -{ - display: block; - color: #000; - padding: 8px; - padding-left: 32px; - text-decoration: none; -} - -.sidebar-config -{ - background-color: #efefef; - border-left: 3px solid #aa0000; - box-shadow: inset 0px 2px 3px rgba(0, 0, 0, 0.1); -} - -.sidebarbtn-sub.focused -{ - font-weight: bold; -} - -.sidebarbtn-sub:active, .sidebarbtn-sub:hover -{ - background-color: #dadada; -} - -/**************************** - * Notifications * - ***************************/ -.notification -{ - border-bottom: 1px solid #dadada; - width: 100%; -} - -.pfp-compact-td -{ - width: 16px; -} - -.pfp-compact-td img -{ - border-radius: 3px; - width: 24px; - height: 24px; - object-fit: cover; -} - -.notification-compact -{ - min-width: 100%; -} - -.notification-compact .notification-content -{ - max-height: 100px; - overflow: hidden; -} - -.notification-compact:hover .notification-content -{ - max-height: unset; - overflow: hidden; -} - -.notification-compact p -{ - margin: 0; -} -.notification-compact .notification-info -{ - font-size: 12px; - padding-left: 2px; - padding-right: 2px; - margin-top: 0; - font-weight: bold; -} - -.notification-info svg, -.notification-info-format svg -{ - width: 16px; - height: 16px; - stroke: #aa0000; -} - -.notification-table-bit -{ - width: auto; -} - -/* Only move up if SVG is next to it, the SVG moves the text */ -.notification .notification-text-group-with-icon -{ - vertical-align: middle; -} - -.notification-info svg.like, -.notification-info-format svg.like -{ - fill: #aa0000; - -} - -svg.like, svg.repeat, svg.follow, svg.reply, svg.in-reply-to-icon -{ - vertical-align: middle; -} - -svg.in-reply-to-icon -{ - position: relative; - top: -3px; - stroke: #606060; -} - -.in-reply-to -{ - color: #606060; -} - -.in-reply-to-id -{ - text-decoration: none; - line-height: 23px; -} - -.notification-compact .notification-content -{ - color: #808080; - font-size: 12px; - padding: 2px 0 2px 0; -} - -.notification-compact .notification-stats -{ - color: #500000; - font-size: 10px; -} - -.notification-info -{ - margin-top: 7px; -} - -.notification-info img, -.notification-info-format img -{ - margin-left: 38px; - width: 24px; - height: 24px; - object-fit: cover; -} - -.notification-info .notification-user, -.notification-info-format .notification-user -{ - display: inline; - vertical-align: middle; - position: relative; - top: -8px; - left: 2px; -} - -/*************************** - * Statuses * - **************************/ -.status, -.notification-regular -{ - padding: 6px 2px 0 6px; - border-bottom: 1px solid #cacaca !important; - width: 100%; - border-spacing: 0px; -} - -.status.focused -{ - background-color: #ffdddd; - border-left: 3px solid #aa0000; -} - -.notification-info + .status, -.notification-info-format + .status -{ - padding-top: 0; -} - -.status .profile-picture -{ - display: inline-block; - width: 52px; - min-width: 52px; - height: 52px; - background-position: center center; - background-repeat: no-repeat; - background-size: cover; - border-radius: 4px; - margin-bottom: 5px; -} - -.pfp-td -{ - width: 56px; - border-collapse: collapse !important; - padding: 6px; -} - -.pfp-td img -{ - border-radius: 3px; - width: 56px; - height: 56px; - object-fit: cover; -} - -.status tr -{ - width: auto; -} - - -.status .status-info, -.notification-info-format, -.notification-content -{ - min-width: 0; - width: auto; - padding: 0 0 0 10px; -} - -.status .status-info > table.ui-table -{ - width: 100%; -} - -.status .status-info table.ui-table, .status .status-info table.ui-table td, .status .status-info table.ui-table tr -{ - border-collapse: collapse !important; - border-spacing: 0px; - padding: 0; - margin: 0; -} - -.status .instance-info -{ - font-style: italic; - text-decoration: none; - margin: 0 4px 0 6px; - font-size: 14px; - padding-top: 1px; -} - -.status .poster-stats -{ - /* To maintain compatibility while keeping it a flexbox, we have to - * hardcode the width, sorry! Tables are just weird and I hate CSS */ - max-width: 520px; -} - -.status .username, -.notification-regular .username -{ - display: inline-block; - font-weight: bold; - text-overflow: ellipsis; - overflow: hidden; - max-width: 350px; - white-space: nowrap; - vertical-align: middle; -} - -.status .status-content -{ - margin: 2px 0 0 0; - overflow-wrap: break-word; - width: 520px; - display: block; -} - -.status .status-content p -{ - margin: 2px 0 0 0; -} - -.status-visibility -{ - color: #808080; - display: inline; - float: right; - font-size: 12px; - margin: 3px 0 0 3px; -} - -.status-interact -{ - margin: 8px 0 0 0; -} - -.status-interact table.ui-table -{ - border-collapse: collapse !important; - padding: 0; -} - -.status-interact table.ui-table tr -{ - border-collapse: collapse !important; - padding: 0; -} - -/*************************** - * Element Grouping * - **************************/ -.group -{ - padding: 0; - margin: 0 !important; - height: 28px; - -} - -/* These are a pain for some reason */ -.group-inputbox -{ - border: 1px solid #cacaca; - padding-left: 5px; - border-right: 0px; - height: 26px; -} - -.group-left -{ - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; -} - -.group-right -{ - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} - -/************************* - * Config * - ************************/ -#config-page -{ - padding: 0 12px; -} - -#config-page h1 -{ - padding-left: 12px; - padding-bottom: 6px; - border-bottom: 1px solid #cacaca; -} - -#config-page h3 -{ - margin-left: 15px; -} - -#config-page ul -{ - list-style-type: none; - padding-left: 15px; -} - -/********************** - * Profiles * - **********************/ -.header-btn -{ - display: inline-block; - padding: 8px 15px; - margin: 0; - background: inherit; - text-decoration: none; - color: #606060; - font-size: 14px; -} - -.header-btn .btn-content -{ - color: #000; -} - -.btn.header-btn:hover span -{ - color: #fff; -} - -.header-btn span -{ - display: block; - text-align: center; -} - -.acct-banner -{ - width: 100%; - background-position: center center; - background-repeat: no-repeat; - background-size: cover; - height: 256px; -} - -.account -{ - position: relative; -} - -.acct-badge -{ - position: absolute; - left: 8px; - top: 8px; - font-size: 12px; - padding: 4px 8px; - color: #dadada; - text-transform: uppercase; - background-color: rgba(0, 0, 0, 0.7); - border-radius: 5px; -} - -.account-note -{ - word-break: break-all; - text-align: center; -} - -.account-info -{ - background: linear-gradient(#e4e4e4, #efefef); - color: #000; - padding: 15px 50px; - border-bottom: 1px solid #cacaca; - max-height: 360px; - overflow: auto; -} - -.acct-pfp -{ - position: absolute; - display: inline; - z-index: 100; - border: 3px solid #cacaca; - background-color: #fff; - border-radius: 8px; - width: 100px; - height: 100px; - top: 190px; - left: 42px; - object-fit: cover; - background-position: center center; - background-repeat: no-repeat; - background-size: cover; -} - -.acct-header -{ - z-index: 1; - padding-left: 160px; - background: linear-gradient(#fff, #f1f1f1); - border-bottom: 1px solid #cacaca; - background-color: #e8e8e8; -} - -.acct-info-data -{ - display: inline-block; - position: relative; - left: 155px; - top: 185px; - font-weight: bold; - text-shadow: 0px 2px 6px #000; -} - -.acct-banner -{ - overflow: hidden; -} - - -.acct-displayname -{ - font-size: 26px; - display: inline-block; - white-space: nowrap; - text-overflow: ellipsis; - padding: 6px 6px 8px; - overflow: hidden; - max-width: 420px !important; - color: #fff; -} - -.acct-username -{ - font-size: 14px; - color: #dadada; - display: block; - padding-left: 6px; - font-weight: bold; - text-shadow: 0px 0px 5px #000; -} - -.follow-btn -{ - margin-left: auto; - position: relative; - float: right; - top: 10px; - margin: 0px 15px 15px 0px; - padding: 5px 20px; - border-radius: 24px; - background: inherit; - box-shadow: inset 0px 0px 2px rgba(0, 0, 0, 0.2); -} - -.follow-btn.active -{ - box-shadow: unset; - color: #fff; - background: linear-gradient(#aa0000, #600000); -} - -/**************** - * Statusbox * - ****************/ -.statusbox -{ - display: block; - flex-direction: column; - padding: 5px; -} - -.statusbox textarea -{ - border-radius: 5px; - border: 1px solid #eaeaea; - display: block; - width: 592px; - max-width: 592px; - min-width: 592px; - margin-bottom: 5px; - padding: 2px; - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05); -} - -.statusbox .statusfooter -{ - display: block; - flex-direction: row; -} - -.statusbox .statusfooter-left -{ - display: inline-block; -} - -.statusbox .statusfooter-right -{ - - float: right; -} - - -.status-interact label -{ - display: block; - padding: 3px 8px; -} - -.status-interact svg.repeat.active -{ - stroke: #08d345; -} - -.status-interact svg.like.active -{ - fill: #fcd202; - stroke: #fcd202; -} - -.status-interact svg.like:hover, -.status-interact svg.like:active, -.status-interact svg.like:focus -{ - stroke: #08d3a5; - pointer: select; -} - -.status-interact svg.like:hover, -.status-interact svg.like:active, -.statis-interact svg.like:focus -{ - stroke: #fcd202; - pointer: select; -} - -.status-interact svg.repeat:hover, -.status-interact svg.repeat:active, -.statis-interact svg.repeat:focus -{ - stroke: #08d345; -} - -.status-interact .count -{ - font-size: 14px; - padding-bottom: 3px; -} - -/* Emoji reacts */ -.emoji -{ - font-family: monospace; - display: inline; - width: 32px; - height: 32px; - vertical-align: middle; - object-fit: contain; - transition: transform .2s; -} - -.emoji:hover -{ - transform: scale(1.5); -} - -.emoji:active -{ - transform: scale(2.7); -} - -.emoji-react-box -{ - border-radius: 4px; - border: 1px solid #cacaca; -} - -.form-group -{ - padding: 5px; - display: block; -} - -/* Simple page layout */ -.simple-page -{ - padding: 0 12px; -} - -.simple-page h1 -{ - padding-left: 12px; - padding-bottom: 6px; - border-bottom: 1px solid #cacaca; -} - -.simple-page h3 -{ - margin-left: 15px; -} - -.simple-page ul -{ - list-style-type: none; - padding-left: 15px; -} - -.simple-page p -{ - margin-left: 10px; - margin-right: 10px; -} - -/* Attachments */ -.attachments img -{ - min-width: 100px; -} - -.attachments -{ - margin: 10px 0 3px 0; -} - -.attachment-container -{ - z-index: 3; - display: inline-block; - overflow: hidden; -} - -.sensitive -{ - z-index: 2; - filter: blur(16px); - transition: filter .4s; -} - -.sensitive:hover -{ - filter: none; -} - -.statusbox textarea -{ - border: 1px solid #cacaca; -} - -/* Emoji reacts */ -.emoji-reactions -{ - display: block; - padding: 0; - margin-top: 8px; - padding-left: 0px !important; - margin-bottom: 6px; -} - -.emoji-react-box -{ - display: inline-block; - list-style-type: none; - padding: 3px 7px; - margin: 0 4px; -} - -.emoji -{ - font-family: Emoji; -} - -/************************************************* - * LISTS * - *************************************************/ -ul.large-list -{ - width: 500px; - border-radius: 15px; - background-color: #f8f8f8; - border: 1px solid #cacaca; - padding: 0; - overflow: hidden; -} - -ul.large-list li -{ - list-style-type: none; - margin: 0; -} - -ul.large-list li a -{ - display: block; - padding: 15px; - list-style-type: none; -} - -.lists-view-header -{ - text-align: center; -} - -.lists-view-container ul -{ - margin-left: auto; - margin-right: auto; -} - -.lists-view-container ul li:not(:last-child) -{ - border-bottom: 1px solid #dadada; -} - -/* Navigation */ -.navigation, -.tabs -{ - table-layout: fixed; - background-color: #f3f3f3; - color: #000; - width: 100%; - border-spacing: 0px; - box-shadow: 0px 1px 0px #dadada; -} - -.navigation .nav-btn, -.tabs .tab-btn -{ - display: block; - padding: 8px !important; -} - -.tabs .tab-btn -{ - width: 100%; - border: 0; -} - -.tabs .tab-btn.focused -{ - border-bottom: 3px solid #aa0000; -} - -.tabs .tab-btn:hover, -.tabs .tab-btn:active -{ - border-bottom: 3px solid #600000; -} - -.navigation tr td:not(:last-child), -.tabs tr td:not(:last-child) -{ - border-right: 1px solid #dadada; -} - -.ui-table tr td a -{ - text-decoration: none; -} - -/* MENUS */ - -.menu-container:hover .menu, -.menu-container:hover + .menu -{ - position: absolute; - display: block; -} - -.menu -{ - z-index: 5; - display: none; - background: #fafafa; - color: #000; - border-radius: 4px; - box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3); -} - -.menu ul -{ - margin: 0; - padding: 4px 0 4px 0; -} - -.menu ul li -{ - list-style-type: none; - display: block; -} - -.menu .btn-menu -{ - background: unset; - background-color: unset; - display: block; - padding: 6px 12px; - width: 100%; - border: 0; - cursor: pointer; - text-align: left; - box-sizing: border-box; -} - -.user-options-btn -{ - padding: 4px; - border-radius: 64px; - margin: 8px; - float: right; - font-size: 12px; - color: #dadada; - text-transform: uppercase; - background-color: rgba(0, 0, 0, .7); -} - -.menu .btn-menu:hover -{ - background-color: #eaeaea; - color: #000; -} - -.nolink -{ - text-decoration: none; -} diff --git a/src/cookie.c b/src/cookie.c index 1860bd5..33e05ca 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -65,7 +65,8 @@ char* read_cookies_env(struct cookie_values* cookies) { "statgreentexts", &(cookies->stat_greentexts), key_int }, { "statdope", &(cookies->stat_dope), key_int }, { "statoneclicksoftware", &(cookies->stat_oneclicksoftware), key_int }, - { "statemojilikes", &(cookies->stat_emoji_likes), key_int }, + { "statemojolikes", &(cookies->stat_emojo_likes), key_int }, + { "stathidemuted", &(cookies->stat_hide_muted), key_int }, { "instanceshowshoutbox", &(cookies->instance_show_shoutbox), key_int }, { "instancepanel", &(cookies->instance_panel), key_int }, }; diff --git a/src/cookie.h b/src/cookie.h index 8e42c66..4ce1e85 100644 --- a/src/cookie.h +++ b/src/cookie.h @@ -39,7 +39,8 @@ struct cookie_values struct key stat_greentexts; struct key stat_dope; struct key stat_oneclicksoftware; - struct key stat_emoji_likes; + struct key stat_emojo_likes; + struct key stat_hide_muted; struct key instance_show_shoutbox; struct key instance_panel; }; diff --git a/src/local_config.h b/src/local_config.h index 118b7c3..b9f7c53 100644 --- a/src/local_config.h +++ b/src/local_config.h @@ -34,7 +34,7 @@ struct local_config int stat_greentexts; int stat_dope; int stat_oneclicksoftware; - int stat_emoji_likes; + int stat_emojo_likes; int stat_hide_muted; int instance_show_shoutbox; int instance_panel; diff --git a/src/local_config_set.c b/src/local_config_set.c index 3dcd704..7d63507 100644 --- a/src/local_config_set.c +++ b/src/local_config_set.c @@ -88,7 +88,8 @@ void load_config(struct session* ssn, mastodont_t* api) set_config_int(LOAD_CFG_SIM("statgreentexts", stat_greentexts)); set_config_int(LOAD_CFG_SIM("statdope", stat_dope)); set_config_int(LOAD_CFG_SIM("statoneclicksoftware", stat_oneclicksoftware)); - set_config_int(LOAD_CFG_SIM("statemojilikes", stat_emoji_likes)); + set_config_int(LOAD_CFG_SIM("statemojolikes", stat_emojo_likes)); + set_config_int(LOAD_CFG_SIM("stathidemuted", stat_hide_muted)); set_config_int(LOAD_CFG_SIM("instanceshowshoutbox", instance_show_shoutbox)); set_config_int(LOAD_CFG_SIM("instancepanel", instance_panel)); } diff --git a/src/main.c b/src/main.c index 098579f..497962e 100644 --- a/src/main.c +++ b/src/main.c @@ -61,7 +61,7 @@ int main(void) .stat_greentexts = 1, .stat_dope = 1, .stat_oneclicksoftware = 1, - .stat_emoji_likes = 0, + .stat_emojo_likes = 0, .stat_hide_muted = 0, .instance_show_shoutbox = 1, .instance_panel = 1, diff --git a/src/page_config.c b/src/page_config.c index 77f8a22..dd6fec2 100644 --- a/src/page_config.c +++ b/src/page_config.c @@ -36,6 +36,8 @@ #include "../static/config_appearance.chtml" #include "../static/config_sidebar.chtml" +#define bool_checked(key) (ssn->config.key ? "checked" : "") + enum config_category { CONFIG_CAT_GENERAL, @@ -60,23 +62,39 @@ static char* construct_config_sidebar(enum config_category cat, size_t* size) return sidebar_html; } - void content_config_general(struct session* ssn, mastodont_t* api, char** data) { char* sidebar_html = construct_config_sidebar(CONFIG_CAT_GENERAL, NULL); + + char* general_page; + + easprintf(&general_page, data_config_general_html, + bool_checked(js), + bool_checked(jsactions), + bool_checked(jsreply), + bool_checked(jslive), + bool_checked(stat_attachments), + bool_checked(stat_greentexts), + bool_checked(stat_dope), + bool_checked(stat_oneclicksoftware), + bool_checked(stat_emojo_likes), + bool_checked(stat_hide_muted), + bool_checked(instance_show_shoutbox), + bool_checked(instance_panel)); load_config(ssn, api); struct base_page b = { .category = BASE_CAT_CONFIG, .locale = L10N_EN_US, - .content = data_config_general_html, + .content = general_page, .sidebar_left = sidebar_html }; render_base_page(&b, ssn, api); // Cleanup free(sidebar_html); + free(general_page); } diff --git a/src/query.c b/src/query.c index 5ffe9ce..60bbdb7 100644 --- a/src/query.c +++ b/src/query.c @@ -108,7 +108,7 @@ char* read_post_data(struct post_values* post) { "statgreentexts", &(post->stat_greentexts), key_int }, { "statdope", &(post->stat_dope), key_int }, { "statoneclicksoftware", &(post->stat_oneclicksoftware), key_int }, - { "statemojolikes", &(post->stat_emoji_likes), key_int }, + { "statemojolikes", &(post->stat_emojo_likes), key_int }, { "stathidemuted", &(post->stat_hide_muted), key_int }, { "instanceshowshoutbox", &(post->instance_show_shoutbox), key_int }, { "instancepanel", &(post->instance_panel), key_int }, diff --git a/src/query.h b/src/query.h index fbcaf78..36627b7 100644 --- a/src/query.h +++ b/src/query.h @@ -41,7 +41,7 @@ struct post_values struct key stat_greentexts; // Int struct key stat_dope; // Int struct key stat_oneclicksoftware; // Int - struct key stat_emoji_likes; // Int + struct key stat_emojo_likes; // Int struct key stat_hide_muted; // Int struct key instance_show_shoutbox; // Int struct key instance_panel; // Int diff --git a/static/config_appearance.html b/static/config_appearance.html index 66666c6..29d88f9 100644 --- a/static/config_appearance.html +++ b/static/config_appearance.html @@ -8,8 +8,8 @@
  • diff --git a/static/config_general.html b/static/config_general.html index cf1c6dc..3ba8f53 100644 --- a/static/config_general.html +++ b/static/config_general.html @@ -7,19 +7,19 @@

    JavaScript

    @@ -27,27 +27,27 @@

    Statuses

    @@ -55,11 +55,11 @@

    Instance