now when a new container is installed, it is selected as the default container

This commit is contained in:
vladimir.kuznetsov 2023-10-09 22:39:32 +05:00
parent 042788bec3
commit d364dbac2c
6 changed files with 31 additions and 36 deletions

View file

@ -162,32 +162,32 @@ Already installed containers were found on the server. All installed containers
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="263"/>
<location filename="../ui/controllers/installController.cpp" line="264"/>
<source>Settings updated successfully</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="278"/>
<location filename="../ui/controllers/installController.cpp" line="279"/>
<source>Server &apos;%1&apos; was removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="288"/>
<location filename="../ui/controllers/installController.cpp" line="289"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<location filename="../ui/controllers/installController.cpp" line="306"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="451"/>
<location filename="../ui/controllers/installController.cpp" line="452"/>
<source>Please login as the user</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="478"/>
<location filename="../ui/controllers/installController.cpp" line="479"/>
<source>Server added successfully</source>
<translation type="unfinished"></translation>
</message>
@ -260,7 +260,7 @@ Already installed containers were found on the server. All installed containers
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="390"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/>
<source>Servers</source>
<translation type="unfinished"></translation>
</message>
@ -1343,7 +1343,7 @@ And if you don&apos;t like the app, all the more support it - the donation will
<context>
<name>PageSettingsServersList</name>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServersList.qml" line="39"/>
<location filename="../ui/qml/Pages2/PageSettingsServersList.qml" line="37"/>
<source>Servers</source>
<translation type="unfinished"></translation>
</message>
@ -1568,33 +1568,33 @@ It&apos;s okay as long as it&apos;s from someone you trust.</source>
<context>
<name>PageSetupWizardInstalling</name>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="61"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="57"/>
<source>The server has already been added to the application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="66"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="62"/>
<source>Amnesia has detected that your server is currently </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="67"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="63"/>
<source>busy installing other software. Amnesia installation </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="68"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="64"/>
<source>will pause until the server finishes installing other software</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="125"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="121"/>
<source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="21"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="71"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="67"/>
<source>Usually it takes no more than 5 minutes</source>
<translation type="unfinished"></translation>
</message>

View file

@ -171,22 +171,22 @@ Already installed containers were found on the server. All installed containers
</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="263"/>
<location filename="../ui/controllers/installController.cpp" line="264"/>
<source>Settings updated successfully</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="278"/>
<location filename="../ui/controllers/installController.cpp" line="279"/>
<source>Server &apos;%1&apos; was removed</source>
<translation type="unfinished"> &apos;%1&apos;</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="288"/>
<location filename="../ui/controllers/installController.cpp" line="289"/>
<source>All containers from server &apos;%1&apos; have been removed</source>
<translation type="unfinished"> &apos;%1&apos; </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="305"/>
<location filename="../ui/controllers/installController.cpp" line="306"/>
<source>%1 has been removed from the server &apos;%2&apos;</source>
<translation type="unfinished">%1 &apos;%2&apos; </translation>
</message>
@ -207,12 +207,12 @@ Already installed containers were found on the server. All installed containers
<translation type="obsolete"> </translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="451"/>
<location filename="../ui/controllers/installController.cpp" line="452"/>
<source>Please login as the user</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="478"/>
<location filename="../ui/controllers/installController.cpp" line="479"/>
<source>Server added successfully</source>
<translation type="unfinished"></translation>
</message>
@ -285,7 +285,7 @@ Already installed containers were found on the server. All installed containers
<translation type="unfinished">VPN协议</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="390"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/>
<source>Servers</source>
<translation type="unfinished"></translation>
</message>
@ -1378,7 +1378,7 @@ And if you don&apos;t like the app, all the more support it - the donation will
<context>
<name>PageSettingsServersList</name>
<message>
<location filename="../ui/qml/Pages2/PageSettingsServersList.qml" line="39"/>
<location filename="../ui/qml/Pages2/PageSettingsServersList.qml" line="37"/>
<source>Servers</source>
<translation type="unfinished"></translation>
</message>
@ -1605,32 +1605,32 @@ It&apos;s okay as long as it&apos;s from someone you trust.</source>
<name>PageSetupWizardInstalling</name>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="21"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="71"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="67"/>
<source>Usually it takes no more than 5 minutes</source>
<translation type="unfinished">5</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="61"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="57"/>
<source>The server has already been added to the application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="66"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="62"/>
<source>Amnesia has detected that your server is currently </source>
<translation type="unfinished">Amnezia </translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="67"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="63"/>
<source>busy installing other software. Amnesia installation </source>
<translation type="unfinished">Amnezia安装</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="68"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="64"/>
<source>will pause until the server finishes installing other software</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="125"/>
<location filename="../ui/qml/Pages2/PageSetupWizardInstalling.qml" line="121"/>
<source>Installing</source>
<translation type="unfinished"></translation>
</message>

View file

@ -183,6 +183,7 @@ void InstallController::installContainer(DockerContainer container, QJsonObject
"All installed containers have been added to the application");
}
m_containersModel->setData(m_containersModel->index(0, 0), container, ContainersModel::Roles::IsDefaultRole);
emit installContainerFinished(finishMessage, ContainerProps::containerService(container) == ServiceType::Other);
return;
}

View file

@ -76,7 +76,6 @@ ListView {
(ConnectionController.isConnected || ConnectionController.isConnectionInProgress)) {
PageController.showNotificationMessage(qsTr("Reconnect via VPN Procotol: ") + name)
PageController.goToPageHome()
menu.visible = false
ConnectionController.openConnection()
}
} else {
@ -84,7 +83,6 @@ ListView {
InstallController.setShouldCreateServer(false)
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
containersDropDown.menuVisible = false
menu.visible = false
}
}

View file

@ -25,11 +25,7 @@ PageType {
function onImportFinished() {
PageController.goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState()
} else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) {
PageController.goToPage(PageEnum.PageSettingsServersList, false)
} else {
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSetupWizardStart)) {
PageController.replaceStartPage()
}
}

View file

@ -187,7 +187,7 @@ PageType {
drawerHeight: 0.4375
descriptionText: qsTr("Servers")
descriptionText: qsTr("Server")
headerText: qsTr("Server")
listView: ListViewWithRadioButtonType {