Add update notice and require release build secrets
All checks were successful
Release App / release-app (push) Successful in 58s
All checks were successful
Release App / release-app (push) Successful in 58s
This commit is contained in:
@@ -96,6 +96,18 @@ void App::draw() {
|
||||
mvprintw(header_y, 1, "%s", header_label.c_str());
|
||||
const std::string auth_label = authorized_ ? "ready" : current_auth_label();
|
||||
const int auth_x = std::max(1, width - static_cast<int>(auth_label.size()) - 2);
|
||||
if (!update_notice_.empty()) {
|
||||
const std::string centered_notice =
|
||||
truncate_to_width(update_notice_, std::max(1, width - 4));
|
||||
const int notice_x =
|
||||
std::max(1, (width - static_cast<int>(centered_notice.size())) / 2);
|
||||
if (notice_x > 1 + static_cast<int>(header_label.size()) &&
|
||||
notice_x + static_cast<int>(centered_notice.size()) < auth_x - 1) {
|
||||
attron(A_BOLD);
|
||||
mvprintw(header_y, notice_x, "%s", centered_notice.c_str());
|
||||
attroff(A_BOLD);
|
||||
}
|
||||
}
|
||||
mvprintw(header_y, auth_x, "%s", auth_label.c_str());
|
||||
attroff(A_REVERSE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user