diff --git a/nitrokeyapp/bak/change_pin_dialog.py b/nitrokeyapp/bak/change_pin_dialog.py deleted file mode 100644 index 1b61b658..00000000 --- a/nitrokeyapp/bak/change_pin_dialog.py +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Optional - -from PyQt5 import QtWidgets - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn -from nitrokeyapp.ui.change_pin_dialog import Ui_ChangePinDialog - - -class ChangePinDialog(QtUtilsMixIn, QtWidgets.QDialog): - def __init__(self, parent: Optional[QtWidgets.QWidget] = None) -> None: - QtWidgets.QDialog.__init__(self, parent) - QtUtilsMixIn.__init__(self) - - self.ui = Ui_ChangePinDialog() - self.ui.setupUi(self) - self.current_pin = self.ui.lineEdit_current_pin - self.current_pin.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - self.new_pin = self.ui.lineEdit_new_pin - self.new_pin.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - self.confirm_new_pin = self.ui.lineEdit_confirm_new_pin - self.confirm_new_pin.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - # self.buttons = self.get_widget(QtWidgets.QDialogButtonBox, "buttonBox") - self.btn_ok = self.ui.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok) - self.confirm_new_pin.textChanged.connect(self.same_pin) - self.new_pin.textChanged.connect(self.same_pin) - self.btn_ok.setEnabled(False) - - def same_pin(self) -> None: - if ( - self.new_pin.text() != self.confirm_new_pin.text() - or self.new_pin.text() == "" - ): - self.btn_ok.setEnabled(False) - else: - self.btn_ok.setEnabled(True) diff --git a/nitrokeyapp/bak/clock_progressbar.py b/nitrokeyapp/bak/clock_progressbar.py deleted file mode 100644 index 5e322d63..00000000 --- a/nitrokeyapp/bak/clock_progressbar.py +++ /dev/null @@ -1,62 +0,0 @@ -from PyQt5.QtCore import QRectF, QSize, Qt -from PyQt5.QtGui import QPainter, QPainterPath, QPen -from PyQt5.QtWidgets import QWidget - - -class ClockProgressBar(QWidget): - def __init__(self, parent=None): - super().__init__(parent) - self._value = 0 - self._max = 100 - - def setValue(self, value): - self._value = value - self.update() - - def setMaximum(self, max_value): - self._max = max_value - self.update() - - def value(self): - return self._value - - def maximum(self): - return self._max - - def paintEvent(self, event): - painter = QPainter(self) - painter.setRenderHint(QPainter.RenderHint.Antialiasing) - - size = min(self.width(), self.height()) - progress_radius = size / 4 - 2 - 10 - progress_x = (self.width() - 2 * progress_radius - 20) / 2 - progress_y = (self.height() - 2 * progress_radius - 20) / 2 - progress_rect = QRectF( - progress_x, progress_y, 2 * progress_radius, 2 * progress_radius - ) - progress_angle = self._value / self._max * 360 - painter.setPen(QPen(Qt.GlobalColor.blue, 6, Qt.PenStyle.SolidLine)) - - path = QPainterPath() - path.arcMoveTo(progress_rect, -90) - path.arcTo(progress_rect, -90, -progress_angle) - painter.drawPath(path) - - painter.setPen(Qt.GlobalColor.black) - painter.setFont(self.font()) - - text = str(self._value) - text_width = painter.fontMetrics().width(text) - text_height = painter.fontMetrics().height() - - text_x = int(self.width() / 2 - text_width / 2) - text_y = int((self.height() + size) / 2 + text_height / 2) - - painter.drawText(text_x, text_y, text) - - painter.end() - - def sizeHint(self): - progress_radius = min(self.width(), self.height()) / 4 - 2 - 10 - widget_size = int(progress_radius + 20) - return QSize(widget_size, widget_size) diff --git a/nitrokeyapp/bak/edit_button_widget.py b/nitrokeyapp/bak/edit_button_widget.py deleted file mode 100644 index 7b9cf9ad..00000000 --- a/nitrokeyapp/bak/edit_button_widget.py +++ /dev/null @@ -1,51 +0,0 @@ -from PyQt5 import QtWidgets -from PyQt5.QtCore import QTimer, pyqtSlot - - -class EditButtonsWidget(QtWidgets.QWidget): - def __init__(self, table, pop_up_copy, res, parent=None): - super().__init__(parent) - self.table_pws = table - self.pop_up_copy = pop_up_copy - - # add your buttons - layout = QtWidgets.QHBoxLayout() - layout.setContentsMargins(0, 0, 0, 0) - layout.setSpacing(0) - - Copy = QtWidgets.QPushButton("Icon") - Copy.setFixedSize(65, 65) - Copy.clicked.connect(self.copy_to_clipboard_function) - layout.addWidget(Copy) - layout.addWidget(QtWidgets.QLabel(str(res))) - - self.setLayout(layout) - - @pyqtSlot() - def copy_to_clipboard_function(self): - buttons_index = self.table_pws.indexAt(self.pos()) - item = self.table_pws.item(buttons_index.row(), buttons_index.column() + 3) - QtWidgets.QApplication.clipboard().setText(item.text()) - # qtimer popup - self.time_to_wait = 5 - self.pop_up_copy.setText("Data added to clipboard.") # {0} for time display - self.pop_up_copy.setStyleSheet( - "background-color: #2B5DD1; color: #FFFFFF ; border-style: outset;" - "padding: 2px ; font: bold 20px ; border-width: 6px ; border-radius: 10px ; border-color: #2752B8;" - ) - self.pop_up_copy.show() - self.timer = QTimer(self) - self.timer.setInterval(1000) - self.timer.timeout.connect(self.changeContent) - self.timer.start() - - def changeContent(self): - self.pop_up_copy.setText("Data added to clipboard.") - self.time_to_wait -= 1 - if self.time_to_wait <= 0: - self.pop_up_copy.hide() - self.timer.stop() - - def closeEvent(self, event): - self.timer.stop() - event.accept() diff --git a/nitrokeyapp/bak/key_generation.py b/nitrokeyapp/bak/key_generation.py deleted file mode 100644 index de08f658..00000000 --- a/nitrokeyapp/bak/key_generation.py +++ /dev/null @@ -1,79 +0,0 @@ -from PyQt5 import QtWidgets -from PyQt5.QtCore import pyqtSlot - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn -from nitrokeyapp.ui.key_generation import Ui_Key_generation - - -class KeyGeneration(QtUtilsMixIn, QtWidgets.QWizard): - def __init__(self, qt_app: QtWidgets.QApplication): - QtWidgets.QWizard.__init__(self) - QtUtilsMixIn.__init__(self) - - self.app = qt_app - self.ui = Ui_Key_generation() - self.ui.setupUi(self) - # dialogs - self.adsettings_button = self.ui.pushButton_wiz - self.adsettings = self.ui.adsettings_key - self.wizard_page_userinfo = self.ui.wizardPage1 - - self.placeholder_path = self.ui.lineEdit - self.placeholder_path.setPlaceholderText("Path") - - self.with_backup = self.ui.radioButton_3 - self.lastpage_keygen = self.ui.wizardPage - self.confirm_path = self.ui.lineEdit - self.confirm_path.setEnabled(False) - - self.real_name = self.ui.lineEdit_2 - self.wizard_page_userinfo.registerField("real_name*", self.real_name) - - self.email = self.ui.lineEdit_3 - self.wizard_page_userinfo.comment_line = self.ui.lineEdit_4 - self.wizard_page_userinfo.registerField("email*", self.email) - - self.comment_line = self.ui.lineEdit_4 - self.comment_line.setPlaceholderText("Optional") - - self.back_up_info = self.ui.label_2 - self.back_up_info.hide() - # insert Nitrokey - self.adsettings_button.clicked.connect(self.adsettings_func) - self.collapse(self.adsettings, self.adsettings_button) - self.with_backup.toggled.connect(self.finish_show_hide) - self.confirm_path.textChanged.connect(self.finish_show_hide_2) - # insert Nitrokey - - @pyqtSlot() - def finish_show_hide(self): - if self.with_backup.isChecked(): - self.button(QtWidgets.QWizard.WizardButton.FinishButton).setEnabled(False) - self.lastpage_keygen.cleanupPage() - self.confirm_path.setEnabled(True) - self.back_up_info.show() - else: - self.button(QtWidgets.QWizard.WizardButton.FinishButton).setEnabled(True) - self.lastpage_keygen.cleanupPage() - self.confirm_path.setEnabled(False) - self.back_up_info.hide() - - def finish_show_hide_2(self): - if self.confirm_path.text(): - self.button(QtWidgets.QWizard.WizardButton.FinishButton).setEnabled(True) - - def adsettings_func(self): - self.collapse(self.adsettings, self.adsettings_button) - - def loading(self): - # dialogs - self.ok_insert = self.get_widget(QtWidgets.QPushButton, "pushButton_ok_insert") - # insert Nitrokey - self.ok_insert.clicked.connect(self.ok_insert_btn) - # insert Nitrokey - - @pyqtSlot() - def ok_insert_btn(self): - self.hide() - - self.setup_wizard.show() diff --git a/nitrokeyapp/bak/loading_screen.py b/nitrokeyapp/bak/loading_screen.py deleted file mode 100644 index b6d82771..00000000 --- a/nitrokeyapp/bak/loading_screen.py +++ /dev/null @@ -1,33 +0,0 @@ -from PyQt5 import QtWidgets - - -class LoadingScreen(QtWidgets.QWidget): - # def __init__(self): - # super().__init__() - # self.setFixedSize(128,128) #128 128 - # self.setWindowFlags(Qt.WindowType.WindowStaysOnTopHint | Qt.WindowType.CustomizeWindowHint) - - # self.label_animation = QLabel(self) - # self.qprogressbar = QProgressBar(self) - # self.setGeometry(QRect(650,300,0,0)) - # self.movie = QMovie(":/icons/ProgressWheel.GIF") - # self.label_animation.setMovie(self.movie) - - # timer = QTimer(self) - # self.startAnimation() - # timer.singleShot(1000, self.stopAnimation) - - # self.show() - - def startAnimation(self): - self.movie.start() - - def stopAnimation(self): - # self.movie.stop() - self.close() - # GUI.user_info( - # "success", - # "You now have a main key with the capability\n to sign and certify and a subkey for encryption. ", - # title="Key generation was successful", - # parent=self.label_animation, - # ) diff --git a/nitrokeyapp/bak/passwordsafe.py b/nitrokeyapp/bak/passwordsafe.py deleted file mode 100644 index 6c4c0c22..00000000 --- a/nitrokeyapp/bak/passwordsafe.py +++ /dev/null @@ -1,195 +0,0 @@ -from PyQt5 import QtWidgets -from PyQt5.QtCore import pyqtSlot - -from nitrokeyapp.edit_button_widget import EditButtonsWidget - - -# pws not in use for now (was working for pro/storage) -@pyqtSlot() -def table_pws_function(self): - index = self.table_pws.currentIndex() - item = self.table_pws.item(index.row(), index.column() + 1) - item2 = self.table_pws.item(index.row(), index.column() + 2) - item3 = self.table_pws.item(index.row(), index.column() + 3) - item4 = self.table_pws.item(index.row(), index.column() + 4) - item5 = self.table_pws.item(index.row(), index.column() + 5) - - self.scrollArea.show() - self.information_label.show() - self.pws_editslotname.setText(item.text()) - self.pws_editloginname.setText(item2.text()) - self.pws_editpassword.setText(item3.text()) - self.pws_editOTP.setText(item4.text()) - self.pws_editnotes.setText(item5.text()) - self.PWS_ButtonSaveSlot.setVisible(False) - self.ButtonChangeSlot.setVisible(True) - self.PWS_ButtonDelete.setVisible(True) - # hides the otp creation stuff - self.copy_current_otp.show() - self.qr_code.hide() - self.random_otp.hide() - self.copy_otp.hide() - self.pws_editOTP.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - self.show_hide_btn_2.hide() - - -def add_table_pws(self): - row = self.table_pws.rowCount() - self.table_pws.insertRow(row) - qline = self.pws_editslotname.text() - qline2 = self.pws_editloginname.text() - qline3 = self.pws_editpassword.text() - qline4 = self.pws_editOTP.text() - qline5 = self.pws_editnotes.toPlainText() - res = "{} {} {}".format(qline, "\n", qline2) - - # creates otp on key - - if not self.device.is_auth_admin: - self.ask_pin("admin") - return - - name = qline - if len(name) == 0: - self.user_err("need non-empty name") - return - - idx = row - who = "totp" - # @fixme: what are the secret allowed lengths/chars - # if len(secret) - - ret = self.device.TOTP.write(idx, name, qline4) - if not ret.ok: - self.msg(f"failed writing to {who.upper()} slot #{idx+1} err: {ret.name}") - else: - self.msg(f"wrote {who.upper()} slot #{idx+1}") - self.otp_secret.clear() - self.slot_select_otp(idx) - - self.table_pws.setCellWidget( - row, 0, (EditButtonsWidget(self.table_pws, self.pop_up_copy, res)) - ) - self.table_pws.setItem(row, 1, (QtWidgets.QTableWidgetItem(qline))) - self.table_pws.setItem(row, 2, (QtWidgets.QTableWidgetItem(qline2))) - self.table_pws.setItem(row, 3, (QtWidgets.QTableWidgetItem(qline3))) - self.table_pws.setItem(row, 4, (QtWidgets.QTableWidgetItem(qline4))) - self.table_pws.setItem(row, 5, (QtWidgets.QTableWidgetItem(qline5))) - self.pws_editslotname.setText("") - self.pws_editloginname.setText("") - self.pws_editpassword.setText("") - self.pws_editOTP.setText("") - self.pws_editnotes.setText("") - - -# adds the data existing of the key to the table -def add_table_pws_from_key(self, x): - row = self.table_pws.rowCount() - self.table_pws.insertRow(row) - # self.table_pws.setItem(row , 0, (QtWidgets.QTableWidgetItem("Name"))) - # self.table_pws.setItem(row , 1, (QtWidgets.QTableWidgetItem("Username"))) - - qline = self.device.TOTP.get_name(x) - qline2 = "" - qline3 = "" - qline4 = self.device.TOTP.get_code(x) - qline5 = "" - res = "{} {} {}".format(qline, "\n", qline2) - - self.table_pws.setCellWidget( - row, 0, (EditButtonsWidget(self.table_pws, self.pop_up_copy, res)) - ) - qlines = [qline, qline2, qline3, qline4, qline5] - for i in range(1, len(qlines) + 1): - self.table_pws.setItem(row, i, (QtWidgets.QTableWidgetItem(qlines[i - 1]))) - # self.table_pws.setItem(row , 1, (QtWidgets.QTableWidgetItem(qline))) - # self.table_pws.setItem(row , 2, (QtWidgets.QTableWidgetItem(qline2))) - # self.table_pws.setItem(row , 3, (QtWidgets.QTableWidgetItem(qline3))) - # self.table_pws.setItem(row , 4, (QtWidgets.QTableWidgetItem(qline4))) - # self.table_pws.setItem(row , 5, (QtWidgets.QTableWidgetItem(qline5))) - pws_list = [ - self.pws_editslotname, - self.pws_editloginname, - self.pws_editpassword, - self.pws_editOTP, - self.pws_editnotes, - ] - for i in pws_list: - pws_list.setText("") - # self.pws_editslotname.setText("") - # self.pws_editloginname.setText("") - # self.pws_editpassword.setText("") - # self.pws_editOTP.setText("") - # self.pws_editnotes.setText("") - - -def add_pws(self): - self.scrollArea.show() - self.information_label.show() - self.PWS_ButtonSaveSlot.setVisible(True) - self.ButtonChangeSlot.setVisible(False) - self.PWS_ButtonDelete.setVisible(False) - # self.set_visible(QtWidgets.QFrame, ["groupbox_pw"], True) - # self.set_enabled(QtWidgets.QFrame, ["groupbox_pw"], True) - # self.set_enabled(QtWidgets.QPushButton, ["PWS_ButtonSaveSlot", "PWS_ButtonClose"], True) - pws_list = [ - self.pws_editslotname, - self.pws_editloginname, - self.pws_editpassword, - self.pws_editOTP, - self.pws_editnotes, - ] - for i in pws_list: - pws_list.setText("") - # self.pws_editslotname.setText("") - # self.pws_editloginname.setText("") - # self.pws_editpassword.setText("") - # self.pws_editOTP.setText("") - # self.pws_editnotes.setText("") - # shows the otp creation stuff again - self.copy_current_otp.hide() - self.qr_code.show() - self.random_otp.show() - self.copy_otp.show() - self.pws_editOTP.setEchoMode(QtWidgets.QLineEdit.EchoMode.Normal) - self.show_hide_btn_2.show() - - -def delete_pws(self): - index = self.table_pws.currentIndex() - self.table_pws.removeRow(index.row()) - self.table_pws.setCurrentCell(0, 0) - - -def change_pws(self): - row = (self.table_pws.currentIndex()).row() - self.table_pws.insertRow(row) - - index = self.table_pws.currentIndex() - qline = self.pws_editslotname.text() - qline2 = self.pws_editloginname.text() - qline3 = self.pws_editpassword.text() - qline4 = self.pws_editOTP.text() - qline5 = self.pws_editnotes.toPlainText() - res = "{} {} {}".format(qline, "\n", qline2) - - self.table_pws.setCellWidget( - row, 0, (EditButtonsWidget(self.table_pws, self.pop_up_copy, res)) - ) - self.table_pws.setItem(row, 1, (QtWidgets.QTableWidgetItem(qline))) - self.table_pws.setItem(row, 2, (QtWidgets.QTableWidgetItem(qline2))) - self.table_pws.setItem(row, 3, (QtWidgets.QTableWidgetItem(qline3))) - self.table_pws.setItem(row, 4, (QtWidgets.QTableWidgetItem(qline4))) - self.table_pws.setItem(row, 5, (QtWidgets.QTableWidgetItem(qline5))) - - self.table_pws.removeRow(index.row()) - self.table_pws.setCurrentCell(index.row() - 1, 0) - - -# search function for the table -def filter_the_table(self): - # searchbox - for iterator in range(self.table_pws.rowCount()): - self.table_pws.showRow(iterator) - if self.searchbox.text() not in self.table_pws.item(iterator, 1).text(): - self.table_pws.hideRow(iterator) diff --git a/nitrokeyapp/bak/pin_dialog.py b/nitrokeyapp/bak/pin_dialog.py deleted file mode 100644 index ccb4b916..00000000 --- a/nitrokeyapp/bak/pin_dialog.py +++ /dev/null @@ -1,82 +0,0 @@ -from typing import Any - -from PyQt5 import QtWidgets -from PyQt5.QtCore import Qt, pyqtSlot - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn -from nitrokeyapp.ui.pindialog import Ui_PinDialog - - -# @fixme: PINDialog should be modal! -class PINDialog(QtUtilsMixIn, QtWidgets.QDialog): - def __init__(self, qt_app: QtWidgets.QApplication) -> None: - QtWidgets.QDialog.__init__(self) - QtUtilsMixIn.__init__(self) - self.app = qt_app - self.ui = Ui_PinDialog() - self.ui.setupUi(self) - self.ok_signal, self.tries_left = None, None - - self.opts: dict[str, Any] = {} - - self.checkbox = self.get_widget(QtWidgets.QCheckBox, "checkBox") - self.checkbox.stateChanged.connect(self.checkbox_toggled) - - self.ok_btn = self.get_widget(QtWidgets.QPushButton, "okButton") - self.ok_btn.clicked.connect(self.ok_clicked) - - self.line_edit = self.get_widget(QtWidgets.QLineEdit, "lineEdit") - self.status = self.get_widget(QtWidgets.QLabel, "status") - self.title = self.get_widget(QtWidgets.QLabel, "label") - - self.reset() - - @pyqtSlot() - def reset(self) -> None: - self.status.setText("") - self.title.setText("") - self.ok_signal, self.tries_left = None, None - self.line_edit.setText("") - self.checkbox.setCheckState(Qt.CheckState.Unchecked) - self.opts = {} - self.hide() - - @pyqtSlot(dict) - def invoke(self, opts: dict[str, Any]) -> None: - self.opts = dct = opts - - self.tries_left = dct.get("retries", 0) - who = dct.get("who") - if self.tries_left == 0: - self.user_warn( - f"Please reset the {who} pin counter before continuing", - "No attempts left", - ) - self.reset() - return - - self.status.setText(f"Attempts left: {self.tries_left}") - self.title.setText(dct.get("title", self.title.text())) - self.ok_signal = dct.get("sig") - self.show() - - @pyqtSlot(int) - def checkbox_toggled(self, state: int) -> None: - if state == 0: - self.line_edit.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - elif state == 2: - self.line_edit.setEchoMode(QtWidgets.QLineEdit.EchoMode.Normal) - - @pyqtSlot() - def ok_clicked(self) -> None: - pin = self.line_edit.text() - def_pin = self.opts.get("default", "(?)") - # @fixme: get len-range from libnk.py - if len(pin) < 6 or len(pin) > 20: - self.line_edit.selectAll() - self.user_warn( - "The pin requires to be 6-20 chars in length\n" f"default: {def_pin}", - "Invalid PIN", - ) - else: - self.ok_signal.emit(self.opts, pin) diff --git a/nitrokeyapp/bak/set_pin_dialog.py b/nitrokeyapp/bak/set_pin_dialog.py deleted file mode 100644 index c2ab40b1..00000000 --- a/nitrokeyapp/bak/set_pin_dialog.py +++ /dev/null @@ -1,30 +0,0 @@ -from PyQt5 import QtWidgets - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn -from nitrokeyapp.ui.set_pin_dialog import Ui_ChangePinDialog - - -class SetPinDialog(QtUtilsMixIn, QtWidgets.QDialog): - def __init__(self, parent=None): - QtWidgets.QDialog.__init__(self, parent) - QtUtilsMixIn.__init__(self) - - self.ui = Ui_ChangePinDialog() - self.ui.setupUi(self) - self.new_pin = self.ui.lineEdit_new_pin_set - self.new_pin.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - self.confirm_new_pin = self.ui.lineEdit_confirm_new_pin_set - self.confirm_new_pin.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) - self.btn_ok = self.ui.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok) - self.confirm_new_pin.textChanged.connect(self.same_pin) - self.new_pin.textChanged.connect(self.same_pin) - self.btn_ok.setEnabled(False) - - def same_pin(self): - if ( - self.new_pin.text() != self.confirm_new_pin.text() - or self.new_pin.text() == "" - ): - self.btn_ok.setEnabled(False) - else: - self.btn_ok.setEnabled(True) diff --git a/nitrokeyapp/bak/setup_wizard.py b/nitrokeyapp/bak/setup_wizard.py deleted file mode 100644 index 366da21c..00000000 --- a/nitrokeyapp/bak/setup_wizard.py +++ /dev/null @@ -1,55 +0,0 @@ -from PyQt5 import QtWidgets - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn -from nitrokeyapp.ui.setup_wizard import Ui_PINSetup - - -class SetupWizard(QtUtilsMixIn, QtWidgets.QWizard): - def __init__(self, qt_app: QtWidgets.QApplication): - QtWidgets.QWizard.__init__(self) - QtUtilsMixIn.__init__(self) - self.app = qt_app - self.ui = Ui_PINSetup() - self.ui.setupUi(self) - - self.userpin_page = self.ui.wizardPage - self.userpin_1 = self.ui.lineEdit - self.userpin_2 = self.ui.lineEdit_2 - self.userpin_page.registerField("user_pin_1*", self.userpin_1) - self.userpin_page.registerField("user_pin_2*", self.userpin_2) - - self.adminpin_page = self.ui.wizardPage2 - self.adminpin_1 = self.ui.lineEdit_4 - self.adminpin_2 = self.ui.lineEdit_3 - self.adminpin_page.registerField("admin_pin_1*", self.adminpin_1) - self.adminpin_page.registerField("admin_pin_2*", self.adminpin_2) - - self.userpin_2.textChanged.connect(self.same_setup_wizard) - self.adminpin_2.textChanged.connect(self.same_setup_wizard_2) - - def same_setup_wizard(self): - if self.userpin_1.text() != self.userpin_2.text(): - self.button(QtWidgets.QWizard.WizardButton.NextButton).setEnabled(False) - else: - self.button(QtWidgets.QWizard.WizardButton.NextButton).setEnabled(True) - - def same_setup_wizard_2(self): - if self.adminpin_1.text() != self.adminpin_2.text(): - self.button(QtWidgets.QWizard.WizardButton.FinishButton).setEnabled(False) - else: - self.button(QtWidgets.QWizard.WizardButton.FinishButton).setEnabled(True) - - def closeEvent(self, event): - reply = QtWidgets.QMessageBox.question( - self, - "Message", - "Are you sure to exit?", - QtWidgets.QMessageBox.StandardButton.Yes | QtWidgets.QMessageBox.StandardButton.No, - QtWidgets.QMessageBox.StandardButton.No, - ) - - if reply == QtWidgets.QMessageBox.StandardButton.Yes: - event.accept() - - else: - event.ignore() diff --git a/nitrokeyapp/bak/storage_wizard.py b/nitrokeyapp/bak/storage_wizard.py deleted file mode 100644 index a506765a..00000000 --- a/nitrokeyapp/bak/storage_wizard.py +++ /dev/null @@ -1,86 +0,0 @@ -# Nitrokey 2 -from PyQt5 import QtWidgets -from PyQt5.QtCore import pyqtSlot - -from nitrokeyapp.qt_utils_mix_in import QtUtilsMixIn - - -class Storage(QtUtilsMixIn, QtWidgets.QWizard): - def __init__(self, qt_app: QtWidgets.QApplication): - QtWidgets.QWizard.__init__(self) - QtUtilsMixIn.__init__(self) - self.ok_insert = None - self.app = qt_app - - def init_storage(self): - self.wizardpage_hidden_volume_pw = self.get_widget( - QtWidgets.QWizardPage, "wizardPage" - ) - self.hidden_pw_1 = self.get_widget(QtWidgets.QLineEdit, "HVPasswordEdit") - self.hidden_pw_2 = self.get_widget(QtWidgets.QLineEdit, "HVPasswordEdit_2") - self.wizardpage_hidden_volume_pw.registerField("hidden_pw_1*", self.hidden_pw_1) - self.wizardpage_hidden_volume_pw.registerField("hidden_pw_2*", self.hidden_pw_2) - self.show_hidden_pw = self.get_widget( - QtWidgets.QCheckBox, "ShowPasswordCheckBox" - ) - - self.storage_slider = self.get_widget( - QtWidgets.QSlider, "horizontalSlider_storage" - ) - self.storage_blockspin = self.get_widget( - QtWidgets.QDoubleSpinBox, "StartBlockSpin_3" - ) - - self.radio_gb = self.get_widget(QtWidgets.QRadioButton, "rd_GB_3") - self.radio_mb = self.get_widget(QtWidgets.QRadioButton, "rd_MB_3") - - self.confirm_creation = self.get_widget(QtWidgets.QCheckBox, "checkBox_confirm") - - self.lastpage = self.get_widget(QtWidgets.QWizardPage, "wizardPage_3") - - self.lastpage.registerField("confirm_creation*", self.confirm_creation) - - self.storage_blockspin.valueChanged.connect(self.change_value_2) - self.storage_slider.valueChanged.connect(self.change_value) - - self.radio_gb.toggled.connect(self.swap_to_gb) - self.radio_mb.toggled.connect(self.swap_to_mb) - self.hidden_pw_2.textChanged.connect(self.same_storage) - - def same_storage(self): - if self.hidden_pw_2.text() != self.hidden_pw_1.text(): - self.button(QtWidgets.QWizard.WizardButton.NextButton).setEnabled(False) - else: - self.button(QtWidgets.QWizard.WizardButton.NextButton).setEnabled(True) - - @pyqtSlot(int) - # storage wizard - def change_value(self, value): - self.storage_blockspin.setValue(float(value)) - - def change_value_2(self, value): - self.storage_slider.setValue(float(value)) - - @pyqtSlot() - def swap_to_mb(self): - if self.radio_mb.isChecked(): - self.storage_blockspin.setMaximum(30000) - self.storage_slider.setMaximum(30000) - self.storage_blockspin.setValue( - float(self.storage_blockspin.value()) * 1000 - ) - self.storage_slider.setValue(float(self.storage_blockspin.value())) - self.storage_slider.setSingleStep(300) - self.storage_blockspin.setSingleStep(300) - - def swap_to_gb(self): - if self.radio_gb.isChecked(): - self.storage_blockspin.setValue( - float(self.storage_blockspin.value()) / 1000 - ) - self.storage_slider.setValue(float(self.storage_blockspin.value())) - - self.storage_blockspin.setMaximum(30) - self.storage_slider.setMaximum(30) - self.storage_slider.setSingleStep(1) - self.storage_blockspin.setSingleStep(1) diff --git a/nitrokeyapp/bak/ui/change_pin_dialog.ui b/nitrokeyapp/bak/ui/change_pin_dialog.ui deleted file mode 100644 index a20eef32..00000000 --- a/nitrokeyapp/bak/ui/change_pin_dialog.ui +++ /dev/null @@ -1,111 +0,0 @@ - - - ChangePinDialog - - - Qt::WindowModal - - - - 0 - 0 - 388 - 211 - - - - - 0 - 0 - - - - Dialog - - - - - - - - - - Current PIN: - - - - - - - - - - New PIN: - - - - - - - - - - Confirm New PIN: - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - ChangePinDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ChangePinDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/nitrokeyapp/bak/ui/insert_Nitrokey.ui b/nitrokeyapp/bak/ui/insert_Nitrokey.ui deleted file mode 100644 index ab77583b..00000000 --- a/nitrokeyapp/bak/ui/insert_Nitrokey.ui +++ /dev/null @@ -1,40 +0,0 @@ - - - Insert_Nitrokey - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - - - 23 - - - - Please insert your Nitrokey - - - - - - - Ok - - - - - - - - diff --git a/nitrokeyapp/bak/ui/key_generation.ui b/nitrokeyapp/bak/ui/key_generation.ui deleted file mode 100644 index 45639cf1..00000000 --- a/nitrokeyapp/bak/ui/key_generation.ui +++ /dev/null @@ -1,379 +0,0 @@ - - - Key_generation - - - - 0 - 0 - 418 - 326 - - - - Wizard - - - QWizard::ClassicStyle - - - - - - - - 75 - true - - - - User Information - - - - - - - Qt::Horizontal - - - - - - - The following instructions guide through the generation -of OpenPGP keys directly on the Nitrokey. - - Please provide the needed information. - - - - - - - - 75 - true - - - - User ID - - - - - - Real name: - - - - - - - - - - Email address: - - - - - - - - - - Comment: - - - - - - - - - - - - - - - - - Here they can determine the expiration date. -In "Advanced Settings", the key type and size - can be changed. - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 0 - 0 - - - - Expires in: - - - - - - - - 0 - 0 - - - - - never - - - - - 1 year - - - - - 2 years - - - - - 5 years - - - - - - - - - - - - 75 - true - - - - Key Settings - - - - - - - QPushButton { -Text-align:left; -} - - - Advanced Settings - - - - images/new/down_arrow.pngimages/new/down_arrow.png - - - true - - - - - - - - 0 - 0 - - - - - 75 - true - - - - - - - - 0 - 0 - - - - - RSA and RSA (default) - - - - - DSA - - - - - ECC - - - - - - - - Key size: - - - - - - - - 0 - 0 - - - - - 1024 Bits - - - - - 2048 Bits - - - - - 4096 Bits - - - - - - - - - 0 - 0 - - - - Key type: - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - 75 - true - - - - Backup - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 0 - 100 - - - - - 75 - true - - - - - - - with Backup: - - - - - - - - - - - - - - without Backup - - - true - - - - - - - - - - We recommend that you only create a backup, -if you are sure that you can keep it very secure. -It is best practice to never have this key on a -regular computer which has connection to the -internet, so that the key never gets compromised. - - - - - - - - - diff --git a/nitrokeyapp/bak/ui/keys_tab.ui b/nitrokeyapp/bak/ui/keys_tab.ui deleted file mode 100644 index 38d6f538..00000000 --- a/nitrokeyapp/bak/ui/keys_tab.ui +++ /dev/null @@ -1,195 +0,0 @@ - - - KeysTab - - - - 0 - 0 - 544 - 260 - - - - - - - - - 0 - - - - 1. Key Identity - - - - - - Import Keys - - - - - - - - 0 - 0 - - - - - 16777215 - 200 - - - - Main Key - - - - - - sec - - - - - - - rsa1024/0EFFB0704391497C - - - - - - - created: - - - - - - - 2021-07-29 - - - - - - - expires: - - - - - - - never - - - - - - - usage: SC - - - - - - - - - - Create Main Key - - - - - - - - 16777215 - 200 - - - - Subkey for Encryption - - - - - - created: - - - - - - - sec - - - - - - - never - - - - - - - expires: - - - - - - - rsa1024/AWFFB0704391458D - - - - - - - 2021-07-29 - - - - - - - usage: E - - - - - - - - - - - 2. Key Identity - - - - - - 3. Key Identity - - - - - - - - - - - diff --git a/nitrokeyapp/bak/ui/password_safe_tab.ui b/nitrokeyapp/bak/ui/password_safe_tab.ui deleted file mode 100644 index 9f7fa2b0..00000000 --- a/nitrokeyapp/bak/ui/password_safe_tab.ui +++ /dev/null @@ -1,1422 +0,0 @@ - - - tab_3 - - - - 0 - 0 - 931 - 645 - - - - - - - - 0 - 0 - - - - - 0 - 100 - - - - - 16777215 - 25 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Unlock Password Safe - - - - :/icons/icon_safe.svg:/icons/icon_safe.svg - - - - - - - - 200 - 16777215 - - - - Cancel - - - - - - - - 200 - 16777215 - - - - Save - - - true - - - true - - - - - - - Change - - - - - - - - 80 - 16777215 - - - - Delete - - - true - - - - - - - Lock Device - - - - - - - - 0 - 0 - - - - 42 - - - - - - - - - - - 0 - 0 - - - - - 250 - 450 - - - - - 240 - 350 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - 0 - 0 - - - - - 200 - 0 - - - - - 300 - 600 - - - - QScrollBar:vertical { - border: none; - background: rgb(52, 59, 72); - width: 14px; - margin: 21px 0 21px 0; - border-radius: 0px; -} - - - Qt::ScrollBarAlwaysOff - - - QAbstractItemView::AnyKeyPressed|QAbstractItemView::EditKeyPressed - - - false - - - false - - - 0 - - - false - - - 57 - - - 250 - - - false - - - 70 - - - - - - - - - 0 - 0 - 0 - - - - - - - Name - - - - - Username - - - - - Passwort - - - - - OTP - - - - - Notizen - - - - - - - - - 0 - 0 - - - - - 270 - 16777215 - - - - Add - - - true - - - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Information - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - 0 - 500 - - - - - 750 - 500 - - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOff - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - 0 - 0 - 721 - 1124 - - - - - - - - 0 - 0 - - - - - 703 - 0 - - - - - 703 - 16777215 - - - - - 14 - - - - QPushButton { -Text-align:left; -} - - - Password - - - - - - - - 0 - 0 - - - - - 700 - 300 - - - - - 703 - 16777215 - - - - - 9 - - - - - Hide - - - true - - - - - - - QR-Code - - - - - - - Name - - - - - - - - 0 - 0 - - - - Copy - - - false - - - - - - - Random - - - - - - - Password: - - - - - - - Secret (for OTP) - - - - - - - Username - - - - - - - - 0 - 0 - - - - Copy - - - false - - - - - - - Login name: - - - - - - - Password - - - - - - - Hide - - - true - - - - - - - Slot name: - - - - - - - - 0 - 0 - - - - - - - Copy - - - false - - - - - - - - 0 - 0 - - - - Copy - - - false - - - - - - - - - - Random - - - - - - - OTP - - - - - - - - - - - 0 - 0 - - - - - 703 - 0 - - - - - 703 - 16777215 - - - - - 14 - - - - QPushButton { -Text-align:left; -} - - - Secret - - - - ../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png - - - true - - - - - - - - 0 - 0 - - - - - 600 - 250 - - - - - 700 - 16777215 - - - - false - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - - - Example: "ZR3M5I..." - - - Secret input format: base32 - - - Base32 - - - true - - - true - - - - - - - Example: "A3911C05..." (remove any 0x prefix) - - - Secret input format: hex - - - Hex - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 11 - - - - Entered OTP 'Secret Key' string is longer than supported by this device - - - Label shown when the OTP secret key is too long - - - <html><head/><body><p><span style=" font-size:10pt; font-weight:600; color:#a40000;">Entered OTP 'Secret Key' string is longer than supported by this device</span></p></body></html> - - - - - - - - - <html><head/><body><p>The secret is provided by your service provider you may want to login or can be configured in your local application which you may want to login to.</p></body></html> - - - Secret Key: - - - - - - - - - The secret is provided by your service provider you may want to login or can be configured in your local application which you may want to login to. - - - OTP secret key - - - Note: 2nd factors aren't protected against physical attacks. Change all OTP secrets in case you loose the Nitrokey. - - - - - - - - - 200 - - - QLineEdit::PasswordEchoOnEdit - - - ******************************** - - - false - - - - - - - - 9 - 75 - true - true - - - - Secret copied to clipboard - - - - - - - - - false - - - <html><head/><body><p>Hide or show the secret.</p></body></html> - - - Hide secret - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Input format: - - - - - - - - - - - 24 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Cancel - - - - - - - Save - - - - - - - - - - - - - 0 - 0 - - - - - 703 - 0 - - - - - 703 - 16777215 - - - - - 14 - - - - QPushButton { -Text-align:left; -} - - - Notes - - - - ../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png - - - true - - - - - - - - 0 - 0 - - - - - 700 - 0 - - - - - 700 - 150 - - - - false - - - - QLayout::SetDefaultConstraint - - - - - false - - - - - - - - - - - 0 - 0 - - - - - 703 - 0 - - - - - 703 - 16777215 - - - - - 14 - - - - QPushButton { -Text-align:left; -} - - - OTP Parameter - - - - ../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png../../../../../../../nitrokey-app2/nitrokeyapp/ui/icons/down_arrow.png - - - true - - - - - - - - 0 - 0 - - - - - 0 - 240 - - - - - 700 - 200 - - - - false - - - - - - - - Select slot type: TOTP - - - (Recommendation: Use TOTP for web applications and HOTP for local applications) - - - TOTP - - - true - - - - - - - Select slot type: HOTP - - - (Recommendation: Use TOTP for web applications and HOTP for local applications) - - - HOTP - - - - - - - - 11 - true - - - - (Recommendation: Use TOTP for web applications and HOTP for local applications) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 0 - 0 - - - - - 0 - 80 - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - HOTP length: - - - - - - - - - OTP code length: 6 digits - - - 6 digits - - - true - - - - - - - OTP code length: 8 digits - - - 8 digits - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Moving factor seed: - - - - - - - - - - - HOTP moving factor seed - - - - - - 00000000000000000000 - - - 20 - - - - - - - Set HOTP counter to zero - - - Set to zero - - - - - - - Set HOTP counter to random value - - - Set to random - - - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - - - - 0 - 0 - - - - QFrame::NoFrame - - - QFrame::Plain - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 9 - - - 9 - - - 9 - - - 9 - - - - - TOTP interval: - - - - - - - - - TOTP interval value - - - 1 - - - 65536 - - - 30 - - - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - - - - TOTP length: - - - - - - - - - OTP code length: 6 digits - - - 6 digits - - - true - - - - - - - OTP code length: 8 digits - - - 8 digits - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - Generated secret target length (bytes): - - - - - - - TOTP interval value - - - 10 - - - 40 - - - 40 - - - - - - - - - - - - - - - - QFrame::Box - - - QFrame::Raised - - - 2 - - - 2 - - - - - - Qt::AlignCenter - - - - - - - - diff --git a/nitrokeyapp/bak/ui/pindialog.ui b/nitrokeyapp/bak/ui/pindialog.ui deleted file mode 100644 index c07cf0ec..00000000 --- a/nitrokeyapp/bak/ui/pindialog.ui +++ /dev/null @@ -1,213 +0,0 @@ - - - PinDialog - - - - 0 - 0 - 358 - 155 - - - - - 0 - 0 - - - - Password dialog - - - - :/icons/icon_NK.svg:/icons/icon_NK.svg - - - - - - - 0 - 0 - - - - false - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - - 0 - 0 - - - - Enter card password: - - - - - - - Enter card PIN - - - 39 - - - QLineEdit::Password - - - - - - - - - - 0 - 0 - - - - Show password - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - - - - - - Qt::StrongFocus - - - TextLabel - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::TabFocus - - - &Cancel - - - false - - - false - - - - - - - Qt::TabFocus - - - &OK - - - true - - - true - - - - - - - - - lineEdit - checkBox - - - - - - - cancelButton - clicked() - PinDialog - reject() - - - 214 - 142 - - - 178 - 82 - - - - - diff --git a/nitrokeyapp/bak/ui/set_pin_dialog.ui b/nitrokeyapp/bak/ui/set_pin_dialog.ui deleted file mode 100644 index eff7a038..00000000 --- a/nitrokeyapp/bak/ui/set_pin_dialog.ui +++ /dev/null @@ -1,101 +0,0 @@ - - - ChangePinDialog - - - Qt::WindowModal - - - - 0 - 0 - 388 - 211 - - - - - 0 - 0 - - - - Dialog - - - - - - - - - - - - - New PIN: - - - - - - - - - - Confirm New PIN: - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - ChangePinDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - ChangePinDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/nitrokeyapp/bak/ui/settings_tab.ui b/nitrokeyapp/bak/ui/settings_tab.ui deleted file mode 100644 index c23c93d5..00000000 --- a/nitrokeyapp/bak/ui/settings_tab.ui +++ /dev/null @@ -1,423 +0,0 @@ - - - SettingsTab - - - - 0 - 0 - 930 - 720 - - - - - - - - 12 - - - - 0 - - - - General - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - General - - - - - - - - Show first-run message - - - - - - - Show main window on start - - - - - - - - - - - Do not quit when the main window is closed - - - true - - - - - - - Hide main window when device disconnects - - - true - - - - - - - - - Show main window when device connects - - - true - - - - - - - Show warning when no partitions could be detected on Encrypted Volume (Linux only) - - - true - - - - - - - Show message about device's connection / disconnection - - - true - - - - - - - - - <html><head/><body><p>Translation file (needs restart)</p></body></html> - - - - - - - Translation file (needs restart) - - - - - - - - - - - - Clipboard settings - - - - - - Time to store OTP secrets in clipboard (in seconds): - - - 10 - - - 600 - - - 120 - - - - - - - Time to store Password Safe secrets in clipboard (in seconds): - - - - - - - TIme to store Password Safe secrets in clipboard (in seconds): - - - 10 - - - 600 - - - 60 - - - - - - - Time to store OTP secrets in clipboard (in seconds): - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - false - - - OTP Password settings - - - - - - - 11 - 75 - true - - - - - - - - - - - - - Protect OTP by user PIN (will be requested on first use each session) - - - - - - - Forget user PIN after 10 minutes (if unchecked user PIN will remain in memory until application exits) - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 70 - - - - - - - - - - Save - - - - - - - Cancel - - - - - - - - - - 870 - 0 - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 10 - - - - - - - - - Device - - - - - - PushButton - - - - - - - - Debug - - - - - - Debug log settings - - - - - - Path for debug log file: - - - - - - - Verbosity level: - - - 6 - - - 2 - - - - - - - Path for debug log file: - - - edit_debug_file_path - - - - - - - Verbosity level: - - - spin_debug_verbosity - - - - - - - - - - Logging enabled - - - - - - - Log to console - - - - - - - Select path - - - - - - - - - - Send Problem - - - - - - - - Firmware - - - - - - - - - diff --git a/nitrokeyapp/bak/ui/setup_wizard.ui b/nitrokeyapp/bak/ui/setup_wizard.ui deleted file mode 100644 index ef8c984b..00000000 --- a/nitrokeyapp/bak/ui/setup_wizard.ui +++ /dev/null @@ -1,253 +0,0 @@ - - - PINSetup - - - - 0 - 0 - 439 - 309 - - - - Wizard - - - - - - - This Guided Setup Wizard leads you through the process of setting up your PIN's, which are essential to use your Nitrokey device. - - - false - - - true - - - - - - - - 75 - true - - - - Nitrokey Setup - - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 150 - - - - - - - - - true - - - - Your PINs can also be changed later again. - - - true - - - - - - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - - - - - - - - 75 - true - - - - User PIN Setup - - - - - - - new User PIN: - - - - - - - confirm new User PIN: - - - - - - - - true - - - - The Nitrokey is protected by a User PIN, -only 3 entries are possible until the device is locked. -Choose a User PIN between 6-20 characters. - - - - - - - - Qt::Vertical - - - - 20 - 10 - - - - - - - - - - - - confirm new Admin PIN: - - - - - - - Qt::Vertical - - - - 20 - 28 - - - - - - - - Qt::Horizontal - - - - - - - - - - new Admin PIN: - - - - - - - - 75 - true - - - - Admin PIN Setup - - - - - - - - true - - - - To unlock a blocked Nitrokey, you need an Admin PIN. -choose a PIN between 6-20 characters. - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - diff --git a/nitrokeyapp/bak/ui/storage.ui b/nitrokeyapp/bak/ui/storage.ui deleted file mode 100644 index af0ebaf3..00000000 --- a/nitrokeyapp/bak/ui/storage.ui +++ /dev/null @@ -1,680 +0,0 @@ - - - CreateHiddenVolume - - - - 0 - 0 - 560 - 456 - - - - Wizard - - - QWizard::ClassicStyle - - - - - - - - 75 - true - - - - Information - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 0 - 0 - - - - - 66 - 58 - - - - - 66 - 58 - - - - - 66 - 58 - - - - - - - images/new/icon_warning.svg - - - true - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - <html><head/><body><p><span style=" font-weight:600;">You should understand the properties of hidden volume before proceeding. It can destroy your encrypted data! </span></p></body></html> - - - false - - - true - - - true - - - - - - - - - - Hidden Volume Conditions - - - - - - 1. If you decide to configure hidden volume, you can not use the - encrypted storage anymore. -2. This process may damage your existing encrypted volume data. - - - - - - - - 0 - 0 - - - - - 500 - 50 - - - - - 100 - 150 - - - - - - - images/HiddenVolumes_0.png - - - true - - - - - - - - - - - - - - - 75 - true - - - - Password - - - - - - - You must set a password to open the hidden volume in the future. - - - - - - - - 100 - 0 - - - - - 100 - 0 - - - - Qt::Horizontal - - - - - - - Password settings - - - - - - Password: - - - - - - - Hidden volume password - - - Please use shift+tab key shortcut for instructions - - - - - - 20 - - - QLineEdit::Password - - - - - - - confirm Password: - - - - - - - Qt::StrongFocus - - - Hidden volume password (repeated) - - - - - - 20 - - - QLineEdit::Password - - - - - - - Show password - - - - - - - - - Password strength: - - - - - - - Password strength: - - - 42 - - - - - - - - - false - - - Qt::NoFocus - - - length - - - - - - - false - - - Qt::NoFocus - - - lower case - - - - - - - false - - - Qt::NoFocus - - - upper case - - - true - - - - - - - false - - - Qt::NoFocus - - - numbers - - - - - - - false - - - Qt::NoFocus - - - symbols - - - - - - - - - - - - - - - - - - - 75 - true - - - - Hidden Volume Settings - - - - - - - Here you can define the size of the hidden volume. - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 100 - 101 - - - - Hidden Volume Size - - - false - - - - - - - 0 - 0 - - - - Min - - - - - - - - 0 - 0 - - - - Qt::ImhNone - - - 30 - - - 1 - - - 15 - - - 15 - - - false - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 1 - - - - - - - - - Hidden Volume Size: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 0 - - - 30.000000000000000 - - - 15.000000000000000 - - - - - - - Unit: - - - - - - - Use this as hidden volume size unit - - - MB - - - - - - - Use this as hidden volume size unit - - - GB - - - true - - - - - - - - - - 0 - 0 - - - - Max - - - - - - - - - - - - - - - 75 - true - - - - Confirmation - - - - - - - Are you sure to create hidden volume on your Nitrokey Storage? - - - - - - - Qt::Horizontal - - - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 0 - 0 - - - - - 66 - 58 - - - - - 66 - 58 - - - - - 66 - 58 - - - - - - - images/new/icon_warning.svg - - - true - - - - - - - - 75 - true - - - - - - - Note: once you have created the hidden volume, - -you should not use the encrypted volume again, - -as you may damage data in the process! - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - Are you sure you want to set up the hidden volume? - - - - - - - Create Hidden Volume - - - - - - - - -