Compare commits

...

42 Commits

Author SHA1 Message Date
vladimir.kuznetsov ad85424ccb change wmic to powershell 2024-08-13 21:11:51 +04:00
vladimir.kuznetsov 3fc9edd346 update default values of additional awg parameters 2024-08-12 09:56:00 +04:00
pokamest 1a1f75d873 Merge pull request #920 from sobolevn/patch-1 2024-08-08 16:16:23 +01:00
pokamest df02e0bf78 Merge pull request #950 from amnezia-vpn/bugfix/awg-page-settings-translations 2024-08-08 16:14:38 +01:00
Garegin Harutyunyan 264d77463d Refactoring/service logging functional (#793) 2024-08-08 16:13:49 +01:00
vladimir.kuznetsov 0a37ffd5e3 added qsTr() for PageProtocolAwgSettings 2024-08-08 09:57:51 +04:00
pokamest 1343d10aa7 Merge pull request #919 from amnezia-vpn/fix/android-clipboard
Fix calling paste from clipboard when launching app on android
2024-08-06 12:42:11 +01:00
pokamest 6f96ebd8bf Merge pull request #942 from amnezia-vpn/version-bump
Bump version to 4.6.1.0
2024-08-06 10:53:38 +01:00
albexk cb531dacb3 Bump version to 4.6.1.0 2024-08-06 12:51:23 +03:00
albexk dfd0b4d0e5 Fix Android bugs (#941)
* Add an explicit value for the hasFragileUserData parameter

* Fix app crashes when canceling file opening

* Fix requestNetwork bug for Android 11

* Fix activity onStop method
2024-08-06 10:44:51 +01:00
albexk f978f55e7f Android TV (#933)
* Disable touchscreen requirement

* Add Android TV feature

* Add Android TV draft banner

* Add Android TV check method
2024-08-06 10:41:44 +01:00
sobolevn dc85a99e08 Fix Android section rendering in the README 2024-08-03 13:19:17 +03:00
albexk ef06fcb4f4 Fix calling paste from clipboard when launching app on android 2024-08-03 13:02:34 +03:00
pokamest ffe2314d47 Merge pull request #912 from amnezia-vpn/bugfix/qt6.7-ui-fix
Fixed ui bug on qt6.7
2024-07-29 12:03:37 +01:00
pokamest 4e970322d0 Merge pull request #901 from amnezia-vpn/update-translation
update the Arabic translation
2024-07-27 18:45:05 +01:00
Nikita Titov 8dee0d27cf Rename Shadowsocks (#891) 2024-07-27 18:42:11 +01:00
Mykola Baibuz c520f9a2a4 Update OpenVPN to last version (#837)
* Update OpenVPN to least version

* Fix iOS build

* Fix client config for new OpenVPN3

* Update iOS submodule

* Resolve 3rd-prebuilt merge conflict
2024-07-27 18:38:55 +01:00
Garegin866 003c3a23c4 Fixed ui bug on qt6.7 2024-07-26 22:26:15 +04:00
pokamest 1754a82f67 iOS build fix 2024-07-22 15:29:48 +03:00
pokamest 3384008277 Merge pull request #899 from amnezia-vpn/bugfix/udp-for-ios
bugfix for udp for ios
2024-07-22 14:40:24 +03:00
pokamest af22115706 Merge pull request #896 from amnezia-vpn/bugfix/dns-for-xray-ios
dns fix for xray(ios)
2024-07-22 14:39:44 +03:00
Nikita Titov 4b114fd3b6 Fix imgs and list in README (#900)
* Fix imgs and list in README

* Reorder download badges in README
2024-07-22 02:42:56 +03:00
Shehab Ahmed 9d531f5d74 update the Arabic translation 2024-07-19 21:24:28 +03:00
Boris Verbitskii a5564148f5 bugfix for udp for ios 2024-07-19 11:23:00 +07:00
KsZnak 196f7778fc Im gs for readme (#898)
Update README.md
2024-07-16 12:56:52 +01:00
Boris Verbitskii de20add857 dns fix for xray(ios) 2024-07-16 16:39:39 +07:00
pokamest c59216b58a Merge pull request #880 from StrikerRUS/translation
add artifact with translations and update Russian translation
2024-07-11 02:59:14 -07:00
Nethius acf7fa261a fixed qml warnings and hindi language warnings (#805) 2024-07-11 10:36:24 +01:00
pokamest c3eddc92bd Merge pull request #889 from amnezia-vpn/feature/shadow-socks-by-xray-for-ios
ssXray support for ios
2024-07-11 02:34:04 -07:00
Boris Verbitskii 18c74f4b02 add ssXray for ios 2024-07-09 14:56:39 +07:00
pokamest 3f90ee915d Merge pull request #879 from amnezia-vpn/rename_open_over_ss
Renaming OpenVPN over ShadowsSocks
2024-07-07 16:13:47 +01:00
Nethius 401ad0db0e fixed wg/awg macos firewall rules for 0.0.0.0/0 (#883)
* fixed wg/awg macos/linux firewall rules for 0.0.0.0/0
2024-07-07 14:56:38 +01:00
Vladyslav Miachkov 5945133d30 Create AmneziaStyle qml object (#830) 2024-07-07 11:42:38 +01:00
Nethius ff4fbde0b0 go to the home page after server installation (#878) 2024-07-07 11:42:14 +01:00
albexk 74ae4f3e67 SSXray for Android (#885) 2024-07-06 16:44:34 +01:00
pokamest ae4b33d042 Merge pull request #884 from amnezia-vpn/fix/android-xray-config
Fix logging configuration for XRay
2024-07-06 14:10:12 +01:00
albexk 53fa280037 Fix logging configuration for XRay 2024-07-05 18:42:53 +03:00
pokamest 8ecde90bc7 Update README.md, fix crlf 2024-07-04 21:04:56 +01:00
pokamest 34a583f272 Update README.md 2024-07-04 20:58:48 +01:00
StrikerRUS 5de4b8eeb8 add artifact with translations and update Russian translation 2024-07-04 19:32:50 +03:00
StrikerRUS aae420e469 create translations artifact 2024-07-04 14:27:30 +03:00
lunardunno d0c82efa1c rename OpenVPN over ShadowsSocks 2024-07-03 12:06:31 +04:00
143 changed files with 8184 additions and 4655 deletions
+7
View File
@@ -65,6 +65,13 @@ jobs:
path: deploy/AppDir path: deploy/AppDir
retention-days: 7 retention-days: 7
- name: 'Upload translations artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_translations
path: client/translations
retention-days: 7
# ------------------------------------------------------ # ------------------------------------------------------
Build-Windows: Build-Windows:
+2 -2
View File
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN) set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.6.0.1 project(${PROJECT} VERSION 4.6.1.0
DESCRIPTION "AmneziaVPN" DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/" HOMEPAGE_URL "https://amnezia.org/"
) )
@@ -11,7 +11,7 @@ string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
set(RELEASE_DATE "${CURRENT_DATE}") set(RELEASE_DATE "${CURRENT_DATE}")
set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}) set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH})
set(APP_ANDROID_VERSION_CODE 54) set(APP_ANDROID_VERSION_CODE 56)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(MZ_PLATFORM_NAME "linux") set(MZ_PLATFORM_NAME "linux")
+49 -11
View File
@@ -6,6 +6,26 @@
Amnezia is an open-source VPN client, with a key feature that enables you to deploy your own VPN server on your server. Amnezia is an open-source VPN client, with a key feature that enables you to deploy your own VPN server on your server.
![Image](https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/uipic4.png)
<br>
<a href="https://github.com/amnezia-vpn/amnezia-client/releases/download/4.6.0.3/AmneziaVPN_4.6.0.3_x64.exe"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/win.png" width="150" style="max-width: 100%;"></a>
<a href="https://github.com/amnezia-vpn/amnezia-client/releases/download/4.6.0.3/AmneziaVPN_4.6.0.3.dmg"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/mac.png" width="150" style="max-width: 100%;"></a>
<a href="https://github.com/amnezia-vpn/amnezia-client/releases/download/4.6.0.3/AmneziaVPN_Linux_4.6.0.3.tar.zip"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/lin.png" width="150" style="max-width: 100%;"></a>
<a href="https://github.com/amnezia-vpn/amnezia-client/releases/tag/4.6.0.3"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/andr.png" width="150" style="max-width: 100%;"></a>
<br>
<a href="https://play.google.com/store/search?q=amnezia+vpn&c=apps"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/play.png" width="150" style="max-width: 100%;"></a>
<a href="https://apps.apple.com/us/app/amneziavpn/id1600529900"><img src="https://github.com/amnezia-vpn/amnezia-client/blob/dev/metadata/img-readme/apl.png" width="150" style="max-width: 100%;"></a>
[All releases](https://github.com/amnezia-vpn/amnezia-client/releases)
<br>
## Features ## Features
- Very easy to use - enter your IP address, SSH login, and password, and Amnezia will automatically install VPN docker containers to your server and connect to the VPN. - Very easy to use - enter your IP address, SSH login, and password, and Amnezia will automatically install VPN docker containers to your server and connect to the VPN.
@@ -16,10 +36,12 @@ Amnezia is an open-source VPN client, with a key feature that enables you to dep
## Links ## Links
[https://amnezia.org](https://amnezia.org) - project website - [https://amnezia.org](https://amnezia.org) - project website
[https://www.reddit.com/r/AmneziaVPN](https://www.reddit.com/r/AmneziaVPN) - Reddit - [https://www.reddit.com/r/AmneziaVPN](https://www.reddit.com/r/AmneziaVPN) - Reddit
[https://t.me/amnezia_vpn_en](https://t.me/amnezia_vpn_en) - Telegram support channel (English) - [https://t.me/amnezia_vpn_en](https://t.me/amnezia_vpn_en) - Telegram support channel (English)
[https://t.me/amnezia_vpn](https://t.me/amnezia_vpn) - Telegram support channel (Russian) - [https://t.me/amnezia_vpn_ir](https://t.me/amnezia_vpn_ir) - Telegram support channel (Farsi)
- [https://t.me/amnezia_vpn_mm](https://t.me/amnezia_vpn_mm) - Telegram support channel (Myanmar)
- [https://t.me/amnezia_vpn](https://t.me/amnezia_vpn) - Telegram support channel (Russian)
## Tech ## Tech
@@ -44,6 +66,19 @@ git submodule update --init --recursive
Want to contribute? Welcome! Want to contribute? Welcome!
### Help with translations
Download the most actual translation files.
Go to ["Actions" tab](https://github.com/amnezia-vpn/amnezia-client/actions?query=is%3Asuccess+branch%3Adev), click on the first line.
Then scroll down to the "Artifacts" section and download "AmneziaVPN_translations".
Unzip this file.
Each *.ts file contains strings for one corresponding language.
Translate or correct some strings in one or multiple *.ts files and commit them back to this repository into the ``client/translations`` folder.
You can do it via a web-interface or any other method you're familiar with.
### Building sources and deployment ### Building sources and deployment
Check deploy folder for build scripts. Check deploy folder for build scripts.
@@ -52,7 +87,7 @@ Check deploy folder for build scripts.
1. First, make sure you have [XCode](https://developer.apple.com/xcode/) installed, at least version 14 or higher. 1. First, make sure you have [XCode](https://developer.apple.com/xcode/) installed, at least version 14 or higher.
2. We use QT to generate the XCode project. We need QT version 6.6.1. Install QT for MacOS [here](https://doc.qt.io/qt-6/macos.html) or [QT Online Installer](https://www.qt.io/download-open-source). Required modules: 2. We use QT to generate the XCode project. We need QT version 6.6.2. Install QT for MacOS [here](https://doc.qt.io/qt-6/macos.html) or [QT Online Installer](https://www.qt.io/download-open-source). Required modules:
- MacOS - MacOS
- iOS - iOS
- Qt 5 Compatibility Module - Qt 5 Compatibility Module
@@ -119,9 +154,11 @@ The Android app has the following requirements:
* Android platform SDK 33 * Android platform SDK 33
* CMake 3.25.0 * CMake 3.25.0
After you have installed QT, QT Creator, and Android Studio, you need to configure QT Creator correctly. Click in the top menu bar on `QT Creator` -> `Preferences` -> `Devices` and select the tab `Android`. After you have installed QT, QT Creator, and Android Studio, you need to configure QT Creator correctly.
* set path to JDK 11
* set path to Android SDK ($ANDROID_HOME) - Click in the top menu bar on `QT Creator` -> `Preferences` -> `Devices` and select the tab `Android`.
- Set path to JDK 11
- Set path to Android SDK (`$ANDROID_HOME`)
In case you get errors regarding missing SDK or 'SDK manager not running', you cannot fix them by correcting the paths. If you have some spare GBs on your disk, you can let QT Creator install all requirements by choosing an empty folder for `Android SDK location` and clicking on `Set Up SDK`. Be aware: This will install a second Android SDK and NDK on your machine!  In case you get errors regarding missing SDK or 'SDK manager not running', you cannot fix them by correcting the paths. If you have some spare GBs on your disk, you can let QT Creator install all requirements by choosing an empty folder for `Android SDK location` and clicking on `Set Up SDK`. Be aware: This will install a second Android SDK and NDK on your machine! 
Double-check that the right CMake version is configured:  Click on `QT Creator` -> `Preferences` and click on the side menu on `Kits`. Under the center content view's `Kits` tab, you'll find an entry for `CMake Tool`. If the default selected CMake version is lower than 3.25.0, install on your system CMake >= 3.25.0 and choose `System CMake at <path>` from the drop-down list. If this entry is missing, you either have not installed CMake yet or QT Creator hasn't found the path to it. In that case, click in the preferences window on the side menu item `CMake`, then on the tab `Tools` in the center content view, and finally on the button `Add` to set the path to your installed CMake.  Double-check that the right CMake version is configured:  Click on `QT Creator` -> `Preferences` and click on the side menu on `Kits`. Under the center content view's `Kits` tab, you'll find an entry for `CMake Tool`. If the default selected CMake version is lower than 3.25.0, install on your system CMake >= 3.25.0 and choose `System CMake at <path>` from the drop-down list. If this entry is missing, you either have not installed CMake yet or QT Creator hasn't found the path to it. In that case, click in the preferences window on the side menu item `CMake`, then on the tab `Tools` in the center content view, and finally on the button `Add` to set the path to your installed CMake. 
@@ -142,10 +179,11 @@ GPL v3.0
## Donate ## Donate
Bitcoin: bc1qn9rhsffuxwnhcuuu4qzrwp4upkrq94xnh8r26u Patreon: [https://www.patreon.com/amneziavpn](https://www.patreon.com/amneziavpn)
USDT BEP20: 0x6abD576765a826f87D1D95183438f9408C901bE4 <br>
USDT TRC20: TELAitazF1MZGmiNjTcnxDjEiH5oe7LC9d <br>
XMR: 48spms39jt1L2L5vyw2RQW6CXD6odUd4jFu19GZcDyKKQV9U88wsJVjSbL4CfRys37jVMdoaWVPSvezCQPhHXUW5UKLqUp3 XMR: 48spms39jt1L2L5vyw2RQW6CXD6odUd4jFu19GZcDyKKQV9U88wsJVjSbL4CfRys37jVMdoaWVPSvezCQPhHXUW5UKLqUp3
payeer.com: P2561305
ko-fi.com: [https://ko-fi.com/amnezia_vpn](https://ko-fi.com/amnezia_vpn)
## Acknowledgments ## Acknowledgments
+4 -1
View File
@@ -157,16 +157,19 @@ void AmneziaApplication::init()
connect(this, &AmneziaApplication::translationsUpdated, m_notificationHandler.get(), &NotificationHandler::onTranslationsUpdated); connect(this, &AmneziaApplication::translationsUpdated, m_notificationHandler.get(), &NotificationHandler::onTranslationsUpdated);
#endif #endif
m_engine->addImportPath("qrc:/ui/qml/Modules/");
m_engine->load(url); m_engine->load(url);
m_systemController->setQmlRoot(m_engine->rootObjects().value(0)); m_systemController->setQmlRoot(m_engine->rootObjects().value(0));
bool enabled = m_settings->isSaveLogs();
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
if (m_settings->isSaveLogs()) { if (enabled) {
if (!Logger::init()) { if (!Logger::init()) {
qWarning() << "Initialization of debug subsystem failed"; qWarning() << "Initialization of debug subsystem failed";
} }
} }
#endif #endif
Logger::setServiceLogsEnabled(enabled);
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (m_parser.isSet("a")) if (m_parser.isSet("a"))
+6
View File
@@ -11,6 +11,9 @@
<uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.any" android:required="false" /> <uses-feature android:name="android.hardware.camera.any" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<!-- for TV -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<!-- The following comment will be replaced upon deployment with default features based on the dependencies <!-- The following comment will be replaced upon deployment with default features based on the dependencies
of the application. Remove the comment if you do not require these default features. --> of the application. Remove the comment if you do not require these default features. -->
@@ -31,9 +34,11 @@
android:label="-- %%INSERT_APP_NAME%% --" android:label="-- %%INSERT_APP_NAME%% --"
android:icon="@mipmap/icon" android:icon="@mipmap/icon"
android:roundIcon="@mipmap/icon_round" android:roundIcon="@mipmap/icon_round"
android:banner="@mipmap/ic_banner"
android:theme="@style/NoActionBar" android:theme="@style/NoActionBar"
android:fullBackupContent="@xml/backup_content" android:fullBackupContent="@xml/backup_content"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:hasFragileUserData="false"
tools:targetApi="s"> tools:targetApi="s">
<activity <activity
@@ -47,6 +52,7 @@
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_banner_background"/>
<foreground android:drawable="@mipmap/ic_banner_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_banner_background">#1E1E1F</color>
</resources>
@@ -1,6 +1,7 @@
package org.amnezia.vpn package org.amnezia.vpn
import android.Manifest import android.Manifest
import android.annotation.SuppressLint
import android.app.AlertDialog import android.app.AlertDialog
import android.app.NotificationManager import android.app.NotificationManager
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
@@ -230,7 +231,10 @@ class AmneziaActivity : QtActivity() {
override fun onStop() { override fun onStop() {
Log.d(TAG, "Stop Amnezia activity") Log.d(TAG, "Stop Amnezia activity")
doUnbindService() doUnbindService()
mainScope.launch {
qtInitialized.await()
QtAndroidController.onServiceDisconnected() QtAndroidController.onServiceDisconnected()
}
super.onStop() super.onStop()
} }
@@ -384,7 +388,8 @@ class AmneziaActivity : QtActivity() {
getVpnProto(vpnConfig)?.let { proto -> getVpnProto(vpnConfig)?.let { proto ->
Log.d(TAG, "Proto from config: $proto, current proto: $vpnProto") Log.d(TAG, "Proto from config: $proto, current proto: $vpnProto")
if (isServiceConnected) { if (isServiceConnected) {
if (proto == vpnProto) { if (proto.serviceClass == vpnProto?.serviceClass) {
vpnProto = proto
connectToVpn(vpnConfig) connectToVpn(vpnConfig)
return return
} }
@@ -541,7 +546,7 @@ class AmneziaActivity : QtActivity() {
} }
}.also { }.also {
startActivityForResult(it, OPEN_FILE_ACTION_CODE, ActivityResultHandler( startActivityForResult(it, OPEN_FILE_ACTION_CODE, ActivityResultHandler(
onSuccess = { onAny = {
val uri = it?.data?.toString() ?: "" val uri = it?.data?.toString() ?: ""
Log.d(TAG, "Open file: $uri") Log.d(TAG, "Open file: $uri")
mainScope.launch { mainScope.launch {
@@ -555,8 +560,12 @@ class AmneziaActivity : QtActivity() {
} }
@Suppress("unused") @Suppress("unused")
@SuppressLint("UnsupportedChromeOsCameraSystemFeature")
fun isCameraPresent(): Boolean = applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA) fun isCameraPresent(): Boolean = applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)
@Suppress("unused")
fun isOnTv(): Boolean = applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)
@Suppress("unused") @Suppress("unused")
fun startQrCodeReader() { fun startQrCodeReader() {
Log.v(TAG, "Start camera") Log.v(TAG, "Start camera")
@@ -49,7 +49,15 @@ enum class VpnProto(
"org.amnezia.vpn:amneziaXrayService", "org.amnezia.vpn:amneziaXrayService",
XrayService::class.java XrayService::class.java
) { ) {
override fun createProtocol(): Protocol = Xray() override fun createProtocol(): Protocol = Xray.instance
},
SSXRAY(
"SSXRay",
"org.amnezia.vpn:amneziaXrayService",
XrayService::class.java
) {
override fun createProtocol(): Protocol = Xray.instance
}; };
private var _protocol: Protocol? = null private var _protocol: Protocol? = null
@@ -88,18 +88,26 @@ class NetworkState(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
connectivityManager.registerBestMatchingNetworkCallback(networkRequest, networkCallback, handler) connectivityManager.registerBestMatchingNetworkCallback(networkRequest, networkCallback, handler)
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val numberAttempts = 3
var attemptCount = 0
while(true) {
try { try {
connectivityManager.requestNetwork(networkRequest, networkCallback, handler) connectivityManager.requestNetwork(networkRequest, networkCallback, handler)
break
} catch (e: SecurityException) { } catch (e: SecurityException) {
Log.e(TAG, "Failed to bind network listener: $e") Log.e(TAG, "Failed to bind network listener: $e")
// Android 11 bug: https://issuetracker.google.com/issues/175055271 // Android 11 bug: https://issuetracker.google.com/issues/175055271
if (e.message?.startsWith("Package android does not belong to") == true) { if (e.message?.startsWith("Package android does not belong to") == true) {
if (++attemptCount > numberAttempts) {
throw e
}
delay(1000) delay(1000)
connectivityManager.requestNetwork(networkRequest, networkCallback, handler) continue
} else { } else {
throw e throw e
} }
} }
}
} else { } else {
connectivityManager.requestNetwork(networkRequest, networkCallback) connectivityManager.requestNetwork(networkRequest, networkCallback)
} }
+11 -9
View File
@@ -5,6 +5,7 @@ import android.net.VpnService.Builder
import java.io.File import java.io.File
import java.io.IOException import java.io.IOException
import go.Seq import go.Seq
import org.amnezia.vpn.protocol.BadConfigException
import org.amnezia.vpn.protocol.Protocol import org.amnezia.vpn.protocol.Protocol
import org.amnezia.vpn.protocol.ProtocolState.CONNECTED import org.amnezia.vpn.protocol.ProtocolState.CONNECTED
import org.amnezia.vpn.protocol.ProtocolState.DISCONNECTED import org.amnezia.vpn.protocol.ProtocolState.DISCONNECTED
@@ -114,17 +115,14 @@ class Xray : Protocol() {
return return
} }
val xrayJsonConfig = config.getJSONObject("xray_config_data") val xrayJsonConfig = config.optJSONObject("xray_config_data")
?: config.optJSONObject("ssxray_config_data")
?: throw BadConfigException("config_data not found")
val xrayConfig = parseConfig(config, xrayJsonConfig) val xrayConfig = parseConfig(config, xrayJsonConfig)
// for debug (xrayJsonConfig.optJSONObject("log") ?: JSONObject().also { xrayJsonConfig.put("log", it) })
// xrayJsonConfig.getJSONObject("log").put("loglevel", "debug") .put("loglevel", "warning")
xrayJsonConfig.getJSONObject("log").put("loglevel", "warning") .put("access", "none") // disable access log
// disable access log
xrayJsonConfig.getJSONObject("log").put("access", "none")
// replace socks address
// (xrayJsonConfig.getJSONArray("inbounds")[0] as JSONObject).put("listen", "::1")
start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect) start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect)
state.value = CONNECTED state.value = CONNECTED
@@ -228,6 +226,10 @@ class Xray : Protocol() {
throw VpnStartException("Failed to start tun2socks: $err") throw VpnStartException("Failed to start tun2socks: $err")
} }
} }
companion object {
val instance: Xray by lazy { Xray() }
}
} }
private fun String?.isNotNullOrBlank(block: (String) -> Unit) { private fun String?.isNotNullOrBlank(block: (String) -> Unit) {
@@ -119,18 +119,21 @@ QString OpenVpnConfigurator::processConfigWithLocalSettings(const QPair<QString,
if (!m_settings->isSitesSplitTunnelingEnabled()) { if (!m_settings->isSitesSplitTunnelingEnabled()) {
config.append("\nredirect-gateway def1 ipv6 bypass-dhcp\n"); config.append("\nredirect-gateway def1 ipv6 bypass-dhcp\n");
#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
// Prevent ipv6 leak // Prevent ipv6 leak
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n"); config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
#endif
config.append("block-ipv6\n"); config.append("block-ipv6\n");
} else if (m_settings->routeMode() == Settings::VpnOnlyForwardSites) { } else if (m_settings->routeMode() == Settings::VpnOnlyForwardSites) {
// no redirect-gateway // no redirect-gateway
} else if (m_settings->routeMode() == Settings::VpnAllExceptSites) { } else if (m_settings->routeMode() == Settings::VpnAllExceptSites) {
#ifndef Q_OS_ANDROID #if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
config.append("\nredirect-gateway ipv6 !ipv4 bypass-dhcp\n"); config.append("\nredirect-gateway ipv6 !ipv4 bypass-dhcp\n");
#endif
// Prevent ipv6 leak // Prevent ipv6 leak
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n"); config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
#endif
config.append("block-ipv6\n"); config.append("block-ipv6\n");
} }
} }
+5 -4
View File
@@ -90,13 +90,13 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
{ {
return { { DockerContainer::None, "Not installed" }, return { { DockerContainer::None, "Not installed" },
{ DockerContainer::OpenVpn, "OpenVPN" }, { DockerContainer::OpenVpn, "OpenVPN" },
{ DockerContainer::ShadowSocks, "ShadowSocks" }, { DockerContainer::ShadowSocks, "OpenVPN over SS" },
{ DockerContainer::Cloak, "OpenVPN over Cloak" }, { DockerContainer::Cloak, "OpenVPN over Cloak" },
{ DockerContainer::WireGuard, "WireGuard" }, { DockerContainer::WireGuard, "WireGuard" },
{ DockerContainer::Awg, "AmneziaWG" }, { DockerContainer::Awg, "AmneziaWG" },
{ DockerContainer::Xray, "XRay" }, { DockerContainer::Xray, "XRay" },
{ DockerContainer::Ipsec, QObject::tr("IPsec") }, { DockerContainer::Ipsec, QObject::tr("IPsec") },
{ DockerContainer::SSXray, "ShadowSocks"}, { DockerContainer::SSXray, "Shadowsocks"},
{ DockerContainer::TorWebSite, QObject::tr("Website in Tor network") }, { DockerContainer::TorWebSite, QObject::tr("Website in Tor network") },
{ DockerContainer::Dns, QObject::tr("AmneziaDNS") }, { DockerContainer::Dns, QObject::tr("AmneziaDNS") },
@@ -286,8 +286,8 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
case DockerContainer::OpenVpn: return true; case DockerContainer::OpenVpn: return true;
case DockerContainer::Awg: return true; case DockerContainer::Awg: return true;
case DockerContainer::Xray: return true; case DockerContainer::Xray: return true;
case DockerContainer::Cloak: case DockerContainer::Cloak: return true;
return true; case DockerContainer::SSXray: return true;
// case DockerContainer::ShadowSocks: return true; // case DockerContainer::ShadowSocks: return true;
default: return false; default: return false;
} }
@@ -306,6 +306,7 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
case DockerContainer::Awg: return true; case DockerContainer::Awg: return true;
case DockerContainer::Cloak: return true; case DockerContainer::Cloak: return true;
case DockerContainer::Xray: return true; case DockerContainer::Xray: return true;
case DockerContainer::SSXray: return true;
default: return false; default: return false;
} }
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.
@@ -91,6 +91,7 @@ target_sources(networkextension PRIVATE
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+OpenVPN.swift ${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+OpenVPN.swift
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+Xray.swift ${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+Xray.swift
${CLIENT_ROOT_DIR}/platforms/ios/WGConfig.swift ${CLIENT_ROOT_DIR}/platforms/ios/WGConfig.swift
${CLIENT_ROOT_DIR}/platforms/ios/XrayConfig.swift
${CLIENT_ROOT_DIR}/platforms/ios/iosglue.mm ${CLIENT_ROOT_DIR}/platforms/ios/iosglue.mm
) )
+30 -2
View File
@@ -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;
} }
@@ -95,6 +99,29 @@ void Logger::deInit()
m_file.close(); m_file.close();
} }
bool Logger::setServiceLogsEnabled(bool enabled) {
#ifdef AMNEZIA_DESKTOP
IpcClient *m_IpcClient = new IpcClient;
if (!m_IpcClient->isSocketConnected()) {
if (!IpcClient::init(m_IpcClient)) {
qWarning() << "Error occurred when init IPC client";
return false;
}
}
if (m_IpcClient->Interface()) {
m_IpcClient->Interface()->setLogsEnabled(enabled);
}
else {
qWarning() << "Error occurred setting up service logs";
return false;
}
#endif
return true;
}
QString Logger::userLogsDir() QString Logger::userLogsDir()
{ {
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/log"; return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/log";
@@ -137,7 +164,9 @@ bool Logger::openLogsFolder()
bool Logger::openServiceLogsFolder() bool Logger::openServiceLogsFolder()
{ {
QString path = Utils::systemLogPath(); QString path = Utils::systemLogPath();
#ifdef Q_OS_WIN
path = "file:///" + path; path = "file:///" + path;
#endif
QDesktopServices::openUrl(QUrl::fromLocalFile(path)); QDesktopServices::openUrl(QUrl::fromLocalFile(path));
return true; return true;
} }
@@ -180,8 +209,7 @@ void Logger::clearServiceLogs()
} }
if (m_IpcClient->Interface()) { if (m_IpcClient->Interface()) {
m_IpcClient->Interface()->setLogsEnabled(false); m_IpcClient->Interface()->clearLogs();
m_IpcClient->Interface()->cleanUp();
} }
else { else {
qWarning() << "Error occurred cleaning up service logs"; qWarning() << "Error occurred cleaning up service logs";
+1
View File
@@ -26,6 +26,7 @@ public:
static bool init(); static bool init();
static void deInit(); static void deInit();
static bool setServiceLogsEnabled(bool enabled);
static bool openLogsFolder(); static bool openLogsFolder();
static bool openServiceLogsFolder(); static bool openServiceLogsFolder();
static QString appLogFileNamePath(); static QString appLogFileNamePath();
@@ -179,6 +179,11 @@ bool AndroidController::isCameraPresent()
return callActivityMethod<jboolean>("isCameraPresent", "()Z"); return callActivityMethod<jboolean>("isCameraPresent", "()Z");
} }
bool AndroidController::isOnTv()
{
return callActivityMethod<jboolean>("isOnTv", "()Z");
}
void AndroidController::startQrReaderActivity() void AndroidController::startQrReaderActivity()
{ {
callActivityMethod("startQrCodeReader", "()V"); callActivityMethod("startQrCodeReader", "()V");
@@ -35,6 +35,7 @@ public:
void saveFile(const QString &fileName, const QString &data); void saveFile(const QString &fileName, const QString &data);
QString openFile(const QString &filter); QString openFile(const QString &filter);
bool isCameraPresent(); bool isCameraPresent();
bool isOnTv();
void startQrReaderActivity(); void startQrReaderActivity();
void setSaveLogs(bool enabled); void setSaveLogs(bool enabled);
void exportLogsFile(const QString &fileName); void exportLogsFile(const QString &fileName);
@@ -4,6 +4,7 @@ import WireGuardKitGo
enum XrayErrors: Error { enum XrayErrors: Error {
case noXrayConfig case noXrayConfig
case xrayConfigIsWrong
case cantSaveXrayConfig case cantSaveXrayConfig
case cantParseListenAndPort case cantParseListenAndPort
case cantSaveHevSocksConfig case cantSaveHevSocksConfig
@@ -26,14 +27,14 @@ extension PacketTunnelProvider {
// Xray configuration // Xray configuration
guard let protocolConfiguration = self.protocolConfiguration as? NETunnelProviderProtocol, guard let protocolConfiguration = self.protocolConfiguration as? NETunnelProviderProtocol,
let providerConfiguration = protocolConfiguration.providerConfiguration, let providerConfiguration = protocolConfiguration.providerConfiguration,
let xrayConfigData = providerConfiguration[Constants.xrayConfigKey] as? Data else { let configData = providerConfiguration[Constants.xrayConfigKey] as? Data else {
xrayLog(.error, message: "Can't get xray configuration") xrayLog(.error, message: "Can't get xray configuration")
completionHandler(XrayErrors.noXrayConfig) completionHandler(XrayErrors.noXrayConfig)
return return
} }
// Tunnel settings // Tunnel settings
let ipv6Enabled = true let ipv6Enabled = false
let hideVPNIcon = false let hideVPNIcon = false
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "254.1.1.1") let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "254.1.1.1")
@@ -57,12 +58,29 @@ extension PacketTunnelProvider {
return settings return settings
}() }()
let dns = ["8.8.4.4","1.1.1.1"]
settings.dnsSettings = NEDNSSettings(servers: dns)
do { do {
let port = 10808 let xrayConfig = try JSONDecoder().decode(XrayConfig.self,
let address = "::1" from: configData)
var dnsArray = [String]()
if let dns1 = xrayConfig.dns1 {
dnsArray.append(dns1)
}
if let dns2 = xrayConfig.dns2 {
dnsArray.append(dns2)
}
settings.dnsSettings = !dnsArray.isEmpty
? NEDNSSettings(servers: dnsArray)
: NEDNSSettings(servers: ["1.1.1.1"])
let xrayConfigData = xrayConfig.config.data(using: .utf8)
guard let xrayConfigData else {
xrayLog(.error, message: "Can't encode config to data")
completionHandler(XrayErrors.xrayConfigIsWrong)
return
}
let jsonDict = try JSONSerialization.jsonObject(with: xrayConfigData, let jsonDict = try JSONSerialization.jsonObject(with: xrayConfigData,
options: []) as? [String: Any] options: []) as? [String: Any]
@@ -73,6 +91,9 @@ extension PacketTunnelProvider {
return return
} }
let port = 10808
let address = "::1"
if var inboundsArray = jsonDict["inbounds"] as? [[String: Any]], !inboundsArray.isEmpty { if var inboundsArray = jsonDict["inbounds"] as? [[String: Any]], !inboundsArray.isEmpty {
inboundsArray[0]["port"] = port inboundsArray[0]["port"] = port
inboundsArray[0]["listen"] = address inboundsArray[0]["listen"] = address
+7
View File
@@ -0,0 +1,7 @@
import Foundation
struct XrayConfig: Decodable {
let dns1: String?
let dns2: String?
let config: String
}
+1
View File
@@ -73,6 +73,7 @@ private:
bool setupWireGuard(); bool setupWireGuard();
bool setupAwg(); bool setupAwg();
bool setupXray(); bool setupXray();
bool setupSSXray();
bool startOpenVPN(const QString &config); bool startOpenVPN(const QString &config);
bool startWireGuard(const QString &jsonConfig); bool startWireGuard(const QString &jsonConfig);
+31 -1
View File
@@ -219,6 +219,9 @@ bool IosController::connectVpn(amnezia::Proto proto, const QJsonObject& configur
if (proto == amnezia::Proto::Xray) { if (proto == amnezia::Proto::Xray) {
return setupXray(); return setupXray();
} }
if (proto == amnezia::Proto::SSXray) {
return setupSSXray();
}
return false; return false;
} }
@@ -508,9 +511,36 @@ bool IosController::setupXray()
{ {
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::Xray)].toObject(); QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::Xray)].toObject();
QJsonDocument xrayConfigDoc(config); QJsonDocument xrayConfigDoc(config);
QString xrayConfigStr(xrayConfigDoc.toJson(QJsonDocument::Compact)); QString xrayConfigStr(xrayConfigDoc.toJson(QJsonDocument::Compact));
return startXray(xrayConfigStr); QJsonObject finalConfig;
finalConfig.insert(config_key::dns1, m_rawConfig[config_key::dns1].toString());
finalConfig.insert(config_key::dns2, m_rawConfig[config_key::dns2].toString());
finalConfig.insert(config_key::config, xrayConfigStr);
QJsonDocument finalConfigDoc(finalConfig);
QString finalConfigStr(finalConfigDoc.toJson(QJsonDocument::Compact));
return startXray(finalConfigStr);
}
bool IosController::setupSSXray()
{
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::SSXray)].toObject();
QJsonDocument ssXrayConfigDoc(config);
QString ssXrayConfigStr(ssXrayConfigDoc.toJson(QJsonDocument::Compact));
QJsonObject finalConfig;
finalConfig.insert(config_key::dns1, m_rawConfig[config_key::dns1]);
finalConfig.insert(config_key::dns2, m_rawConfig[config_key::dns2]);
finalConfig.insert(config_key::config, ssXrayConfigStr);
QJsonDocument finalConfigDoc(finalConfig);
QString finalConfigStr(finalConfigDoc.toJson(QJsonDocument::Compact));
return startXray(finalConfigStr);
} }
bool IosController::setupAwg() bool IosController::setupAwg()
@@ -139,7 +139,7 @@ bool WireguardUtilsLinux::addInterface(const InterfaceConfig& config) {
if (config.m_killSwitchEnabled) { if (config.m_killSwitchEnabled) {
FirewallParams params { }; FirewallParams params { };
params.dnsServers.append(config.m_dnsServer); params.dnsServers.append(config.m_dnsServer);
if (config.m_allowedIPAddressRanges.at(0).toString() == "0.0.0.0/0"){ if (config.m_allowedIPAddressRanges.contains(IPAddress("0.0.0.0/0"))) {
params.blockAll = true; params.blockAll = true;
if (config.m_excludedAddresses.size()) { if (config.m_excludedAddresses.size()) {
params.allowNets = true; params.allowNets = true;
@@ -137,7 +137,8 @@ bool WireguardUtilsMacos::addInterface(const InterfaceConfig& config) {
if (config.m_killSwitchEnabled) { if (config.m_killSwitchEnabled) {
FirewallParams params { }; FirewallParams params { };
params.dnsServers.append(config.m_dnsServer); params.dnsServers.append(config.m_dnsServer);
if (config.m_allowedIPAddressRanges.at(0).toString() == "0.0.0.0/0"){
if (config.m_allowedIPAddressRanges.contains(IPAddress("0.0.0.0/0"))) {
params.blockAll = true; params.blockAll = true;
if (config.m_excludedAddresses.size()) { if (config.m_excludedAddresses.size()) {
params.allowNets = true; params.allowNets = true;
+2 -2
View File
@@ -65,14 +65,14 @@ QString ProtocolProps::transportProtoToString(TransportProto proto, Proto p)
QMap<amnezia::Proto, QString> ProtocolProps::protocolHumanNames() QMap<amnezia::Proto, QString> ProtocolProps::protocolHumanNames()
{ {
return { { Proto::OpenVpn, "OpenVPN" }, return { { Proto::OpenVpn, "OpenVPN" },
{ Proto::ShadowSocks, "ShadowSocks" }, { Proto::ShadowSocks, "Shadowsocks" },
{ Proto::Cloak, "Cloak" }, { Proto::Cloak, "Cloak" },
{ Proto::WireGuard, "WireGuard" }, { Proto::WireGuard, "WireGuard" },
{ Proto::Awg, "AmneziaWG" }, { Proto::Awg, "AmneziaWG" },
{ Proto::Ikev2, "IKEv2" }, { Proto::Ikev2, "IKEv2" },
{ Proto::L2tp, "L2TP" }, { Proto::L2tp, "L2TP" },
{ Proto::Xray, "XRay" }, { Proto::Xray, "XRay" },
{ Proto::SSXray, "ShadowSocks"}, { Proto::SSXray, "Shadowsocks"},
{ Proto::TorWebSite, "Website in Tor network" }, { Proto::TorWebSite, "Website in Tor network" },
+3 -11
View File
@@ -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,9 @@
<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/AmneziaStyle.qml</file>
<file>ui/qml/Pages2/PageServiceSocksProxySettings.qml</file> <file>ui/qml/Pages2/PageServiceSocksProxySettings.qml</file>
<file>server_scripts/socks5_proxy/run_container.sh</file> <file>server_scripts/socks5_proxy/run_container.sh</file>
<file>server_scripts/socks5_proxy/Dockerfile</file> <file>server_scripts/socks5_proxy/Dockerfile</file>
+2
View File
@@ -226,6 +226,8 @@ void Settings::setSaveLogs(bool enabled)
} }
} }
#endif #endif
Logger::setServiceLogsEnabled(enabled);
if (enabled) { if (enabled) {
setLogEnableDate(QDateTime::currentDateTime()); setLogEnableDate(QDateTime::currentDateTime());
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -240,9 +240,9 @@ void ImportController::processNativeWireGuardConfig()
auto containerConfig = container.value(ContainerProps::containerTypeToString(DockerContainer::WireGuard)).toObject(); auto containerConfig = container.value(ContainerProps::containerTypeToString(DockerContainer::WireGuard)).toObject();
auto protocolConfig = QJsonDocument::fromJson(containerConfig.value(config_key::last_config).toString().toUtf8()).object(); auto protocolConfig = QJsonDocument::fromJson(containerConfig.value(config_key::last_config).toString().toUtf8()).object();
QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(3, 10)); QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(2, 5));
QString junkPacketMinSize = QString::number(50); QString junkPacketMinSize = QString::number(10);
QString junkPacketMaxSize = QString::number(1000); QString junkPacketMaxSize = QString::number(50);
protocolConfig[config_key::junkPacketCount] = junkPacketCount; protocolConfig[config_key::junkPacketCount] = junkPacketCount;
protocolConfig[config_key::junkPacketMinSize] = junkPacketMinSize; protocolConfig[config_key::junkPacketMinSize] = junkPacketMinSize;
protocolConfig[config_key::junkPacketMaxSize] = junkPacketMaxSize; protocolConfig[config_key::junkPacketMaxSize] = junkPacketMaxSize;
+3 -3
View File
@@ -85,9 +85,9 @@ void InstallController::install(DockerContainer container, int port, TransportPr
containerConfig.insert(config_key::transport_proto, ProtocolProps::transportProtoToString(transportProto, protocol)); containerConfig.insert(config_key::transport_proto, ProtocolProps::transportProtoToString(transportProto, protocol));
if (container == DockerContainer::Awg) { if (container == DockerContainer::Awg) {
QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(3, 10)); QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(2, 5));
QString junkPacketMinSize = QString::number(50); QString junkPacketMinSize = QString::number(10);
QString junkPacketMaxSize = QString::number(1000); QString junkPacketMaxSize = QString::number(50);
int s1 = QRandomGenerator::global()->bounded(15, 150); int s1 = QRandomGenerator::global()->bounded(15, 150);
int s2 = QRandomGenerator::global()->bounded(15, 150); int s2 = QRandomGenerator::global()->bounded(15, 150);
+3 -3
View 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;
} }
} }
+11 -10
View File
@@ -6,13 +6,14 @@ import Qt5Compat.GraphicalEffects
import ConnectionState 1.0 import ConnectionState 1.0
import PageEnum 1.0 import PageEnum 1.0
import Style 1.0
Button { Button {
id: root id: root
property string defaultButtonColor: "#D7D8DB" property string defaultButtonColor: AmneziaStyle.color.white
property string progressButtonColor: "#D7D8DB" property string progressButtonColor: AmneziaStyle.color.white
property string connectedButtonColor: "#FBB26A" property string connectedButtonColor: AmneziaStyle.color.orange
implicitWidth: 190 implicitWidth: 190
implicitHeight: 190 implicitHeight: 190
@@ -49,13 +50,13 @@ Button {
verticalOffset: 0 verticalOffset: 0
radius: 10 radius: 10
samples: 25 samples: 25
color: root.activeFocus ? "#D7D8DB" : "#FBB26A" color: root.activeFocus ? AmneziaStyle.color.white : AmneziaStyle.color.orange
source: backgroundCircle source: backgroundCircle
} }
ShapePath { ShapePath {
fillColor: "transparent" fillColor: AmneziaStyle.color.transparent
strokeColor: "#D7D8DB" strokeColor: AmneziaStyle.color.white
strokeWidth: root.activeFocus ? 1 : 0 strokeWidth: root.activeFocus ? 1 : 0
capStyle: ShapePath.RoundCap capStyle: ShapePath.RoundCap
@@ -70,10 +71,10 @@ Button {
} }
ShapePath { ShapePath {
fillColor: "transparent" fillColor: AmneziaStyle.color.transparent
strokeColor: { strokeColor: {
if (ConnectionController.isConnectionInProgress) { if (ConnectionController.isConnectionInProgress) {
return "#261E1A" return AmneziaStyle.color.connectionInProgress
} else if (ConnectionController.isConnected) { } else if (ConnectionController.isConnected) {
return connectedButtonColor return connectedButtonColor
} else { } else {
@@ -113,8 +114,8 @@ Button {
visible: ConnectionController.isConnectionInProgress visible: ConnectionController.isConnectionInProgress
ShapePath { ShapePath {
fillColor: "transparent" fillColor: AmneziaStyle.color.transparent
strokeColor: "#D7D8DB" strokeColor: AmneziaStyle.color.white
strokeWidth: 3 strokeWidth: 3
capStyle: ShapePath.RoundCap capStyle: ShapePath.RoundCap
@@ -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
@@ -8,6 +8,7 @@ import "../Controls2/TextTypes"
import SortFilterProxyModel 0.2 import SortFilterProxyModel 0.2
import InstalledAppsModel 1.0 import InstalledAppsModel 1.0
import Style 1.0
DrawerType2 { DrawerType2 {
id: root id: root
@@ -133,7 +134,7 @@ DrawerType2 {
anchors.rightMargin: 16 anchors.rightMargin: 16
anchors.leftMargin: 16 anchors.leftMargin: 16
backgroundColor: "#2C2D30" backgroundColor: AmneziaStyle.color.greyDark
textFieldPlaceholderText: qsTr("application name") textFieldPlaceholderText: qsTr("application name")
} }
+7 -5
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "../Controls2" import "../Controls2"
import "../Controls2/TextTypes" import "../Controls2/TextTypes"
@@ -86,11 +88,11 @@ DrawerType2 {
Layout.rightMargin: 16 Layout.rightMargin: 16
Layout.leftMargin: 16 Layout.leftMargin: 16
defaultColor: "transparent" defaultColor: AmneziaStyle.color.transparent
hoveredColor: Qt.rgba(1, 1, 1, 0.08) hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: Qt.rgba(1, 1, 1, 0.12) pressedColor: AmneziaStyle.color.blackPressed
disabledColor: "#878B91" disabledColor: AmneziaStyle.color.grey
textColor: "#D7D8DB" textColor: AmneziaStyle.color.white
borderWidth: 1 borderWidth: 1
text: noButtonText text: noButtonText
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "../Controls2" import "../Controls2"
import "../Controls2/TextTypes" import "../Controls2/TextTypes"
import "../Config" import "../Config"
@@ -145,8 +147,8 @@ DrawerType2 {
indicator: Rectangle { indicator: Rectangle {
width: parent.width - 1 width: parent.width - 1
height: parent.height height: parent.height
color: radioButton.hovered ? "#2C2D30" : "#1C1D21" color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
border.color: radioButton.focus ? "#D7D8DB" : "transparent" border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
border.width: radioButton.focus ? 1 : 0 border.width: radioButton.focus ? 1 : 0
Behavior on color { Behavior on color {
@@ -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)
} }
@@ -9,6 +9,7 @@ import SortFilterProxyModel 0.2
import PageEnum 1.0 import PageEnum 1.0
import ContainerProps 1.0 import ContainerProps 1.0
import Style 1.0
import "./" import "./"
import "../Controls2" import "../Controls2"
@@ -111,11 +112,11 @@ DrawerType2 {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8 Layout.topMargin: 8
defaultColor: "transparent" defaultColor: AmneziaStyle.color.transparent
hoveredColor: Qt.rgba(1, 1, 1, 0.08) hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: Qt.rgba(1, 1, 1, 0.12) pressedColor: AmneziaStyle.color.blackPressed
disabledColor: "#878B91" disabledColor: AmneziaStyle.color.grey
textColor: "#D7D8DB" textColor: AmneziaStyle.color.white
borderWidth: 1 borderWidth: 1
text: qsTr("Copy") text: qsTr("Copy")
@@ -134,11 +135,11 @@ DrawerType2 {
visible: false visible: false
defaultColor: "transparent" defaultColor: AmneziaStyle.color.transparent
hoveredColor: Qt.rgba(1, 1, 1, 0.08) hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: Qt.rgba(1, 1, 1, 0.12) pressedColor: AmneziaStyle.color.blackPressed
disabledColor: "#878B91" disabledColor: AmneziaStyle.color.grey
textColor: "#D7D8DB" textColor: AmneziaStyle.color.white
borderWidth: 1 borderWidth: 1
text: qsTr("Copy config string") text: qsTr("Copy config string")
@@ -153,11 +154,11 @@ DrawerType2 {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24 Layout.topMargin: 24
defaultColor: "transparent" defaultColor: AmneziaStyle.color.transparent
hoveredColor: Qt.rgba(1, 1, 1, 0.08) hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: Qt.rgba(1, 1, 1, 0.12) pressedColor: AmneziaStyle.color.blackPressed
disabledColor: "#878B91" disabledColor: AmneziaStyle.color.grey
textColor: "#D7D8DB" textColor: AmneziaStyle.color.white
borderWidth: 1 borderWidth: 1
text: qsTr("Show connection settings") text: qsTr("Show connection settings")
@@ -281,9 +282,9 @@ DrawerType2 {
readOnly: true readOnly: true
activeFocusOnTab: false activeFocusOnTab: false
color: "#D7D8DB" color: AmneziaStyle.color.white
selectionColor: "#633303" selectionColor: AmneziaStyle.color.brown
selectedTextColor: "#D7D8DB" selectedTextColor: AmneziaStyle.color.white
font.pixelSize: 16 font.pixelSize: 16
font.weight: Font.Medium font.weight: Font.Medium
@@ -294,7 +295,7 @@ DrawerType2 {
wrapMode: Text.Wrap wrapMode: Text.Wrap
background: Rectangle { background: Rectangle {
color: "transparent" color: AmneziaStyle.color.transparent
} }
} }
} }
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "../Controls2" import "../Controls2"
import "../Controls2/TextTypes" import "../Controls2/TextTypes"
@@ -14,7 +16,7 @@ Rectangle {
implicitWidth: transportProtoButtonGroup.implicitWidth implicitWidth: transportProtoButtonGroup.implicitWidth
implicitHeight: transportProtoButtonGroup.implicitHeight implicitHeight: transportProtoButtonGroup.implicitHeight
color: "#1C1D21" color: AmneziaStyle.color.blackLight
radius: 16 radius: 16
onFocusChanged: { onFocusChanged: {
+4 -2
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import Style 1.0
Item { Item {
id: root id: root
@@ -28,7 +30,7 @@ Item {
ImageButtonType { ImageButtonType {
id: backButton id: backButton
image: backButtonImage image: backButtonImage
imageColor: "#D7D8DB" imageColor: AmneziaStyle.color.white
implicitWidth: 40 implicitWidth: 40
implicitHeight: 40 implicitHeight: 40
@@ -46,7 +48,7 @@ Item {
id: background id: background
Layout.fillWidth: true Layout.fillWidth: true
color: "transparent" color: AmneziaStyle.color.transparent
} }
} }
+15 -9
View File
@@ -3,20 +3,22 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes" import "TextTypes"
Button { Button {
id: root id: root
property string hoveredColor: "#C1C2C5" property string hoveredColor: AmneziaStyle.color.whiteHovered
property string defaultColor: "#D7D8DB" property string defaultColor: AmneziaStyle.color.white
property string disabledColor: "#494B50" property string disabledColor: AmneziaStyle.color.greyDisabled
property string pressedColor: "#979799" property string pressedColor: AmneziaStyle.color.grey
property string textColor: "#0E0E11" property string textColor: AmneziaStyle.color.black
property string borderColor: "#D7D8DB" property string borderColor: AmneziaStyle.color.white
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderWidth: 0 property int borderWidth: 0
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
@@ -30,6 +32,8 @@ Button {
property var clickedFunc property var clickedFunc
property alias buttonTextLabel: buttonText
implicitHeight: 56 implicitHeight: 56
hoverEnabled: true hoverEnabled: true
@@ -46,8 +50,8 @@ Button {
background: Rectangle { background: Rectangle {
id: focusBorder id: focusBorder
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
anchors.fill: parent anchors.fill: parent
@@ -138,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
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Shapes import QtQuick.Shapes
import Style 1.0
Popup { Popup {
id: root id: root
anchors.centerIn: parent anchors.centerIn: parent
@@ -16,7 +18,7 @@ Popup {
} }
background: Rectangle { background: Rectangle {
color: "transparent" color: AmneziaStyle.color.transparent
} }
BusyIndicator { BusyIndicator {
@@ -40,8 +42,8 @@ Popup {
layer.samples: 4 layer.samples: 4
ShapePath { ShapePath {
fillColor: "transparent" fillColor: AmneziaStyle.color.transparent
strokeColor: "#787878" strokeColor: AmneziaStyle.color.greyDisabled
strokeWidth: 3 strokeWidth: 3
capStyle: ShapePath.RoundCap capStyle: ShapePath.RoundCap
+13 -11
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
RadioButton { RadioButton {
id: root id: root
@@ -9,17 +11,17 @@ RadioButton {
property string bodyText property string bodyText
property string footerText property string footerText
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05) property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: Qt.rgba(1, 1, 1, 0) property string defaultColor: AmneziaStyle.color.transparent
property string disabledColor: Qt.rgba(1, 1, 1, 0) property string disabledColor: AmneziaStyle.color.transparent
property string pressedColor: Qt.rgba(1, 1, 1, 0.05) property string pressedColor: AmneziaStyle.color.blackPressed
property string selectedColor: Qt.rgba(1, 1, 1, 0) property string selectedColor: AmneziaStyle.color.transparent
property string textColor: "#0E0E11" property string textColor: AmneziaStyle.color.black
property string pressedBorderColor: Qt.rgba(251/255, 178/255, 106/255, 0.3) property string pressedBorderColor: Qt.rgba(251/255, 178/255, 106/255, 0.3)
property string selectedBorderColor: "#FBB26A" property string selectedBorderColor: AmneziaStyle.color.orange
property string defaultBodredColor: "transparent" property string defaultBodredColor: AmneziaStyle.color.transparent
property int borderWidth: 0 property int borderWidth: 0
implicitWidth: content.implicitWidth implicitWidth: content.implicitWidth
@@ -82,7 +84,7 @@ RadioButton {
Text { Text {
text: root.headerText text: root.headerText
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 25 font.pixelSize: 25
font.weight: 700 font.weight: 700
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -97,7 +99,7 @@ RadioButton {
Text { Text {
text: root.bodyText text: root.bodyText
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 16 font.pixelSize: 16
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -113,7 +115,7 @@ RadioButton {
text: root.footerText text: root.footerText
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
visible: root.footerText !== "" visible: root.footerText !== ""
color: "#878B91" color: AmneziaStyle.color.grey
font.pixelSize: 13 font.pixelSize: 13
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
+20 -18
View File
@@ -3,32 +3,34 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes" import "TextTypes"
CheckBox { CheckBox {
id: root id: root
property string descriptionText property string descriptionText
property string descriptionTextColor: "#878B91" property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: "#494B50" property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string textColor: "#D7D8DB" property string textColor: AmneziaStyle.color.white
property string textDisabledColor: "#878B91" property string textDisabledColor: AmneziaStyle.color.grey
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05) property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: "transparent" property string defaultColor: AmneziaStyle.color.transparent
property string pressedColor: Qt.rgba(1, 1, 1, 0.05) property string pressedColor: AmneziaStyle.color.blackPressed
property string defaultBorderColor: "#D7D8DB" property string defaultBorderColor: AmneziaStyle.color.white
property string checkedBorderColor: "#FBB26A" property string checkedBorderColor: AmneziaStyle.color.orange
property string checkedBorderDisabledColor: "#402102" property string checkedBorderDisabledColor: AmneziaStyle.color.brownDark
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property string checkedImageColor: "#FBB26A" property string checkedImageColor: AmneziaStyle.color.orange
property string pressedImageColor: "#A85809" property string pressedImageColor: AmneziaStyle.color.orangeDark
property string defaultImageColor: "transparent" property string defaultImageColor: AmneziaStyle.color.transparent
property string checkedDisabledImageColor: "#84603D" property string checkedDisabledImageColor: AmneziaStyle.color.brownLight
property string imageSource: "qrc:/images/controls/check.svg" property string imageSource: "qrc:/images/controls/check.svg"
@@ -45,8 +47,8 @@ CheckBox {
focusPolicy: Qt.NoFocus focusPolicy: Qt.NoFocus
background: Rectangle { background: Rectangle {
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.focus ? borderFocusedColor : "transparent" border.color: root.focus ? borderFocusedColor : AmneziaStyle.color.transparent
border.width: 1 border.width: 1
radius: 16 radius: 16
} }
@@ -77,7 +79,7 @@ CheckBox {
anchors.centerIn: parent anchors.centerIn: parent
width: 24 width: 24
height: 24 height: 24
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.checked ? border.color: root.checked ?
(root.enabled ? (root.enabled ?
checkedBorderColor : checkedBorderColor :
+2 -1
View File
@@ -20,7 +20,8 @@ Menu {
MenuItem { MenuItem {
text: qsTr("&Paste") text: qsTr("&Paste")
shortcut: StandardKey.Paste shortcut: StandardKey.Paste
enabled: textObj.canPaste // Fix calling paste from clipboard when launching app on android
enabled: Qt.platform.os === "android" ? true : textObj.canPaste
onTriggered: textObj.paste() onTriggered: textObj.paste()
} }
+3 -1
View File
@@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
@@ -8,5 +10,5 @@ Rectangle {
Layout.rightMargin: 16 Layout.rightMargin: 16
height: 1 height: 1
color: "#2C2D30" color: AmneziaStyle.color.greyDark
} }
+5 -3
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Item { Item {
@@ -19,8 +21,8 @@ Item {
property Component collapsedContent property Component collapsedContent
property Component expandedContent property Component expandedContent
property string defaultColor: "#1C1D21" property string defaultColor: AmneziaStyle.color.blackLight
property string borderColor: "#2C2D30" property string borderColor: AmneziaStyle.color.greyDark
property real expandedHeight property real expandedHeight
property real collapsedHeight: 0 property real collapsedHeight: 0
@@ -90,7 +92,7 @@ Item {
id: background id: background
anchors.fill: parent anchors.fill: parent
color: root.isCollapsed ? "transparent" : Qt.rgba(14/255, 14/255, 17/255, 0.8) color: root.isCollapsed ? AmneziaStyle.color.transparent : Qt.rgba(14/255, 14/255, 17/255, 0.8)
Behavior on color { Behavior on color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
+17 -15
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
import "../Config" import "../Config"
@@ -9,31 +11,31 @@ Item {
id: root id: root
property string text property string text
property string textColor: "#d7d8db" property string textColor: AmneziaStyle.color.white
property string textDisabledColor: "#878B91" property string textDisabledColor: AmneziaStyle.color.grey
property int textMaximumLineCount: 2 property int textMaximumLineCount: 2
property int textElide: Qt.ElideRight property int textElide: Qt.ElideRight
property string descriptionText property string descriptionText
property string descriptionTextColor: "#878B91" property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: "#494B50" property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string headerText property string headerText
property string headerBackButtonImage property string headerBackButtonImage
property var rootButtonClickedFunction property var rootButtonClickedFunction
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg" property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
property string rootButtonImageColor: "#D7D8DB" property string rootButtonImageColor: AmneziaStyle.color.white
property string rootButtonBackgroundColor: "#1C1D21" property string rootButtonBackgroundColor: AmneziaStyle.color.blackLight
property string rootButtonBackgroundHoveredColor: "#1C1D21" property string rootButtonBackgroundHoveredColor: AmneziaStyle.color.blackLight
property string rootButtonBackgroundPressedColor: "#1C1D21" property string rootButtonBackgroundPressedColor: AmneziaStyle.color.blackLight
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property string rootButtonHoveredBorderColor: "#494B50" property string rootButtonHoveredBorderColor: AmneziaStyle.color.greyDisabled
property string rootButtonDefaultBorderColor: "#2C2D30" property string rootButtonDefaultBorderColor: AmneziaStyle.color.greyDark
property string rootButtonPressedBorderColor: "#D7D8DB" property string rootButtonPressedBorderColor: AmneziaStyle.color.white
property int rootButtonTextLeftMargins: 16 property int rootButtonTextLeftMargins: 16
property int rootButtonTextTopMargin: 16 property int rootButtonTextTopMargin: 16
@@ -75,8 +77,8 @@ Item {
Rectangle { Rectangle {
id: focusBorder id: focusBorder
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
anchors.fill: rootButtonContent anchors.fill: rootButtonContent
radius: 16 radius: 16
@@ -96,7 +98,7 @@ Item {
} }
return root.hovered ? root.rootButtonBackgroundHoveredColor : root.rootButtonBackgroundColor return root.hovered ? root.rootButtonBackgroundHoveredColor : root.rootButtonBackgroundColor
} else { } else {
return "transparent" return AmneziaStyle.color.transparent
} }
} }
+4 -2
View File
@@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Item { Item {
@@ -37,7 +39,7 @@ Item {
implicitHeight: 40 implicitHeight: 40
image: root.actionButtonImage image: root.actionButtonImage
imageColor: "#D7D8DB" imageColor: AmneziaStyle.color.white
visible: image ? true : false visible: image ? true : false
@@ -57,7 +59,7 @@ Item {
text: root.descriptionText text: root.descriptionText
color: "#878B91" color: AmneziaStyle.color.grey
visible: root.descriptionText !== "" visible: root.descriptionText !== ""
} }
+4 -2
View File
@@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Item { Item {
@@ -46,7 +48,7 @@ Item {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
image: root.actionButtonImage image: root.actionButtonImage
imageColor: "#D7D8DB" imageColor: AmneziaStyle.color.white
visible: image ? true : false visible: image ? true : false
@@ -66,7 +68,7 @@ Item {
text: root.descriptionText text: root.descriptionText
color: "#878B91" color: AmneziaStyle.color.grey
visible: root.descriptionText !== "" visible: root.descriptionText !== ""
} }
@@ -2,24 +2,26 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
RadioButton { RadioButton {
id: root id: root
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05) property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: Qt.rgba(1, 1, 1, 0) property string defaultColor: AmneziaStyle.color.transparent
property string checkedColor: Qt.rgba(1, 1, 1, 0) property string checkedColor: AmneziaStyle.color.transparent
property string disabledColor: "transparent" property string disabledColor: AmneziaStyle.color.transparent
property string textColor: "#D7D8DB" property string textColor: AmneziaStyle.color.white
property string textDisabledColor: "#878B91" property string textDisabledColor: AmneziaStyle.color.grey
property string pressedBorderColor: "#494B50" property string pressedBorderColor: AmneziaStyle.color.greyDisabled
property string checkedBorderColor: "#FBB26A" property string checkedBorderColor: AmneziaStyle.color.orange
property string defaultBodredColor: "transparent" property string defaultBodredColor: AmneziaStyle.color.transparent
property string checkedDisabledBorderColor: "#84603D" property string checkedDisabledBorderColor: AmneziaStyle.color.brownLight
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderWidth: 0 property int borderWidth: 0
implicitWidth: content.implicitWidth implicitWidth: content.implicitWidth
+10 -8
View File
@@ -2,23 +2,25 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
Button { Button {
id: root id: root
property string image property string image
property string hoveredColor: Qt.rgba(1, 1, 1, 0.08) property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: "transparent" property string defaultColor: AmneziaStyle.color.transparent
property string pressedColor: Qt.rgba(1, 1, 1, 0.12) property string pressedColor: AmneziaStyle.color.blackPressed
property string disableColor: "#2C2D30" property string disableColor: AmneziaStyle.color.greyDark
property string imageColor: "#878B91" property string imageColor: AmneziaStyle.color.grey
property string disableImageColor: "#2C2D30" property string disableImageColor: AmneziaStyle.color.greyDark
property alias backgroundColor: background.color property alias backgroundColor: background.color
property alias backgroundRadius: background.radius property alias backgroundRadius: background.radius
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
hoverEnabled: true hoverEnabled: true
@@ -46,7 +48,7 @@ Button {
id: background id: background
anchors.fill: parent anchors.fill: parent
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
color: { color: {
+13 -11
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Item { Item {
@@ -24,16 +26,16 @@ Item {
property alias eyeButton: eyeImage property alias eyeButton: eyeImage
property FlickableType parentFlickable property FlickableType parentFlickable
property string textColor: "#d7d8db" property string textColor: AmneziaStyle.color.white
property string textDisabledColor: "#878B91" property string textDisabledColor: AmneziaStyle.color.grey
property string descriptionColor: "#878B91" property string descriptionColor: AmneziaStyle.color.grey
property string descriptionDisabledColor: "#494B50" property string descriptionDisabledColor: AmneziaStyle.color.greyDisabled
property real textOpacity: 1.0 property real textOpacity: 1.0
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property string rightImageColor: "#d7d8db" property string rightImageColor: AmneziaStyle.color.white
property bool descriptionOnTop: false property bool descriptionOnTop: false
property bool hideDescription: true property bool hideDescription: true
@@ -117,7 +119,7 @@ Item {
Layout.rightMargin: rightImageSource || !isLeftImageHoverEnabled ? 16 : 0 Layout.rightMargin: rightImageSource || !isLeftImageHoverEnabled ? 16 : 0
radius: 12 radius: 12
color: "transparent" color: AmneziaStyle.color.transparent
Behavior on color { Behavior on color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
@@ -220,7 +222,7 @@ Item {
id: eyeImageBackground id: eyeImageBackground
anchors.fill: parent anchors.fill: parent
radius: 12 radius: 12
color: "transparent" color: AmneziaStyle.color.transparent
Behavior on color { Behavior on color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
@@ -257,7 +259,7 @@ Item {
id: rightImageBackground id: rightImageBackground
anchors.fill: parent anchors.fill: parent
radius: 12 radius: 12
color: "transparent" color: AmneziaStyle.color.transparent
Behavior on color { Behavior on color {
PropertyAnimation { duration: 200 } PropertyAnimation { duration: 200 }
@@ -274,9 +276,9 @@ Item {
Rectangle { Rectangle {
id: background id: background
anchors.fill: root anchors.fill: root
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
ListView { ListView {
@@ -103,8 +105,8 @@ ListView {
indicator: Rectangle { indicator: Rectangle {
width: parent.width - 1 width: parent.width - 1
height: parent.height height: parent.height
color: radioButton.hovered ? "#2C2D30" : "#1C1D21" color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
border.color: radioButton.focus ? "#D7D8DB" : "transparent" border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
border.width: radioButton.focus ? 1 : 0 border.width: radioButton.focus ? 1 : 0
Behavior on color { Behavior on color {
+6 -4
View File
@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Popup { Popup {
@@ -82,11 +84,11 @@ Popup {
implicitHeight: 32 implicitHeight: 32
defaultColor: "white" defaultColor: "white"
hoveredColor: "#C1C2C5" hoveredColor: AmneziaStyle.color.whiteHovered
pressedColor: "#AEB0B7" pressedColor: AmneziaStyle.color.whiteHovered
disabledColor: "#494B50" disabledColor: AmneziaStyle.color.greyDisabled
textColor: "#0E0E11" textColor: AmneziaStyle.color.black
borderWidth: 0 borderWidth: 0
text: qsTr("Close") text: qsTr("Close")
+4 -2
View File
@@ -2,20 +2,22 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
ProgressBar { ProgressBar {
id: root id: root
implicitHeight: 4 implicitHeight: 4
background: Rectangle { background: Rectangle {
color: "#633303" color: AmneziaStyle.color.brown
} }
contentItem: Item { contentItem: Item {
Rectangle { Rectangle {
width: root.visualPosition * parent.width width: root.visualPosition * parent.width
height: parent.height height: parent.height
color: "#FBB26A" color: AmneziaStyle.color.orange
} }
} }
} }
+21 -18
View File
@@ -2,36 +2,38 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Switch { Switch {
id: root id: root
property alias descriptionText: description.text property alias descriptionText: description.text
property string descriptionTextColor: "#878B91" property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: "#494B50" property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string textColor: "#D7D8DB" property string textColor: AmneziaStyle.color.white
property string textDisabledColor: "#878B91" property string textDisabledColor: AmneziaStyle.color.grey
property string checkedIndicatorColor: "#633303" property string checkedIndicatorColor: AmneziaStyle.color.brown
property string defaultIndicatorColor: "transparent" property string defaultIndicatorColor: AmneziaStyle.color.transparent
property string checkedDisabledIndicatorColor: "#402102" property string checkedDisabledIndicatorColor: AmneziaStyle.color.brownDark
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property string checkedIndicatorBorderColor: "#633303" property string checkedIndicatorBorderColor: AmneziaStyle.color.brown
property string defaultIndicatorBorderColor: "#494B50" property string defaultIndicatorBorderColor: AmneziaStyle.color.greyDisabled
property string checkedDisabledIndicatorBorderColor: "#402102" property string checkedDisabledIndicatorBorderColor: AmneziaStyle.color.brownDark
property string checkedInnerCircleColor: "#FBB26A" property string checkedInnerCircleColor: AmneziaStyle.color.orange
property string defaultInnerCircleColor: "#D7D8DB" property string defaultInnerCircleColor: AmneziaStyle.color.white
property string checkedDisabledInnerCircleColor: "#84603D" property string checkedDisabledInnerCircleColor: AmneziaStyle.color.brownLight
property string defaultDisabledInnerCircleColor: "#494B50" property string defaultDisabledInnerCircleColor: AmneziaStyle.color.greyDisabled
property string hoveredIndicatorBackgroundColor: Qt.rgba(1, 1, 1, 0.08) property string hoveredIndicatorBackgroundColor: AmneziaStyle.color.blackHovered
property string defaultIndicatorBackgroundColor: "transparent" property string defaultIndicatorBackgroundColor: AmneziaStyle.color.transparent
hoverEnabled: enabled ? true : false hoverEnabled: enabled ? true : false
focusPolicy: Qt.TabFocus focusPolicy: Qt.TabFocus
@@ -100,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 {
+9 -7
View File
@@ -1,16 +1,18 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import Style 1.0
TabButton { TabButton {
id: root id: root
property string hoveredColor: "#633303" property string hoveredColor: AmneziaStyle.color.brown
property string defaultColor: "#2C2D30" property string defaultColor: AmneziaStyle.color.greyDark
property string selectedColor: "#FBB26A" property string selectedColor: AmneziaStyle.color.orange
property string textColor: "#D7D8DB" property string textColor: AmneziaStyle.color.white
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property bool isSelected: false property bool isSelected: false
@@ -24,9 +26,9 @@ TabButton {
id: background id: background
anchors.fill: parent anchors.fill: parent
color: "transparent" color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
Rectangle { Rectangle {
@@ -1,18 +1,20 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import Style 1.0
TabButton { TabButton {
id: root id: root
property string hoveredColor: "#633303" property string hoveredColor: AmneziaStyle.color.brown
property string defaultColor: "#D7D8DB" property string defaultColor: AmneziaStyle.color.white
property string selectedColor: "#FBB26A" property string selectedColor: AmneziaStyle.color.orange
property string image property string image
property bool isSelected: false property bool isSelected: false
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property var clickedFunc property var clickedFunc
@@ -26,10 +28,10 @@ TabButton {
background: Rectangle { background: Rectangle {
id: background id: background
anchors.fill: parent anchors.fill: parent
color: "transparent" color: AmneziaStyle.color.transparent
radius: 10 radius: 10
border.color: root.activeFocus ? root.borderFocusedColor : "transparent" border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0 border.width: root.activeFocus ? root.borderFocusedWidth : 0
} }
+10 -8
View File
@@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import Style 1.0
Rectangle { Rectangle {
id: root id: root
@@ -9,12 +11,12 @@ Rectangle {
property alias textArea: textArea property alias textArea: textArea
property alias textAreaText: textArea.text property alias textAreaText: textArea.text
property string borderHoveredColor: "#494B50" property string borderHoveredColor: AmneziaStyle.color.greyDisabled
property string borderNormalColor: "#2C2D30" property string borderNormalColor: AmneziaStyle.color.greyDark
property string borderFocusedColor: "#d7d8db" property string borderFocusedColor: AmneziaStyle.color.white
height: 148 height: 148
color: "#1C1D21" color: AmneziaStyle.color.blackLight
border.width: 1 border.width: 1
border.color: getBorderColor(borderNormalColor) border.color: getBorderColor(borderNormalColor)
radius: 16 radius: 16
@@ -52,10 +54,10 @@ Rectangle {
anchors.topMargin: 16 anchors.topMargin: 16
anchors.bottomMargin: 16 anchors.bottomMargin: 16
color: "#D7D8DB" color: AmneziaStyle.color.white
selectionColor: "#633303" selectionColor: AmneziaStyle.color.brown
selectedTextColor: "#D7D8DB" selectedTextColor: AmneziaStyle.color.white
placeholderTextColor: "#878B91" placeholderTextColor: AmneziaStyle.color.grey
font.pixelSize: 16 font.pixelSize: 16
font.weight: Font.Medium font.weight: Font.Medium
@@ -2,14 +2,16 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Style 1.0
import "TextTypes" import "TextTypes"
Item { Item {
id: root id: root
property string headerText property string headerText
property string headerTextDisabledColor: "#494B50" property string headerTextDisabledColor: AmneziaStyle.color.greyDisabled
property string headerTextColor: "#878b91" property string headerTextColor: AmneziaStyle.color.grey
property alias errorText: errorField.text property alias errorText: errorField.text
property bool checkEmptyText: false property bool checkEmptyText: false
@@ -21,18 +23,18 @@ Item {
property alias textField: textField property alias textField: textField
property alias textFieldText: textField.text property alias textFieldText: textField.text
property string textFieldTextColor: "#d7d8db" property string textFieldTextColor: AmneziaStyle.color.white
property string textFieldTextDisabledColor: "#878B91" property string textFieldTextDisabledColor: AmneziaStyle.color.grey
property string textFieldPlaceholderText property string textFieldPlaceholderText
property bool textFieldEditable: true property bool textFieldEditable: true
property string borderColor: "#2C2D30" property string borderColor: AmneziaStyle.color.greyDark
property string borderFocusedColor: "#d7d8db" property string borderFocusedColor: AmneziaStyle.color.white
property string backgroundColor: "#1c1d21" property string backgroundColor: AmneziaStyle.color.blackLight
property string backgroundDisabledColor: "transparent" property string backgroundDisabledColor: AmneziaStyle.color.transparent
property string bgBorderHoveredColor: "#494B50" property string bgBorderHoveredColor: AmneziaStyle.color.greyDisabled
implicitWidth: content.implicitWidth implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight implicitHeight: content.implicitHeight
@@ -90,10 +92,10 @@ Item {
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
placeholderText: root.textFieldPlaceholderText placeholderText: root.textFieldPlaceholderText
placeholderTextColor: "#494B50" placeholderTextColor: AmneziaStyle.color.greyDisabled
selectionColor: "#633303" selectionColor: AmneziaStyle.color.brown
selectedTextColor: "#D7D8DB" selectedTextColor: AmneziaStyle.color.white
font.pixelSize: 16 font.pixelSize: 16
font.weight: 400 font.weight: 400
@@ -147,7 +149,7 @@ Item {
text: root.errorText text: root.errorText
visible: root.errorText !== "" visible: root.errorText !== ""
color: "#EB5757" color: AmneziaStyle.color.red
} }
} }
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 24 lineHeight: 24
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 16 font.pixelSize: 16
font.weight: 600 font.weight: 600
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 16 + LanguageModel.getLineHeightAppend() lineHeight: 16 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#0E0E11" color: AmneziaStyle.color.black
font.pixelSize: 13 font.pixelSize: 13
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,14 +1,16 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 38 + LanguageModel.getLineHeightAppend() lineHeight: 38 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" 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
} }
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 30 + LanguageModel.getLineHeightAppend() lineHeight: 30 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 25 font.pixelSize: 25
font.weight: 700 font.weight: 700
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 16 + LanguageModel.getLineHeightAppend() lineHeight: 16 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#878B91" color: AmneziaStyle.color.grey
font.pixelSize: 13 font.pixelSize: 13
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 21.6 + LanguageModel.getLineHeightAppend() lineHeight: 21.6 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 18 font.pixelSize: 18
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,10 +1,11 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 24 + LanguageModel.getLineHeightAppend() lineHeight: 24 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 16 font.pixelSize: 16
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -1,10 +1,12 @@
import QtQuick import QtQuick
import Style 1.0
Text { Text {
lineHeight: 20 + LanguageModel.getLineHeightAppend() lineHeight: 20 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: "#D7D8DB" color: AmneziaStyle.color.white
font.pixelSize: 14 font.pixelSize: 14
font.weight: 400 font.weight: 400
font.family: "PT Root UI VF" font.family: "PT Root UI VF"
@@ -18,14 +18,14 @@ Popup {
} }
background: Rectangle { background: Rectangle {
color: "transparent" color: AmneziaStyle.color.transparent
} }
ImageButtonType { ImageButtonType {
id: button id: button
image: "qrc:/images/svg/close_black_24dp.svg" image: "qrc:/images/svg/close_black_24dp.svg"
imageColor: "#D7D8DB" imageColor: AmneziaStyle.color.white
implicitWidth: 40 implicitWidth: 40
implicitHeight: 40 implicitHeight: 40
@@ -3,6 +3,8 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes" import "TextTypes"
RadioButton { RadioButton {
@@ -12,15 +14,15 @@ RadioButton {
property int textElide: Qt.ElideRight property int textElide: Qt.ElideRight
property string descriptionText property string descriptionText
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05) property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: Qt.rgba(1, 1, 1, 0) property string defaultColor: AmneziaStyle.color.transparent
property string disabledColor: Qt.rgba(1, 1, 1, 0) property string disabledColor: AmneziaStyle.color.transparent
property string selectedColor: Qt.rgba(1, 1, 1, 0) property string selectedColor: AmneziaStyle.color.transparent
property string textColor: "#D7D8DB" property string textColor: AmneziaStyle.color.white
property string selectedTextColor: "#FBB26A" property string selectedTextColor: AmneziaStyle.color.orange
property string borderFocusedColor: "#D7D8DB" property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1 property int borderFocusedWidth: 1
property string imageSource property string imageSource
@@ -34,7 +36,7 @@ RadioButton {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
border.color: root.focus ? root.borderFocusedColor : "transparent" border.color: root.focus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.focus ? root.borderFocusedWidth : 0 border.width: root.focus ? root.borderFocusedWidth : 0
implicitWidth: 56 implicitWidth: 56
@@ -137,7 +139,7 @@ RadioButton {
CaptionTextType { CaptionTextType {
id: description id: description
color: "#878B91" color: AmneziaStyle.color.grey
text: root.descriptionText text: root.descriptionText
visible: root.descriptionText !== "" visible: root.descriptionText !== ""

Some files were not shown because too many files have changed in this diff Show More