src/eric7/WebBrowser/WebBrowserWebAuthDialog.py

branch
eric7
changeset 10851
5c47172bb240
parent 10847
b3f04b83fc84
--- a/src/eric7/WebBrowser/WebBrowserWebAuthDialog.py	Tue Jul 16 16:08:50 2024 +0200
+++ b/src/eric7/WebBrowser/WebBrowserWebAuthDialog.py	Tue Jul 16 19:47:54 2024 +0200
@@ -43,6 +43,8 @@
 
         self.__uxRequest = uxRequest
 
+        self.pinButton.setIcon(EricPixmapCache.getIcon("showPassword"))
+
         self.selectAccountButtonGroup = QButtonGroup(self)
         self.selectAccountButtonGroup.setExclusive(True)
 
@@ -115,7 +117,6 @@
         """
         Private slot to accept the WebAuth request.
         """
-        # TODO: not implemented yet
         requestState = self.__uxRequest.state()
         if requestState == QWebEngineWebAuthUxRequest.WebAuthUxState.SelectAccount:
             checkedButton = self.selectAccountButtonGroup.checkedButton()
@@ -129,7 +130,6 @@
         """
         Private slot to cancel the WebAuth request.
         """
-        # TODO: not implemented yet
         self.__uxRequest.cancel()
 
     @pyqtSlot()
@@ -137,7 +137,6 @@
         """
         Private slot to retry the WebAuth request.
         """
-        # TODO: not implemented yet
         self.__uxRequest.retry()
 
     @pyqtSlot()
@@ -156,7 +155,7 @@
         ):
             self.__setupFinishCollectTokenUi()
         elif requestState == QWebEngineWebAuthUxRequest.WebAuthUxState.RequestFailed:
-            self.__setupErrorUi
+            self.__setupErrorUi()
 
         self.adjustSize()
 
@@ -164,7 +163,6 @@
         """
         Private method to configure the 'Select Account' UI.
         """
-        # TODO: not implemented yet
         self.__clearSelectAccountButtons()
 
         self.headerLabel.setText(self.tr("<b>Choose Passkey</b>"))
@@ -195,12 +193,11 @@
         """
         Private method to configure the 'Collect PIN' UI.
         """
-        # TODO: not implemented yet
         self.__clearSelectAccountButtons()
 
         self.selectAccountArea.setVisible(False)
 
-        self.pinGroupBox.setVisible(False)
+        self.pinGroupBox.setVisible(True)
         self.confirmPinLabel.setVisible(False)
         self.confirmPinEdit.setVisible(False)
         self.confirmPinErrorLabel.setVisible(False)
@@ -262,10 +259,13 @@
         """
         Private method to configure the 'Finish Collect Token' UI.
         """
-        # TODO: not implemented yet
         self.__clearSelectAccountButtons()
 
-        self.headerLabel.setText(self.tr("<b>Use your security key with {0}</b>"))
+        self.headerLabel.setText(
+            self.tr("<b>Use your security key with {0}</b>").format(
+                self.__uxRequest.relyingPartyId()
+            )
+        )
         self.descriptionLabel.setText(
             self.tr("Touch your security key to complete the request.")
         )
@@ -281,7 +281,6 @@
         """
         Private method to configure the 'Error' UI.
         """
-        # TODO: not implemented yet
         self.__clearSelectAccountButtons()
 
         errorMsg = ""
@@ -336,7 +335,7 @@
             requestFailureReason
             == QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingResidentKeys  # noqa: E501
         ):
-            errorMsg = self.tr("Security key doesn't have resident key support.")
+            errorMsg = self.tr("Security key does not have resident key support.")
         elif (
             requestFailureReason
             == QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingUserVerification  # noqa: E501
@@ -366,7 +365,7 @@
             requestFailureReason
             == QWebEngineWebAuthUxRequest.RequestFailureReason.WinUserCancelled
         ):
-            errorMsg = self.tr("User cancelled the WebAuth request.")
+            errorMsg = self.tr("User canceled the WebAuth request.")
 
         self.headerLabel.setText(self.tr("<b>Something went wrong</b>"))
         self.descriptionLabel.setText(errorMsg)

eric ide

mercurial