moved ContainersPageHomeListView and ConnectionTypeSelectionDrawer to separate components

This commit is contained in:
vladimir.kuznetsov 2023-05-22 00:10:51 +08:00
parent acca85b99a
commit 0479113949
23 changed files with 443 additions and 294 deletions

View file

@ -188,3 +188,33 @@ QStringList ContainerProps::fixedPortsForContainer(DockerContainer c)
default: return {};
}
}
bool ContainerProps::isEasySetupContainer(DockerContainer container)
{
switch (container) {
case DockerContainer::OpenVpn : return true;
case DockerContainer::Cloak : return true;
case DockerContainer::ShadowSocks : return true;
default: return false;
}
}
QString ContainerProps::easySetupHeader(DockerContainer container)
{
switch (container) {
case DockerContainer::OpenVpn : return tr("Low");
case DockerContainer::Cloak : return tr("High");
case DockerContainer::ShadowSocks : return tr("Medium");
default: return "";
}
}
QString ContainerProps::easySetupDescription(DockerContainer container)
{
switch (container) {
case DockerContainer::OpenVpn : return tr("Many foreign websites and VPN providers are blocked");
case DockerContainer::Cloak : return tr("Some foreign sites are blocked, but VPN providers are not blocked");
case DockerContainer::ShadowSocks : return tr("I just want to increase the level of privacy");
default: return "";
}
}