diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-08-24 16:48:29 +0300 |
---|---|---|
committer | Fabian Müller <fmueller@owncloud.com> | 2022-08-24 16:48:29 +0300 |
commit | 9f0a51a44485dc57b0992b0f5d8ee2e58e1cc3d4 (patch) | |
tree | dc51265165c880bc713e8a83ab21a7267e1f5a49 | |
parent | e678300bcc3f8775e8b431298ad9a0903fd33c24 (diff) |
Remove app password hintswork/remove-app-password-links
-rw-r--r-- | src/gui/creds/httpcredentialsgui.cpp | 1 | ||||
-rw-r--r-- | src/gui/loginrequireddialog/basicloginwidget.cpp | 6 | ||||
-rw-r--r-- | src/gui/loginrequireddialog/basicloginwidget.h | 7 | ||||
-rw-r--r-- | src/gui/loginrequireddialog/basicloginwidget.ui | 135 | ||||
-rw-r--r-- | src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp | 2 | ||||
-rw-r--r-- | src/resources/wizard/style.qss | 1 |
6 files changed, 59 insertions, 93 deletions
diff --git a/src/gui/creds/httpcredentialsgui.cpp b/src/gui/creds/httpcredentialsgui.cpp index 707725977..bd33f0405 100644 --- a/src/gui/creds/httpcredentialsgui.cpp +++ b/src/gui/creds/httpcredentialsgui.cpp @@ -114,7 +114,6 @@ void HttpCredentialsGui::asyncAuthResult(OAuth::Result r, const QString &user, void HttpCredentialsGui::showDialog() { auto *contentWidget = new BasicLoginWidget(); - contentWidget->setServerUrl(_account->url()); contentWidget->forceUsername(_account->davUser()); auto *dialog = new LoginRequiredDialog(contentWidget, ocApp()->gui()->settingsDialog()); diff --git a/src/gui/loginrequireddialog/basicloginwidget.cpp b/src/gui/loginrequireddialog/basicloginwidget.cpp index 8831184e5..9d4c9a126 100644 --- a/src/gui/loginrequireddialog/basicloginwidget.cpp +++ b/src/gui/loginrequireddialog/basicloginwidget.cpp @@ -51,12 +51,6 @@ BasicLoginWidget::~BasicLoginWidget() delete _ui; } -void BasicLoginWidget::setServerUrl(const QUrl &serverUrl, const QString &linkStyle) -{ - const QString appPasswordUrl = QStringLiteral("%1/settings/personal?sectionid=security#apppasswords").arg(serverUrl.toString()); - _ui->appPasswordLabel->setText(tr("Click <a style='%1' href='%2'>here</a> to request an app password on the server.").arg(linkStyle, appPasswordUrl)); -} - void BasicLoginWidget::forceUsername(const QString &username) { _ui->usernameLineEdit->setText(username); diff --git a/src/gui/loginrequireddialog/basicloginwidget.h b/src/gui/loginrequireddialog/basicloginwidget.h index d1707d189..48de9244a 100644 --- a/src/gui/loginrequireddialog/basicloginwidget.h +++ b/src/gui/loginrequireddialog/basicloginwidget.h @@ -41,13 +41,6 @@ public: ~BasicLoginWidget() override; /** - * Update a label's text to provide a link directly to app password configuration on the web interface. - * @param serverUrl URL to ownCloud server instance - * @param linkStyle custom style to set on the app password link (needed for the setup wizard) - */ - void setServerUrl(const QUrl &serverUrl, const QString &linkStyle = QString()); - - /** * Enter provided username into line edit and lock it from user interaction. * For use primarily with WebFinger. * @param username username to use diff --git a/src/gui/loginrequireddialog/basicloginwidget.ui b/src/gui/loginrequireddialog/basicloginwidget.ui index c526be4d7..c4137de37 100644 --- a/src/gui/loginrequireddialog/basicloginwidget.ui +++ b/src/gui/loginrequireddialog/basicloginwidget.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>353</width> - <height>93</height> + <width>328</width> + <height>75</height> </rect> </property> <property name="sizePolicy"> @@ -19,7 +19,7 @@ <property name="windowTitle"> <string>BasicLoginWidget</string> </property> - <layout class="QVBoxLayout" name="verticalLayout"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="leftMargin"> <number>0</number> </property> @@ -33,95 +33,78 @@ <number>0</number> </property> <item> - <widget class="QLabel" name="appPasswordLabel"> - <property name="text"> - <string notr="true">appPasswordLabel [placeholder]</string> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> + </spacer> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,1"> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <layout class="QFormLayout" name="formLayout_2"> + <item row="1" column="0"> + <widget class="QLabel" name="usernameLabel"> + <property name="text"> + <string>Username</string> </property> - <property name="sizeHint" stdset="0"> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="usernameLineEdit"> + <property name="minimumSize"> <size> - <width>20</width> - <height>20</height> + <width>150</width> + <height>0</height> </size> </property> - </spacer> - </item> - <item> - <layout class="QFormLayout" name="formLayout_2"> - <item row="1" column="1"> - <widget class="QLineEdit" name="usernameLineEdit"> - <property name="minimumSize"> - <size> - <width>150</width> - <height>0</height> - </size> - </property> - <property name="placeholderText"> - <string>Username</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="passwordLineEdit"> - <property name="minimumSize"> - <size> - <width>150</width> - <height>0</height> - </size> - </property> - <property name="echoMode"> - <enum>QLineEdit::Password</enum> - </property> - <property name="placeholderText"> - <string>Password</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="passwordLabel"> - <property name="text"> - <string>Password</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="usernameLabel"> - <property name="text"> - <string>Username</string> - </property> - </widget> - </item> - </layout> + <property name="placeholderText"> + <string>Username</string> + </property> + </widget> </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <item row="2" column="0"> + <widget class="QLabel" name="passwordLabel"> + <property name="text"> + <string>Password</string> </property> - <property name="sizeHint" stdset="0"> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="passwordLineEdit"> + <property name="minimumSize"> <size> - <width>20</width> - <height>20</height> + <width>150</width> + <height>0</height> </size> </property> - </spacer> + <property name="echoMode"> + <enum>QLineEdit::Password</enum> + </property> + <property name="placeholderText"> + <string>Password</string> + </property> + </widget> </item> </layout> </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </widget> <resources/> diff --git a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp index f87a868ea..44098f7aa 100644 --- a/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp +++ b/src/gui/newwizard/pages/basiccredentialssetupwizardpage.cpp @@ -29,8 +29,6 @@ BasicCredentialsSetupWizardPage::BasicCredentialsSetupWizardPage(const QUrl &ser // bring the correct widget to the front _ui->contentWidget->setCurrentWidget(_ui->basicLoginWidget); - _ui->basicLoginWidget->setServerUrl(serverUrl, QStringLiteral("color: %1").arg(Theme::instance()->wizardHeaderTitleColor().name())); - const QString linkColor = Theme::instance()->wizardHeaderTitleColor().name(); _ui->urlLabel->setText(tr("Connecting to <a href='%1' style='color: %2;'>%1</a>").arg(serverUrl.toString(), linkColor)); diff --git a/src/resources/wizard/style.qss b/src/resources/wizard/style.qss index 492610aa8..62e79e041 100644 --- a/src/resources/wizard/style.qss +++ b/src/resources/wizard/style.qss @@ -30,7 +30,6 @@ #contentWidget #urlLabel, #contentWidget #usernameLabel, #contentWidget #passwordLabel, -#contentWidget #appPasswordLabel, #contentWidget #topLabel, #contentWidget #usernameLabel, #contentWidget #passwordLabel, |