fixed qml warnings and hindi language warnings (#805)
This commit is contained in:
parent
c3eddc92bd
commit
acf7fa261a
33 changed files with 37 additions and 107 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -33,6 +33,10 @@ void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip annoying messages from Qt
|
// Skip annoying messages from Qt
|
||||||
|
if (msg.contains("OpenType support missing for")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (msg.startsWith("Unknown property") || msg.startsWith("Could not create pixmap") || msg.startsWith("Populating font") || msg.startsWith("stale focus object")) {
|
if (msg.startsWith("Unknown property") || msg.startsWith("Could not create pixmap") || msg.startsWith("Populating font") || msg.startsWith("stale focus object")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,6 @@
|
||||||
<file>images/tray/default.png</file>
|
<file>images/tray/default.png</file>
|
||||||
<file>images/tray/error.png</file>
|
<file>images/tray/error.png</file>
|
||||||
<file>images/arrow_left.png</file>
|
<file>images/arrow_left.png</file>
|
||||||
<file>fonts/Lato-Black.ttf</file>
|
|
||||||
<file>fonts/Lato-BlackItalic.ttf</file>
|
|
||||||
<file>fonts/Lato-Bold.ttf</file>
|
|
||||||
<file>fonts/Lato-BoldItalic.ttf</file>
|
|
||||||
<file>fonts/Lato-Italic.ttf</file>
|
|
||||||
<file>fonts/Lato-Light.ttf</file>
|
|
||||||
<file>fonts/Lato-LightItalic.ttf</file>
|
|
||||||
<file>fonts/Lato-Regular.ttf</file>
|
|
||||||
<file>fonts/Lato-Thin.ttf</file>
|
|
||||||
<file>fonts/Lato-ThinItalic.ttf</file>
|
|
||||||
<file>images/AmneziaVPN.png</file>
|
<file>images/AmneziaVPN.png</file>
|
||||||
<file>images/share.png</file>
|
<file>images/share.png</file>
|
||||||
<file>server_scripts/remove_container.sh</file>
|
<file>server_scripts/remove_container.sh</file>
|
||||||
|
@ -95,7 +85,6 @@
|
||||||
<file>server_scripts/check_user_in_sudo.sh</file>
|
<file>server_scripts/check_user_in_sudo.sh</file>
|
||||||
<file>ui/qml/Controls2/BasicButtonType.qml</file>
|
<file>ui/qml/Controls2/BasicButtonType.qml</file>
|
||||||
<file>ui/qml/Controls2/TextFieldWithHeaderType.qml</file>
|
<file>ui/qml/Controls2/TextFieldWithHeaderType.qml</file>
|
||||||
<file>fonts/pt-root-ui_vf.ttf</file>
|
|
||||||
<file>ui/qml/Controls2/LabelWithButtonType.qml</file>
|
<file>ui/qml/Controls2/LabelWithButtonType.qml</file>
|
||||||
<file>images/controls/arrow-right.svg</file>
|
<file>images/controls/arrow-right.svg</file>
|
||||||
<file>images/controls/chevron-right.svg</file>
|
<file>images/controls/chevron-right.svg</file>
|
||||||
|
@ -239,6 +228,7 @@
|
||||||
<file>images/controls/alert-circle.svg</file>
|
<file>images/controls/alert-circle.svg</file>
|
||||||
<file>images/controls/file-check-2.svg</file>
|
<file>images/controls/file-check-2.svg</file>
|
||||||
<file>ui/qml/Controls2/WarningType.qml</file>
|
<file>ui/qml/Controls2/WarningType.qml</file>
|
||||||
|
<file>fonts/pt-root-ui_vf.ttf</file>
|
||||||
<file>ui/qml/Modules/Style/qmldir</file>
|
<file>ui/qml/Modules/Style/qmldir</file>
|
||||||
<file>ui/qml/Modules/Style/AmneziaStyle.qml</file>
|
<file>ui/qml/Modules/Style/AmneziaStyle.qml</file>
|
||||||
<file>ui/qml/Pages2/PageServiceSocksProxySettings.qml</file>
|
<file>ui/qml/Pages2/PageServiceSocksProxySettings.qml</file>
|
||||||
|
|
|
@ -92,9 +92,9 @@ int LanguageModel::getCurrentLanguageIndex()
|
||||||
|
|
||||||
int LanguageModel::getLineHeightAppend()
|
int LanguageModel::getLineHeightAppend()
|
||||||
{
|
{
|
||||||
int langIndex = getCurrentLanguageIndex();
|
auto language = static_cast<LanguageSettings::AvailableLanguageEnum>(getCurrentLanguageIndex());
|
||||||
switch (langIndex) {
|
switch (language) {
|
||||||
case 5: return 10; break; // Burmese
|
case LanguageSettings::AvailableLanguageEnum::Burmese: return 10; break;
|
||||||
default: return 0; break;
|
default: return 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ DrawerType2 {
|
||||||
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
|
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: parent.height * 0.7
|
expandedHeight: parent.height * 0.9
|
||||||
|
|
||||||
expandedContent: ColumnLayout {
|
expandedContent: ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -93,20 +93,11 @@ ListView {
|
||||||
PageController.goToPage(PageEnum.PageProtocolRaw)
|
PageController.goToPage(PageEnum.PageProtocolRaw)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case ContainerEnum.Sftp: {
|
|
||||||
SftpConfigModel.updateModel(config)
|
|
||||||
PageController.goToPage(PageEnum.PageServiceSftpSettings)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case ContainerEnum.TorWebSite: {
|
|
||||||
PageController.goToPage(PageEnum.PageServiceTorWebsiteSettings)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case ContainerEnum.Dns: {
|
case ContainerEnum.Dns: {
|
||||||
PageController.goToPage(PageEnum.PageServiceDnsSettings)
|
PageController.goToPage(PageEnum.PageServiceDnsSettings)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
default: { // go to the settings page of the container with multiple protocols
|
default: {
|
||||||
ProtocolsModel.updateModel(config)
|
ProtocolsModel.updateModel(config)
|
||||||
PageController.goToPage(PageEnum.PageSettingsServerProtocol)
|
PageController.goToPage(PageEnum.PageSettingsServerProtocol)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@ Button {
|
||||||
|
|
||||||
property var clickedFunc
|
property var clickedFunc
|
||||||
|
|
||||||
|
property alias buttonTextLabel: buttonText
|
||||||
|
|
||||||
implicitHeight: 56
|
implicitHeight: 56
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
@ -140,6 +142,8 @@ Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonTextType {
|
ButtonTextType {
|
||||||
|
id: buttonText
|
||||||
|
|
||||||
color: textColor
|
color: textColor
|
||||||
text: root.text
|
text: root.text
|
||||||
visible: root.text === "" ? false : true
|
visible: root.text === "" ? false : true
|
||||||
|
|
|
@ -102,7 +102,8 @@ Switch {
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
ListItemTitleType {
|
ListItemTitleType {
|
||||||
|
|
|
@ -7,10 +7,10 @@ Text {
|
||||||
lineHeightMode: Text.FixedHeight
|
lineHeightMode: Text.FixedHeight
|
||||||
|
|
||||||
color: AmneziaStyle.color.white
|
color: AmneziaStyle.color.white
|
||||||
font.pixelSize: 36
|
font.pixelSize: 32
|
||||||
font.weight: 700
|
font.weight: 700
|
||||||
font.family: "PT Root UI VF"
|
font.family: "PT Root UI VF"
|
||||||
font.letterSpacing: -1.08
|
font.letterSpacing: -1.0
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,7 @@ PageType {
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: splitTunnelingButton
|
id: splitTunnelingButton
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||||
Layout.bottomMargin: 34
|
Layout.bottomMargin: 34
|
||||||
leftPadding: 16
|
leftPadding: 16
|
||||||
|
@ -100,6 +101,10 @@ PageType {
|
||||||
leftImageColor: AmneziaStyle.color.transparent
|
leftImageColor: AmneziaStyle.color.transparent
|
||||||
borderWidth: 0
|
borderWidth: 0
|
||||||
|
|
||||||
|
buttonTextLabel.lineHeight: 20
|
||||||
|
buttonTextLabel.font.pixelSize: 14
|
||||||
|
buttonTextLabel.font.weight: 500
|
||||||
|
|
||||||
property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled ||
|
property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled ||
|
||||||
(ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi"))
|
(ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi"))
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,6 @@ PageType {
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ PageType {
|
||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
if (focus) {
|
if (focus) {
|
||||||
listview.currentItem.focusItem.forceActiveFocus()
|
listview.currentItem.listViewFocusItem.forceActiveFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ PageType {
|
||||||
implicitWidth: listview.width
|
implicitWidth: listview.width
|
||||||
implicitHeight: col.implicitHeight
|
implicitHeight: col.implicitHeight
|
||||||
|
|
||||||
property alias focusItem: hostLabel.rightButton
|
property alias listViewFocusItem: hostLabel.rightButton
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: col
|
id: col
|
||||||
|
@ -233,7 +233,7 @@ PageType {
|
||||||
PageController.showBusyIndicator(true)
|
PageController.showBusyIndicator(true)
|
||||||
InstallController.mountSftpDrive(port, password, username)
|
InstallController.mountSftpDrive(port, password, username)
|
||||||
PageController.showBusyIndicator(false)
|
PageController.showBusyIndicator(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParagraphTextType {
|
ParagraphTextType {
|
||||||
|
@ -290,48 +290,12 @@ PageType {
|
||||||
text: qsTr("Detailed instructions")
|
text: qsTr("Detailed instructions")
|
||||||
|
|
||||||
parentFlickable: fl
|
parentFlickable: fl
|
||||||
KeyNavigation.tab: removeButton
|
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||||
|
|
||||||
clickedFunc: function() {
|
clickedFunc: function() {
|
||||||
// Qt.openUrlExternally("https://github.com/amnezia-vpn/desktop-client/releases/latest")
|
// Qt.openUrlExternally("https://github.com/amnezia-vpn/desktop-client/releases/latest")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
|
||||||
id: removeButton
|
|
||||||
Layout.topMargin: 24
|
|
||||||
Layout.bottomMargin: 16
|
|
||||||
Layout.leftMargin: 8
|
|
||||||
implicitHeight: 32
|
|
||||||
|
|
||||||
defaultColor: AmneziaStyle.color.transparent
|
|
||||||
hoveredColor: AmneziaStyle.color.blackHovered
|
|
||||||
pressedColor: AmneziaStyle.color.blackPressed
|
|
||||||
textColor: AmneziaStyle.color.red
|
|
||||||
|
|
||||||
parentFlickable: fl
|
|
||||||
Keys.onTabPressed: lastItemTabClicked()
|
|
||||||
|
|
||||||
text: qsTr("Remove SFTP and all data stored there")
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
|
||||||
var headerText = qsTr("Remove SFTP and all data stored there?")
|
|
||||||
var yesButtonText = qsTr("Continue")
|
|
||||||
var noButtonText = qsTr("Cancel")
|
|
||||||
|
|
||||||
var yesButtonFunction = function() {
|
|
||||||
PageController.goToPage(PageEnum.PageDeinstalling)
|
|
||||||
InstallController.removeProcessedContainer()
|
|
||||||
}
|
|
||||||
var noButtonFunction = function() {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
removeButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ PageType {
|
||||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||||
rightImageColor: AmneziaStyle.color.white
|
rightImageColor: AmneziaStyle.color.white
|
||||||
|
|
||||||
KeyNavigation.tab: removeButton
|
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
GC.copyToClipBoard(descriptionText)
|
GC.copyToClipBoard(descriptionText)
|
||||||
|
@ -127,41 +127,6 @@ PageType {
|
||||||
|
|
||||||
text: qsTr("When configuring WordPress set the this onion address as domain.")
|
text: qsTr("When configuring WordPress set the this onion address as domain.")
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
|
||||||
id: removeButton
|
|
||||||
Layout.topMargin: 24
|
|
||||||
Layout.bottomMargin: 16
|
|
||||||
Layout.leftMargin: 8
|
|
||||||
implicitHeight: 32
|
|
||||||
|
|
||||||
defaultColor: AmneziaStyle.color.transparent
|
|
||||||
hoveredColor: AmneziaStyle.color.blackHovered
|
|
||||||
pressedColor: AmneziaStyle.color.blackPressed
|
|
||||||
textColor: AmneziaStyle.color.red
|
|
||||||
|
|
||||||
text: qsTr("Remove website")
|
|
||||||
|
|
||||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
|
||||||
|
|
||||||
clickedFunc: function() {
|
|
||||||
var headerText = qsTr("The site with all data will be removed from the tor network.")
|
|
||||||
var yesButtonText = qsTr("Continue")
|
|
||||||
var noButtonText = qsTr("Cancel")
|
|
||||||
|
|
||||||
var yesButtonFunction = function() {
|
|
||||||
PageController.goToPage(PageEnum.PageDeinstalling)
|
|
||||||
InstallController.removeProcessedContainer()
|
|
||||||
}
|
|
||||||
var noButtonFunction = function() {
|
|
||||||
if (!GC.isMobile()) {
|
|
||||||
removeButton.forceActiveFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,8 @@ PageType {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
HeaderType {
|
HeaderType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
|
|
|
@ -105,6 +105,7 @@ PageType {
|
||||||
case ProtocolEnum.WireGuard: WireGuardConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
case ProtocolEnum.WireGuard: WireGuardConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
case ProtocolEnum.Awg: AwgConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
case ProtocolEnum.Awg: AwgConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
case ProtocolEnum.Xray: XrayConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
case ProtocolEnum.Xray: XrayConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
|
case ProtocolEnum.Sftp: SftpConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
case ProtocolEnum.Ipsec: Ikev2ConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
case ProtocolEnum.Ipsec: Ikev2ConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
case ProtocolEnum.Socks5Proxy: Socks5ProxyConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
case ProtocolEnum.Socks5Proxy: Socks5ProxyConfigModel.updateModel(ProtocolsModel.getConfig()); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,7 +202,7 @@ PageType {
|
||||||
parent: root
|
parent: root
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
expandedHeight: root.height * 0.45
|
expandedHeight: root.height
|
||||||
onClosed: {
|
onClosed: {
|
||||||
if (!GC.isMobile()) {
|
if (!GC.isMobile()) {
|
||||||
clientNameTextField.textField.forceActiveFocus()
|
clientNameTextField.textField.forceActiveFocus()
|
||||||
|
@ -210,6 +210,7 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
expandedContent: ColumnLayout {
|
expandedContent: ColumnLayout {
|
||||||
|
id: shareFullAccessDrawerContent
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -217,6 +218,10 @@ PageType {
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
onImplicitHeightChanged: {
|
||||||
|
shareFullAccessDrawer.expandedHeight = shareFullAccessDrawerContent.implicitHeight + 32
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: shareFullAccessDrawer
|
target: shareFullAccessDrawer
|
||||||
enabled: !GC.isMobile()
|
enabled: !GC.isMobile()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue