Skip to content

Commit

Permalink
Add labels to menu buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
heyainsleymae committed Dec 4, 2024
1 parent 81a59ae commit 0806e0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/tpls.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ <h2 id="{{id}}" class="gheader">{{head}}</h2>

<!-- TPL Nav Bar wrapper -->
<script id="tpl-nav-wrap" type="text/template">
<button type="button"class="nav-bars"><i class="fa fa-bars"></i></button>
<button type="button"class="nav-gears"><i class="fa fa-cog"></i></button>
<button type="button"class="nav-bars" aria-label="{{ button_menu }}"><i class="fa fa-bars" aria-hidden="true"></i></button>
<button type="button"class="nav-gears" aria-label="{{ button_settings }}"><i class="fa fa-cog" aria-hidden="true"></i></button>
<i class="nav-ws-status fa fa-stop"></i>
<div class="nav-list"></div>
<div class="powered hidden-xs hidden-sm">by <a href="https://goaccess.io/">GoAccess</a> <span>v{{version}}</span> and <a href="https://gwsocket.io/">GWSocket</a></div>
Expand Down
6 changes: 6 additions & 0 deletions src/labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,4 +588,10 @@
#define STATUS_CODE_783 \
N_("783 - Unexpected Token: The request includes a JSON syntax error")

/* Menu buttons */
#define HTML_REPORT_NAV_BUTTON_MENU \
N_("Menu")
#define HTML_REPORT_NAV_BUTTON_SETTINGS \
N_("Settings")

#endif // for #ifndef LABELS_H
2 changes: 2 additions & 0 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,8 @@ print_json_i18n_def (FILE *fp) {
{"table_columns" , HTML_REPORT_PANEL_TABLE_COLS} ,
{"thead" , T_HEAD} ,
{"version" , GO_VERSION} ,
{"button_menu" , HTML_REPORT_NAV_BUTTON_MENU} ,
{"button_settings" , HTML_REPORT_NAV_BUTTON_SETTINGS} ,
};
/* *INDENT-ON* */

Expand Down

0 comments on commit 0806e0c

Please sign in to comment.