minor ui fixes
This commit is contained in:
parent
0060f57b63
commit
b5e1c78461
11 changed files with 132 additions and 66 deletions
|
|
@ -446,3 +446,18 @@ void InstallController::setEncryptedPassphrase(QString passphrase)
|
|||
m_privateKeyPassphrase = passphrase;
|
||||
emit passphraseRequestFinished();
|
||||
}
|
||||
|
||||
void InstallController::addEmptyServer()
|
||||
{
|
||||
QJsonObject server;
|
||||
server.insert(config_key::hostName, m_currentlyInstalledServerCredentials.hostName);
|
||||
server.insert(config_key::userName, m_currentlyInstalledServerCredentials.userName);
|
||||
server.insert(config_key::password, m_currentlyInstalledServerCredentials.secretData);
|
||||
server.insert(config_key::port, m_currentlyInstalledServerCredentials.port);
|
||||
server.insert(config_key::description, m_settings->nextAvailableServerName());
|
||||
|
||||
m_serversModel->addServer(server);
|
||||
m_serversModel->setDefaultServerIndex(m_serversModel->getServersCount() - 1);
|
||||
|
||||
emit installServerFinished(tr("Server added successfully"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ public slots:
|
|||
|
||||
void setEncryptedPassphrase(QString passphrase);
|
||||
|
||||
void addEmptyServer();
|
||||
|
||||
signals:
|
||||
void installContainerFinished(const QString &finishMessage, bool isServiceInstall);
|
||||
void installServerFinished(const QString &finishMessage);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ bool ContainersModel::setData(const QModelIndex &index, const QVariant &value, i
|
|||
switch (role) {
|
||||
case NameRole:
|
||||
// return ContainerProps::containerHumanNames().value(container);
|
||||
case DescRole:
|
||||
case DescriptionRole:
|
||||
// return ContainerProps::containerDescriptions().value(container);
|
||||
case ConfigRole: {
|
||||
m_settings->setContainerConfig(m_currentlyProcessedServerIndex, container, value.toJsonObject());
|
||||
|
|
@ -62,7 +62,8 @@ QVariant ContainersModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
switch (role) {
|
||||
case NameRole: return ContainerProps::containerHumanNames().value(container);
|
||||
case DescRole: return ContainerProps::containerDescriptions().value(container);
|
||||
case DescriptionRole: return ContainerProps::containerDescriptions().value(container);
|
||||
case DetailedDescriptionRole: return ContainerProps::containerDetailedDescriptions().value(container);
|
||||
case ConfigRole: {
|
||||
if (container == DockerContainer::None) {
|
||||
return QJsonObject();
|
||||
|
|
@ -220,7 +221,8 @@ QHash<int, QByteArray> ContainersModel::roleNames() const
|
|||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[NameRole] = "name";
|
||||
roles[DescRole] = "description";
|
||||
roles[DescriptionRole] = "description";
|
||||
roles[DetailedDescriptionRole] = "detailedDescription";
|
||||
roles[ServiceTypeRole] = "serviceType";
|
||||
roles[DockerContainerRole] = "dockerContainer";
|
||||
roles[ConfigRole] = "config";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ public:
|
|||
|
||||
enum Roles {
|
||||
NameRole = Qt::UserRole + 1,
|
||||
DescRole,
|
||||
DescriptionRole,
|
||||
DetailedDescriptionRole,
|
||||
ServiceTypeRole,
|
||||
ConfigRole,
|
||||
DockerContainerRole,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ PageType {
|
|||
text: qsTr("Remove website")
|
||||
|
||||
onClicked: {
|
||||
questionDrawer.headerText = qsTr("Some description")
|
||||
questionDrawer.headerText = qsTr("The site with all data will be removed from the tor network.")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
|
||||
text: qsTr("Card on Patreon")
|
||||
|
||||
clickedFunction: function() {
|
||||
onClicked: function() {
|
||||
Qt.openUrlExternally(qsTr("https://www.patreon.com/amneziavpn"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PageType {
|
|||
|
||||
QtObject {
|
||||
id: onlyForwardSites
|
||||
property string name: qsTr("Addresses from the list should always open via VPN")
|
||||
property string name: qsTr("Only the addresses in the list must be opened via VPN")
|
||||
property int type: routeMode.onlyForwardSites
|
||||
}
|
||||
QtObject {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,8 @@ PageType {
|
|||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
|
||||
CardType {
|
||||
implicitWidth: parent.width
|
||||
|
||||
|
|
@ -143,14 +145,14 @@ PageType {
|
|||
id: continueButton
|
||||
|
||||
implicitWidth: parent.width
|
||||
anchors.bottomMargin: 24
|
||||
anchors.topMargin: 24
|
||||
|
||||
text: qsTr("Continue")
|
||||
|
||||
onClicked: function() {
|
||||
if (root.isEasySetup) {
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(containers.dockerContainer)
|
||||
goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
goToPage(PageEnum.PageSetupWizardInstalling)
|
||||
InstallController.install(containers.dockerContainer,
|
||||
containers.containerDefaultPort,
|
||||
containers.containerDefaultTransportProto)
|
||||
|
|
@ -159,6 +161,26 @@ PageType {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
implicitWidth: parent.width
|
||||
anchors.topMargin: 8
|
||||
anchors.bottomMargin: 24
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Set up later")
|
||||
|
||||
onClicked: function() {
|
||||
goToPage(PageEnum.PageSetupWizardInstalling)
|
||||
InstallController.addEmptyServer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
headerText: qsTr("Installing ") + name
|
||||
descriptionText: qsTr("protocol description")
|
||||
descriptionText: description
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
|
|
@ -159,7 +159,7 @@ PageType {
|
|||
font.weight: Font.Medium
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
text: qsTr("detailed protocol description")
|
||||
text: detailedDescription
|
||||
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue