mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
Miscellanous (and nonsensical) fixes
This commit is contained in:
parent
f652dbddf0
commit
582ace062b
6 changed files with 13 additions and 7 deletions
|
@ -62,8 +62,11 @@ alert::alert(QWidget *parent) :
|
||||||
|
|
||||||
ui->warningLabel->setText("Fatal error");
|
ui->warningLabel->setText("Fatal error");
|
||||||
ui->securityLabel->setText("Device lockdown");
|
ui->securityLabel->setText("Device lockdown");
|
||||||
|
log(global::encfs::lockdownMessage, className);
|
||||||
QString message = "Due to multiple incorrect passphrase attempts, this device is locked down until\n" + global::encfs::unlockTime + "\nand won't boot.";
|
QString message = "Due to multiple incorrect passphrase attempts, this device is locked down until\n" + global::encfs::unlockTime + "\nand won't boot.";
|
||||||
ui->messageLabel->setText(message);
|
ui->messageLabel->setText(message);
|
||||||
|
poweroff(false);
|
||||||
|
QTimer::singleShot(1000, this, SLOT(quit()));
|
||||||
}
|
}
|
||||||
if(global::battery::showCriticalBatteryAlert == true) {
|
if(global::battery::showCriticalBatteryAlert == true) {
|
||||||
global::battery::showCriticalBatteryAlert = false;
|
global::battery::showCriticalBatteryAlert = false;
|
||||||
|
@ -79,7 +82,7 @@ alert::alert(QWidget *parent) :
|
||||||
ui->securityLabel->setText("The battery's charge level is critical.");
|
ui->securityLabel->setText("The battery's charge level is critical.");
|
||||||
ui->messageLabel->setText("To prevent damage, your device has been turned off.\nPlease consider charging it.");
|
ui->messageLabel->setText("To prevent damage, your device has been turned off.\nPlease consider charging it.");
|
||||||
poweroff(false);
|
poweroff(false);
|
||||||
qApp->quit();
|
QTimer::singleShot(1000, this, SLOT(quit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->warningLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 16pt }");
|
ui->warningLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 16pt }");
|
||||||
|
@ -147,3 +150,7 @@ void alert::updateReset() {
|
||||||
string_writeconfig("/mnt/onboard/onboard/.inkbox/can_really_update", "false");
|
string_writeconfig("/mnt/onboard/onboard/.inkbox/can_really_update", "false");
|
||||||
string_writeconfig("/mnt/onboard/onboard/.inkbox/can_update", "false");
|
string_writeconfig("/mnt/onboard/onboard/.inkbox/can_update", "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void alert::quit() {
|
||||||
|
qApp->quit();
|
||||||
|
}
|
||||||
|
|
1
alert.h
1
alert.h
|
@ -26,6 +26,7 @@ private slots:
|
||||||
void on_continueBtn_clicked();
|
void on_continueBtn_clicked();
|
||||||
void on_resetBtn_clicked();
|
void on_resetBtn_clicked();
|
||||||
void on_continue2Btn_clicked();
|
void on_continue2Btn_clicked();
|
||||||
|
void quit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::alert *ui;
|
Ui::alert *ui;
|
||||||
|
|
|
@ -254,8 +254,7 @@ void encryptionManager::unlockEncryptedStorage() {
|
||||||
currentEpoch += 86400;
|
currentEpoch += 86400;
|
||||||
std::string unlockTime_str = to_string(currentEpoch);
|
std::string unlockTime_str = to_string(currentEpoch);
|
||||||
global::encfs::unlockTime = QDateTime::fromTime_t(currentEpoch).toString();
|
global::encfs::unlockTime = QDateTime::fromTime_t(currentEpoch).toString();
|
||||||
QString message = "FATAL: 4 invalid passphrase tries, locking down device until " + global::encfs::unlockTime;
|
global::encfs::lockdownMessage = "FATAL: 4 invalid passphrase tries, locking down device until " + global::encfs::unlockTime;
|
||||||
log(message, className);
|
|
||||||
string_writeconfig("/external_root/boot/flags/ENCRYPT_LOCK", unlockTime_str);
|
string_writeconfig("/external_root/boot/flags/ENCRYPT_LOCK", unlockTime_str);
|
||||||
global::encfs::lockdown = true;
|
global::encfs::lockdown = true;
|
||||||
setupMessageBoxRan = true;
|
setupMessageBoxRan = true;
|
||||||
|
@ -263,8 +262,6 @@ void encryptionManager::unlockEncryptedStorage() {
|
||||||
alertWindow = new alert();
|
alertWindow = new alert();
|
||||||
alertWindow->setAttribute(Qt::WA_DeleteOnClose);
|
alertWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
alertWindow->showFullScreen();
|
alertWindow->showFullScreen();
|
||||||
poweroff(false);
|
|
||||||
qApp->quit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(passphraseTries <= 2) {
|
if(passphraseTries <= 2) {
|
||||||
|
|
|
@ -98,6 +98,7 @@ namespace global {
|
||||||
namespace encfs {
|
namespace encfs {
|
||||||
inline QString passphrase;
|
inline QString passphrase;
|
||||||
inline QString unlockTime;
|
inline QString unlockTime;
|
||||||
|
inline QString lockdownMessage;
|
||||||
inline bool cancelSetup;
|
inline bool cancelSetup;
|
||||||
inline bool cancelUnlock;
|
inline bool cancelUnlock;
|
||||||
inline bool lockdown;
|
inline bool lockdown;
|
||||||
|
|
|
@ -122,7 +122,7 @@ generalDialog::generalDialog(QWidget *parent) :
|
||||||
lowBatteryDialog = true;
|
lowBatteryDialog = true;
|
||||||
ui->stackedWidget->setCurrentIndex(1);
|
ui->stackedWidget->setCurrentIndex(1);
|
||||||
get_battery_level();
|
get_battery_level();
|
||||||
QString message = "The battery's level is low. Please charge your eReader.\nCurrent level: ";
|
QString message = "The battery's level is low.\nPlease charge your eReader.\nCurrent level: ";
|
||||||
message.append(batt_level);
|
message.append(batt_level);
|
||||||
ui->bodyLabel->setText(message);
|
ui->bodyLabel->setText(message);
|
||||||
ui->headerLabel->setText("Low battery");
|
ui->headerLabel->setText("Low battery");
|
||||||
|
|
|
@ -191,7 +191,7 @@ virtualkeyboard::virtualkeyboard(QWidget *parent) :
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEdit->setStyleSheet("border: 3px solid black");
|
ui->lineEdit->setStyleSheet("border: 3px solid black");
|
||||||
if(global::keyboard::vncDialog == true or global::keyboard::wifiPassphraseDialog == true) {
|
if(global::keyboard::vncDialog == true or global::keyboard::wifiPassphraseDialog == true or global::keyboard::encfsDialog == true) {
|
||||||
ui->lineEdit->setFont(QFont("Noto Mono"));
|
ui->lineEdit->setFont(QFont("Noto Mono"));
|
||||||
}
|
}
|
||||||
else if(global::keyboard::searchDialog == true){
|
else if(global::keyboard::searchDialog == true){
|
||||||
|
|
Loading…
Reference in a new issue