diff --git a/src/ui/dialogs/settings.py b/src/ui/dialogs/settings.py index e6ab045..efb25ac 100644 --- a/src/ui/dialogs/settings.py +++ b/src/ui/dialogs/settings.py @@ -1,20 +1,14 @@ from omegaconf import OmegaConf from PyQt6 import QtCore, QtGui, QtWidgets -from .dialog_sources.Ui_settings import Ui_Dialog as _settings +from .dialog_sources.settings_ui import Ui_Dialog as _settings config = OmegaConf.load("config.yaml") -_style = "" -_style_editable = "{text}" -_italic = " font-style:italic;" -_bold = " font-weight:700;" -_underscore = " text-decoration: underline;" -_text_start = "" -_text_end = "" + class Settings(QtWidgets.QDialog, _settings): - def __init__(self): + def __init__(self,user): super().__init__() self.setupUi(self) self.password.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password) @@ -28,6 +22,10 @@ class Settings(QtWidgets.QDialog, _settings): self.font_size.setCurrentText("9") # add button to toggle password visibility + if user == "admin": + self.debug.show() + else: + self.debug.hide() self.showPassword = True self.togglePassword.clicked.connect(self.toggle_password) self.tb_select_db.clicked.connect(self.select_db)