Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-10-13 16:23:56 +0300
committerGitHub <noreply@github.com>2020-10-13 16:23:56 +0300
commit38f48435828c948d449dd19615722f65063b0855 (patch)
treea6bbe246217630dad3548a6b4f412dc51766338a
parentd0a9d21de83119592cfca74d8b8cc6abb395a6f4 (diff)
parentca57221b7423f8b2192dccb0b860136bc7a2ccd7 (diff)
Merge pull request #2534 from nextcloud/connection_wizard_improvements
Connection wizard improvements
-rw-r--r--src/gui/wizard/owncloudsetupnocredspage.ui26
-rw-r--r--src/gui/wizard/owncloudsetuppage.cpp26
2 files changed, 38 insertions, 14 deletions
diff --git a/src/gui/wizard/owncloudsetupnocredspage.ui b/src/gui/wizard/owncloudsetupnocredspage.ui
index 1644d93f9..d3e62595e 100644
--- a/src/gui/wizard/owncloudsetupnocredspage.ui
+++ b/src/gui/wizard/owncloudsetupnocredspage.ui
@@ -221,11 +221,17 @@
<item>
<widget class="QLabel" name="urlLabel">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
<property name="text">
<string/>
</property>
@@ -234,6 +240,16 @@
</layout>
</item>
<item>
+ <widget class="QLabel" name="addressDescriptionLabel">
+ <property name="text">
+ <string>This is the link to your %1 web interface when you open it in the browser.&lt;br/&gt;It looks like https://cloud.example.com or https://example.com/cloud</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QLabel" name="errorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@@ -340,7 +356,7 @@
<bool>false</bool>
</property>
<property name="text">
- <string>Register with a provider</string>
+ <string>Sign up with a provider</string>
</property>
<property name="default">
<bool>false</bool>
@@ -362,7 +378,7 @@
</size>
</property>
<property name="text">
- <string>Log in</string>
+ <string>Log in to your %1</string>
</property>
<property name="autoDefault">
<bool>false</bool>
@@ -472,8 +488,6 @@
<header>wizard/slideshow.h</header>
</customwidget>
</customwidgets>
- <resources>
- <include location="../../../theme.qrc"/>
- </resources>
+ <resources/>
<connections/>
</ui>
diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp
index 1bc76fdef..8f03fa124 100644
--- a/src/gui/wizard/owncloudsetuppage.cpp
+++ b/src/gui/wizard/owncloudsetuppage.cpp
@@ -91,6 +91,11 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent)
_ui.slideShow->hide();
#endif
+ const auto appName = Theme::instance()->appNameGUI();
+ _ui.loginButton->setText(tr("Log in to your %1").arg(appName));
+ _ui.addressDescriptionLabel->setText(tr("This is the link to your %1 web interface when you open it in the browser.<br/>"
+ "It looks like https://cloud.example.com or https://example.com/cloud").arg(appName));
+
customizeStyle();
}
@@ -125,6 +130,10 @@ void OwncloudSetupPage::setupCustomization()
#ifdef WITH_PROVIDERS
void OwncloudSetupPage::slotLogin()
{
+ _ui.slideShow->hide();
+ _ui.nextButton->hide();
+ _ui.prevButton->hide();
+
_ocWizard->setRegistration(false);
_ui.login->setMaximumHeight(0);
auto *animation = new QPropertyAnimation(_ui.login, "maximumHeight");
@@ -171,14 +180,15 @@ void OwncloudSetupPage::slotUrlChanged(const QString &url)
_ui.leUrl->setText(newUrl);
}
- if (!url.startsWith(QLatin1String("https://"))) {
- _ui.urlLabel->setPixmap(QPixmap(Theme::hidpiFileName(":/client/theme/lock-http.svg")));
- _ui.urlLabel->setToolTip(tr("This URL is NOT secure as it is not encrypted.\n"
- "It is not advisable to use it."));
- } else {
- _ui.urlLabel->setPixmap(QPixmap(Theme::hidpiFileName(":/client/theme/lock-https.svg")));
- _ui.urlLabel->setToolTip(tr("This URL is secure. You can use it."));
- }
+ const auto isSecure = url.startsWith(QLatin1String("https://"));
+ const auto toolTip = isSecure ? tr("This URL is secure. You can use it.")
+ : tr("This URL is NOT secure as it is not encrypted.\n"
+ "It is not advisable to use it.");
+ const auto pixmap = isSecure ? QPixmap(Theme::hidpiFileName(":/client/theme/lock-https.svg"))
+ : QPixmap(Theme::hidpiFileName(":/client/theme/lock-http.svg"));
+
+ _ui.urlLabel->setToolTip(toolTip);
+ _ui.urlLabel->setPixmap(pixmap.scaled(_ui.urlLabel->size(), Qt::KeepAspectRatio));
}
void OwncloudSetupPage::slotUrlEditFinished()