-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Community creation' warning #1244
base: master
Are you sure you want to change the base?
Changes from 3 commits
f1b6be8
ee45f02
a8a9c2d
0a58435
bad9661
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ MainWindow::MainWindow(WSClient *client, DbMasterController *mc, QWidget *parent | |
ui->labelAboutMainMCU->setText(tr("Main MCU version:")); | ||
|
||
ui->widgetNotFlashedWarning->hide(); | ||
ui->labelIsCommunityBuild->hide(); | ||
ui->labelNotFlashedWarningIcon->setPixmap(AppGui::qtAwesome()->icon(fa::warning).pixmap(QSize(20, 20))); | ||
ui->labelSerialNumberIncorrect->setStyleSheet("QLabel {color: blue;}"); | ||
connect(ui->labelSerialNumberIncorrect, &ClickableLabel::clicked, this, &MainWindow::onIncorrectSerialNumberClicked); | ||
|
@@ -999,14 +1000,22 @@ void MainWindow::updateSerialInfos() { | |
ui->label_UserManual->setText(MANUAL_STRING.arg(wsClient->isMPBLE() ? BLE_MANUAL_URL : MINI_MANUAL_URL)); | ||
ui->label_UserManual->show(); | ||
if (wsClient->isMPBLE() && wsClient->get_hwSerial() > STARTING_NOT_FLASHED_SERIAL && | ||
wsClient->get_hwSerial() == wsClient->get_platformSerial()) | ||
wsClient->get_hwSerial() == wsClient->get_platformSerial() && | ||
wsClient->get_hwSerial() < STARTING_COMMUNITY_SERIAL) | ||
{ | ||
ui->widgetNotFlashedWarning->show(); | ||
} | ||
else | ||
{ | ||
ui->widgetNotFlashedWarning->hide(); | ||
} | ||
if (wsClient->get_hwSerial() >= STARTING_COMMUNITY_SERIAL) { | ||
ui->labelIsCommunityBuild->show(); | ||
ui->groupBoxSecurityChallenge->setEnabled(false); | ||
} else { | ||
ui->labelIsCommunityBuild->hide(); | ||
ui->groupBoxSecurityChallenge->setEnabled(true); | ||
} | ||
} | ||
else | ||
{ | ||
|
@@ -1677,10 +1686,18 @@ void MainWindow::setUIDRequestInstructionsWithId(const QString & id) | |
|
||
void MainWindow::setSecurityChallengeText(const QString &id, const QString &bundleVersion) | ||
{ | ||
ui->labelSecurityChallenge->setText(tr("To be sure that no one has tampered with your device, you can request a challenge string and enter it below.<ol>" | ||
"<li>Get the serial number from the back of your device.</li>" | ||
"<li>­<a href=\"mailto:[email protected]?subject=Security Challenge Token and Response Request&body=My serial number is %1, my bundle number is %2 and my order number is: FILL ME\">Send us an email</a> with the serial number and your order number, requesting the challenge string.</li>" | ||
"<li>Enter the string you received from us</li></ol>").arg(id).arg(bundleVersion)); | ||
if (id.toInt() < STARTING_COMMUNITY_SERIAL) { | ||
ui->labelSecurityChallenge->setText(tr("To be sure that no one has tampered with your device, you can request a challenge string and enter it below.<ol>" | ||
"<li>Get the serial number from the back of your device.</li>" | ||
"<li>­<a href=\"mailto:[email protected]?subject=Security Challenge Token and Response Request&body=My serial number is %1, my bundle number is %2 and my order number is: FILL ME\">Send us an email</a> with the serial number and your order number, requesting the challenge string.</li>" | ||
"<li>Enter the string you received from us</li></ol>").arg(id).arg(bundleVersion)); | ||
} else { | ||
ui->labelSecurityChallenge->setText(tr("Your device (serial number %1) is a community-made device in no way affiliated with the original mooltipass team!<ol>" | ||
"<li>Mooltipass is open-source and open-hardware, so anyone with enough skill can make one;</li>" | ||
"<li>There's no way we can do a security challenge for your device, since we haven't made it and don't have the required data;</li>" | ||
"<li>This menu is disabled to avoid any frustration and erroneous emails;</li>" | ||
"</ol>").arg(id)); | ||
} | ||
} | ||
|
||
void MainWindow::enableCredentialsManagement(bool enable) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
<x>0</x> | ||
<y>0</y> | ||
<width>946</width> | ||
<height>632</height> | ||
<height>1081</height> | ||
</rect> | ||
</property> | ||
<property name="sizePolicy"> | ||
|
@@ -328,7 +328,7 @@ QWidget {background-color: #EFEFEF;}</string> | |
<enum>Qt::LeftToRight</enum> | ||
</property> | ||
<property name="currentIndex"> | ||
<number>9</number> | ||
<number>8</number> | ||
</property> | ||
<widget class="QWidget" name="pageNoDaemon"> | ||
<layout class="QHBoxLayout" name="horizontalLayout_noDaemon1"> | ||
|
@@ -576,8 +576,8 @@ Hint: keep your mouse positioned over an option to get more details.</string> | |
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>770</width> | ||
<height>882</height> | ||
<width>932</width> | ||
<height>1832</height> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tagging @deXol too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
</rect> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"> | ||
|
@@ -3371,6 +3371,22 @@ Hint: keep your mouse positioned over an option to get more details.</string> | |
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="labelIsCommunityBuild"> | ||
<property name="enabled"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<bold>true</bold> | ||
<underline>true</underline> | ||
</font> | ||
</property> | ||
<property name="text"> | ||
<string>Community Creation</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer_62"> | ||
<property name="orientation"> | ||
|
@@ -3939,8 +3955,8 @@ Hint: keep your mouse positioned over an option to get more details.</string> | |
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>646</width> | ||
<height>885</height> | ||
<width>524</width> | ||
<height>704</height> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also fixed |
||
</rect> | ||
</property> | ||
<property name="autoFillBackground"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that's a problem.... @deXol ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember explicitly changing these sizes, must be qt creator's doing. Will double-check tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed