mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
SixCycle Credentials
.. adding the credentials details to preferences for the SixCycle web service.
This commit is contained in:
@@ -298,6 +298,10 @@
|
||||
//Today's Plan
|
||||
#define GC_TODAYSPLAN_TOKEN "<athlete-private>todaysplan_token"
|
||||
#define GC_TODAYSPLAN_URL "<athlete-private>todaysplan_url"
|
||||
//SixCycle
|
||||
#define GC_SIXCYCLE_USER "<athlete-private>sixcycle_user"
|
||||
#define GC_SIXCYCLE_PASS "<athlete-private>sixcycle_pass"
|
||||
#define GC_SIXCYCLE_URL "<athlete-private>sixcycle_url"
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
#include <QSettings>
|
||||
|
||||
@@ -599,6 +599,39 @@ CredentialsPage::CredentialsPage(QWidget *parent, Context *context) : QScrollAre
|
||||
|
||||
connect(tdpAuthorise, SIGNAL(clicked()), this, SLOT(authoriseTodaysPlan()));
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// SixCycle
|
||||
|
||||
QLabel *sc = new QLabel(tr("SixCycle"));
|
||||
sc->setFont(current);
|
||||
|
||||
// SixCycle can be on a staging or private tenant
|
||||
QLabel *scurllabel = new QLabel("API URL"); // don't translate a technical term
|
||||
scURL = new QLineEdit(this);
|
||||
scURL->setText(appsettings->cvalue(context->athlete->cyclist, GC_SIXCYCLE_URL, "https://live.sixcycle.com").toString());
|
||||
|
||||
QLabel *scuserLabel = new QLabel(tr("Username"));
|
||||
QLabel *scpassLabel = new QLabel(tr("Password"));
|
||||
|
||||
scUser = new QLineEdit(this);
|
||||
scUser->setText(appsettings->cvalue(context->athlete->cyclist, GC_SIXCYCLE_USER, "").toString());
|
||||
|
||||
scPass = new QLineEdit(this);
|
||||
scPass->setEchoMode(QLineEdit::Password);
|
||||
scPass->setText(appsettings->cvalue(context->athlete->cyclist, GC_SIXCYCLE_PASS, "").toString());
|
||||
|
||||
// add widgets to layout
|
||||
grid->addWidget(sc, ++row, 0);
|
||||
|
||||
grid->addWidget(scurllabel, ++row, 0);
|
||||
grid->addWidget(scURL, row, 1, 0 /*Qt::AlignLeft | Qt::AlignVCenter*/);
|
||||
|
||||
grid->addWidget(scuserLabel, ++row, 0);
|
||||
grid->addWidget(scUser, row, 1, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
|
||||
grid->addWidget(scpassLabel, ++row, 0);
|
||||
grid->addWidget(scPass, row, 1, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Cycling Analytics
|
||||
|
||||
@@ -1117,6 +1150,9 @@ CredentialsPage::saveClicked()
|
||||
googleDriveFolder->text());
|
||||
#endif
|
||||
appsettings->setCValue(context->athlete->cyclist, GC_NETWORKFILESTORE_FOLDER, networkFileStoreFolder->text());
|
||||
appsettings->setCValue(context->athlete->cyclist, GC_SIXCYCLE_USER, scUser->text());
|
||||
appsettings->setCValue(context->athlete->cyclist, GC_SIXCYCLE_PASS, scPass->text());
|
||||
appsettings->setCValue(context->athlete->cyclist, GC_SIXCYCLE_URL, scURL->text());
|
||||
|
||||
// escape the at character
|
||||
QString url = dvURL->text();
|
||||
|
||||
@@ -274,6 +274,10 @@ class CredentialsPage : public QScrollArea
|
||||
|
||||
QLineEdit *tdpURL;
|
||||
|
||||
QLineEdit *scURL;
|
||||
QLineEdit *scUser;
|
||||
QLineEdit *scPass;
|
||||
|
||||
QLineEdit *rideWithGPSUser;
|
||||
QLineEdit *rideWithGPSPass;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user