mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
desktop: add password reset to cloud preferences
This must be the number one support request we get. I can't believe we never thought of adding a button to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
84e8937787
commit
3eb5ea9adf
3 changed files with 28 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include "core/settings/qPrefCloudStorage.h"
|
#include "core/settings/qPrefCloudStorage.h"
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
PreferencesCloud::PreferencesCloud() : AbstractPreferencesWidget(tr("Cloud"),QIcon(":preferences-cloud-icon"), 9), ui(new Ui::PreferencesCloud())
|
PreferencesCloud::PreferencesCloud() : AbstractPreferencesWidget(tr("Cloud"),QIcon(":preferences-cloud-icon"), 9), ui(new Ui::PreferencesCloud())
|
||||||
{
|
{
|
||||||
|
@ -22,6 +23,11 @@ PreferencesCloud::~PreferencesCloud()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreferencesCloud::on_resetPassword_clicked()
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl(QUrl("https://cloud.subsurface-divelog.org/passwordreset"));
|
||||||
|
}
|
||||||
|
|
||||||
void PreferencesCloud::refreshSettings()
|
void PreferencesCloud::refreshSettings()
|
||||||
{
|
{
|
||||||
ui->cloud_storage_email->setText(prefs.cloud_storage_email);
|
ui->cloud_storage_email->setText(prefs.cloud_storage_email);
|
||||||
|
|
|
@ -20,6 +20,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void updateCloudAuthenticationState();
|
void updateCloudAuthenticationState();
|
||||||
void passwordUpdateSuccessful();
|
void passwordUpdateSuccessful();
|
||||||
|
void on_resetPassword_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::PreferencesCloud *ui;
|
Ui::PreferencesCloud *ui;
|
||||||
|
|
|
@ -102,6 +102,24 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="pwdResetLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_pwd_help">
|
||||||
|
<property name="text">
|
||||||
|
<string>If you have a cloud account and forgot your password, you can reset it here:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="resetPassword">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reset Password</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_help1">
|
<widget class="QLabel" name="label_help1">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string extracomment="Help info 1"/>
|
<string extracomment="Help info 1"/>
|
||||||
|
@ -111,7 +129,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_help2">
|
<widget class="QLabel" name="label_help2">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string extracomment="Help info 1"/>
|
<string extracomment="Help info 1"/>
|
||||||
|
@ -121,7 +139,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_help3">
|
<widget class="QLabel" name="label_help3">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string extracomment="Help info 1"/>
|
<string extracomment="Help info 1"/>
|
||||||
|
@ -131,7 +149,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_help4">
|
<widget class="QLabel" name="label_help4">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string extracomment="Help info 1"/>
|
<string extracomment="Help info 1"/>
|
||||||
|
|
Loading…
Reference in a new issue