Compare commits

...

28 Commits

Author SHA1 Message Date
Mykola Baibuz
e08b62df40 Fix work wth PKCS12 TempFile 2024-08-20 22:46:51 +03:00
Mykola Baibuz
90912f9231 Fix Windows IPsec 2024-07-26 00:55:13 +03: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
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
pokamest
0612f70c06 Merge pull request #877 from amnezia-vpn/feature/reorder-containers-installing-list
moved xray higher on the list of containers during installation
2024-07-03 14:06:56 +01:00
lunardunno
d0c82efa1c rename OpenVPN over ShadowsSocks 2024-07-03 12:06:31 +04:00
vladimir.kuznetsov
cf8492240e moved xray higher on the list of containers during installation 2024-07-02 22:00:28 +02:00
Boris Verbitckii
2bceb9f7ba Xray and wg fix (#875)
Xray support on iOS fixes
2024-07-01 17:27:53 +01:00
126 changed files with 8154 additions and 4375 deletions

View File

@@ -65,6 +65,13 @@ jobs:
path: deploy/AppDir
retention-days: 7
- name: 'Upload translations artifact'
uses: actions/upload-artifact@v4
with:
name: AmneziaVPN_translations
path: client/translations
retention-days: 7
# ------------------------------------------------------
Build-Windows:

View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.6.0.1
project(${PROJECT} VERSION 4.6.0.4
DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/"
)
@@ -11,7 +11,7 @@ string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
set(RELEASE_DATE "${CURRENT_DATE}")
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 55)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(MZ_PLATFORM_NAME "linux")

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.
![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
- 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
[https://amnezia.org](https://amnezia.org) - project website
[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](https://t.me/amnezia_vpn) - Telegram support channel (Russian)
- [https://amnezia.org](https://amnezia.org) - project website
- [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_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
@@ -44,6 +66,19 @@ git submodule update --init --recursive
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
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.
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
- iOS
- Qt 5 Compatibility Module
@@ -142,10 +177,11 @@ GPL v3.0
## Donate
Bitcoin: bc1qn9rhsffuxwnhcuuu4qzrwp4upkrq94xnh8r26u
Patreon: [https://www.patreon.com/amneziavpn](https://www.patreon.com/amneziavpn)
USDT BEP20: 0x6abD576765a826f87D1D95183438f9408C901bE4 <br>
USDT TRC20: TELAitazF1MZGmiNjTcnxDjEiH5oe7LC9d <br>
XMR: 48spms39jt1L2L5vyw2RQW6CXD6odUd4jFu19GZcDyKKQV9U88wsJVjSbL4CfRys37jVMdoaWVPSvezCQPhHXUW5UKLqUp3
payeer.com: P2561305
ko-fi.com: [https://ko-fi.com/amnezia_vpn](https://ko-fi.com/amnezia_vpn)
## Acknowledgments

View File

@@ -157,6 +157,7 @@ void AmneziaApplication::init()
connect(this, &AmneziaApplication::translationsUpdated, m_notificationHandler.get(), &NotificationHandler::onTranslationsUpdated);
#endif
m_engine->addImportPath("qrc:/ui/qml/Modules/");
m_engine->load(url);
m_systemController->setQmlRoot(m_engine->rootObjects().value(0));

View File

@@ -384,7 +384,8 @@ class AmneziaActivity : QtActivity() {
getVpnProto(vpnConfig)?.let { proto ->
Log.d(TAG, "Proto from config: $proto, current proto: $vpnProto")
if (isServiceConnected) {
if (proto == vpnProto) {
if (proto.serviceClass == vpnProto?.serviceClass) {
vpnProto = proto
connectToVpn(vpnConfig)
return
}

View File

@@ -49,7 +49,15 @@ enum class VpnProto(
"org.amnezia.vpn:amneziaXrayService",
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

View File

@@ -5,6 +5,7 @@ import android.net.VpnService.Builder
import java.io.File
import java.io.IOException
import go.Seq
import org.amnezia.vpn.protocol.BadConfigException
import org.amnezia.vpn.protocol.Protocol
import org.amnezia.vpn.protocol.ProtocolState.CONNECTED
import org.amnezia.vpn.protocol.ProtocolState.DISCONNECTED
@@ -114,17 +115,14 @@ class Xray : Protocol() {
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)
// for debug
// xrayJsonConfig.getJSONObject("log").put("loglevel", "debug")
xrayJsonConfig.getJSONObject("log").put("loglevel", "warning")
// disable access log
xrayJsonConfig.getJSONObject("log").put("access", "none")
// replace socks address
// (xrayJsonConfig.getJSONArray("inbounds")[0] as JSONObject).put("listen", "::1")
(xrayJsonConfig.optJSONObject("log") ?: JSONObject().also { xrayJsonConfig.put("log", it) })
.put("loglevel", "warning")
.put("access", "none") // disable access log
start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect)
state.value = CONNECTED
@@ -228,6 +226,10 @@ class Xray : Protocol() {
throw VpnStartException("Failed to start tun2socks: $err")
}
}
companion object {
val instance: Xray by lazy { Xray() }
}
}
private fun String?.isNotNullOrBlank(block: (String) -> Unit) {

View File

@@ -90,7 +90,7 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
{
return { { DockerContainer::None, "Not installed" },
{ DockerContainer::OpenVpn, "OpenVPN" },
{ DockerContainer::ShadowSocks, "ShadowSocks" },
{ DockerContainer::ShadowSocks, "OpenVPN over SS" },
{ DockerContainer::Cloak, "OpenVPN over Cloak" },
{ DockerContainer::WireGuard, "WireGuard" },
{ DockerContainer::Awg, "AmneziaWG" },
@@ -286,8 +286,8 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
case DockerContainer::OpenVpn: return true;
case DockerContainer::Awg: return true;
case DockerContainer::Xray: return true;
case DockerContainer::Cloak:
return true;
case DockerContainer::Cloak: return true;
case DockerContainer::SSXray: return true;
// case DockerContainer::ShadowSocks: return true;
default: return false;
}
@@ -306,6 +306,7 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
case DockerContainer::Awg: return true;
case DockerContainer::Cloak: return true;
case DockerContainer::Xray: return true;
case DockerContainer::SSXray: return true;
default: return false;
}
@@ -389,3 +390,18 @@ QJsonObject ContainerProps::getProtocolConfigFromContainer(const Proto protocol,
return QJsonDocument::fromJson(protocolConfigString.toUtf8()).object();
}
int ContainerProps::installPageOrder(DockerContainer container)
{
switch (container) {
case DockerContainer::OpenVpn: return 4;
case DockerContainer::Cloak: return 5;
case DockerContainer::ShadowSocks: return 6;
case DockerContainer::WireGuard: return 2;
case DockerContainer::Awg: return 1;
case DockerContainer::Xray: return 3;
case DockerContainer::Ipsec: return 7;
case DockerContainer::SSXray: return 8;
default: return 0;
}
}

View File

@@ -72,6 +72,8 @@ namespace amnezia
static bool isShareable(amnezia::DockerContainer container);
static QJsonObject getProtocolConfigFromContainer(const amnezia::Proto protocol, const QJsonObject &containerConfig);
static int installPageOrder(amnezia::DockerContainer container);
};
static void declareQmlContainerEnum()

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.

View File

@@ -91,6 +91,7 @@ target_sources(networkextension PRIVATE
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+OpenVPN.swift
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+Xray.swift
${CLIENT_ROOT_DIR}/platforms/ios/WGConfig.swift
${CLIENT_ROOT_DIR}/platforms/ios/XrayConfig.swift
${CLIENT_ROOT_DIR}/platforms/ios/iosglue.mm
)

View File

@@ -33,6 +33,10 @@ void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
}
// 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")) {
return;
}

View File

@@ -4,6 +4,7 @@ import WireGuardKitGo
enum XrayErrors: Error {
case noXrayConfig
case xrayConfigIsWrong
case cantSaveXrayConfig
case cantParseListenAndPort
case cantSaveHevSocksConfig
@@ -26,14 +27,14 @@ extension PacketTunnelProvider {
// Xray configuration
guard let protocolConfiguration = self.protocolConfiguration as? NETunnelProviderProtocol,
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")
completionHandler(XrayErrors.noXrayConfig)
return
}
// Tunnel settings
let ipv6Enabled = true
let ipv6Enabled = false
let hideVPNIcon = false
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "254.1.1.1")
@@ -57,26 +58,73 @@ extension PacketTunnelProvider {
return settings
}()
let dns = ["8.8.4.4","1.1.1.1"]
settings.dnsSettings = NEDNSSettings(servers: dns)
do {
let xrayConfig = try JSONDecoder().decode(XrayConfig.self,
from: configData)
setTunnelNetworkSettings(settings) { [weak self] error in
if let error {
completionHandler(error)
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
}
// Launch xray
self?.setupAndStartXray(configData: xrayConfigData) { xrayError in
if let xrayError {
completionHandler(xrayError)
let jsonDict = try JSONSerialization.jsonObject(with: xrayConfigData,
options: []) as? [String: Any]
guard var jsonDict else {
xrayLog(.error, message: "Can't parse address and port for hevSocks")
completionHandler(XrayErrors.cantParseListenAndPort)
return
}
let port = 10808
let address = "::1"
if var inboundsArray = jsonDict["inbounds"] as? [[String: Any]], !inboundsArray.isEmpty {
inboundsArray[0]["port"] = port
inboundsArray[0]["listen"] = address
jsonDict["inbounds"] = inboundsArray
}
let updatedData = try JSONSerialization.data(withJSONObject: jsonDict, options: [])
setTunnelNetworkSettings(settings) { [weak self] error in
if let error {
completionHandler(error)
return
}
// Launch hevSocks
self?.setupAndRunTun2socks(configData: xrayConfigData,
completionHandler: completionHandler)
// Launch xray
self?.setupAndStartXray(configData: updatedData) { xrayError in
if let xrayError {
completionHandler(xrayError)
return
}
// Launch hevSocks
self?.setupAndRunTun2socks(configData: updatedData,
address: address,
port: port,
completionHandler: completionHandler)
}
}
} catch {
completionHandler(error)
return
}
}
@@ -104,29 +152,9 @@ extension PacketTunnelProvider {
}
private func setupAndRunTun2socks(configData: Data,
address: String,
port: Int,
completionHandler: @escaping (Error?) -> Void) {
var port = 10808
var address = "::1"
let jsonDict = try? JSONSerialization.jsonObject(with: configData, options: []) as? [String: Any]
guard let jsonDict else {
xrayLog(.error, message: "Can't parse address and port for hevSocks")
completionHandler(XrayErrors.cantParseListenAndPort)
return
}
// Xray listen and port should be the same as port and address in hevSocks
if let inbounds = jsonDict["inbounds"] as? [[String: Any]], let inbound = inbounds.first {
if let listen = inbound["listen"] as? String {
address = listen
address.removeAll { $0 == "[" || $0 == "]" }
}
if let portFromConfig = inbound["port"] as? Int {
port = portFromConfig
}
}
let config = """
tunnel:
mtu: 9000

View File

@@ -13,7 +13,7 @@ struct WGConfig: Decodable {
let clientIP: String
let clientPrivateKey: String
let serverPublicKey: String
let presharedKey: String
let presharedKey: String?
var allowedIPs: [String]
var persistentKeepAlive: String
let splitTunnelType: Int
@@ -65,7 +65,7 @@ struct WGConfig: Decodable {
\(settings)
[Peer]
PublicKey = \(serverPublicKey)
PresharedKey = \(presharedKey)
\(presharedKey == nil ? "" : "PresharedKey = \(presharedKey!)")
AllowedIPs = \(allowedIPs.joined(separator: ", "))
Endpoint = \(hostName):\(port)
PersistentKeepalive = \(persistentKeepAlive)

View File

@@ -0,0 +1,7 @@
import Foundation
struct XrayConfig: Decodable {
let dns1: String?
let dns2: String?
let config: String
}

View File

@@ -73,6 +73,7 @@ private:
bool setupWireGuard();
bool setupAwg();
bool setupXray();
bool setupSSXray();
bool startOpenVPN(const QString &config);
bool startWireGuard(const QString &jsonConfig);

View File

@@ -219,6 +219,9 @@ bool IosController::connectVpn(amnezia::Proto proto, const QJsonObject& configur
if (proto == amnezia::Proto::Xray) {
return setupXray();
}
if (proto == amnezia::Proto::SSXray) {
return setupSSXray();
}
return false;
}
@@ -508,9 +511,36 @@ bool IosController::setupXray()
{
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::Xray)].toObject();
QJsonDocument xrayConfigDoc(config);
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()

View File

@@ -139,7 +139,7 @@ bool WireguardUtilsLinux::addInterface(const InterfaceConfig& config) {
if (config.m_killSwitchEnabled) {
FirewallParams params { };
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;
if (config.m_excludedAddresses.size()) {
params.allowNets = true;

View File

@@ -137,7 +137,8 @@ bool WireguardUtilsMacos::addInterface(const InterfaceConfig& config) {
if (config.m_killSwitchEnabled) {
FirewallParams params { };
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;
if (config.m_excludedAddresses.size()) {
params.allowNets = true;

View File

@@ -10,6 +10,7 @@
#include "ikev2_vpn_protocol_windows.h"
#include "utilities.h"
static Ikev2Protocol* self = nullptr;
static std::mutex rasDialFuncMutex;
@@ -80,10 +81,10 @@ void Ikev2Protocol::newConnectionStateEventReceived(UINT unMsg, tagRASCONNSTATE
case RASCS_AuthNotify:
//qDebug()<<__FUNCTION__ << __LINE__;
if (dwError != 0) {
//qDebug() << "have error" << dwError;
qDebug() << "have error" << dwError;
setConnectionState(Vpn::ConnectionState::Disconnected);
} else {
//qDebug() << "RASCS_AuthNotify but no error" << dwError;
qDebug() << "RASCS_AuthNotify but no error" << dwError;
}
break;
case RASCS_AuthRetry:
@@ -179,11 +180,13 @@ ErrorCode Ikev2Protocol::start()
QByteArray cert = QByteArray::fromBase64(m_config[config_key::cert].toString().toUtf8());
setConnectionState(Vpn::ConnectionState::Connecting);
QTemporaryFile certFile;
certFile.setAutoRemove(false);
certFile.open();
certFile.write(cert);
certFile.close();
QTemporaryFile * certFile = new QTemporaryFile;
certFile->setAutoRemove(false);
certFile->open();
QString m_filename = certFile->fileName();
certFile->write(cert);
certFile->close();
delete certFile;
{
auto certInstallProcess = IpcClient::CreatePrivilegedProcess();
@@ -193,19 +196,19 @@ ErrorCode Ikev2Protocol::start()
return ErrorCode::AmneziaServiceConnectionFailed;
}
certInstallProcess->waitForSource(1000);
certInstallProcess->waitForSource();
if (!certInstallProcess->isInitialized()) {
qWarning() << "IpcProcess replica is not connected!";
setLastError(ErrorCode::AmneziaServiceConnectionFailed);
return ErrorCode::AmneziaServiceConnectionFailed;
}
certInstallProcess->setProgram(PermittedProcess::CertUtil);
QStringList arguments({"-f" , "-importpfx",
"-p", m_config[config_key::password].toString(),
certFile.fileName(), "NoExport"
});
certInstallProcess->setArguments(arguments);
QStringList arguments({"-f", "-importpfx", "-p", m_config[config_key::password].toString(),
QDir::toNativeSeparators(m_filename), "NoExport"
});
certInstallProcess->setArguments(arguments);
certInstallProcess->start();
}
// /*
@@ -219,40 +222,40 @@ ErrorCode Ikev2Protocol::start()
}
{
{
if ( !create_new_vpn(tunnelName(), m_config[config_key::hostName].toString())){
qDebug() <<"Can't create the VPN connect";
}
}
}
{
if ( !create_new_vpn(tunnelName(), m_config[config_key::hostName].toString())){
qDebug() <<"Can't create the VPN connect";
}
}
}
{
auto adapterConfigProcess = new QProcess;
{
QProcess adapterConfigProcess;
adapterConfigProcess.setProgram("powershell");
QString arguments = QString("-command \"Set-VpnConnectionIPsecConfiguration\" "
"-ConnectionName '%1' "
"-AuthenticationTransformConstants GCMAES128 "
"-CipherTransformConstants GCMAES128 "
"-EncryptionMethod AES256 "
"-IntegrityCheckMethod SHA256 "
"-PfsGroup None "
"-DHGroup Group14 "
"-PassThru -Force\"")
.arg(tunnelName());
adapterConfigProcess->setProgram("powershell");
QString arguments = QString("-command \"Set-VpnConnectionIPsecConfiguration\" "
"-ConnectionName '%1' "
"-AuthenticationTransformConstants GCMAES128 "
"-CipherTransformConstants GCMAES128 "
"-EncryptionMethod AES256 "
"-IntegrityCheckMethod SHA256 "
"-PfsGroup None "
"-DHGroup Group14 "
"-PassThru -Force\"")
.arg(tunnelName());
adapterConfigProcess->setNativeArguments(arguments);
adapterConfigProcess.setNativeArguments(arguments);
adapterConfigProcess->start();
adapterConfigProcess->waitForFinished(5000);
adapterConfigProcess.start();
adapterConfigProcess.waitForFinished(5000);
}
//*/
{
if (!connect_to_vpn(tunnelName())) {
qDebug()<<"We can't connect to VPN";
}
//*/
{
if (!connect_to_vpn(tunnelName())) {
qDebug()<<"We can't connect to VPN";
}
}
//setConnectionState(Connecting);
return ErrorCode::NoError;
}
//setConnectionState(Connecting);
return ErrorCode::NoError;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bool Ikev2Protocol::create_new_vpn(const QString & vpn_name,
@@ -299,6 +302,7 @@ bool Ikev2Protocol::connect_to_vpn(const QString & vpn_name){
auto ret = RasDial(NULL, NULL, &RasDialParams, 0,
&RasDialFuncCallback,
&hRasConn);
if (ret == ERROR_SUCCESS){
return true;
}

View File

@@ -11,16 +11,6 @@
<file>images/tray/default.png</file>
<file>images/tray/error.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/share.png</file>
<file>server_scripts/remove_container.sh</file>
@@ -95,7 +85,6 @@
<file>server_scripts/check_user_in_sudo.sh</file>
<file>ui/qml/Controls2/BasicButtonType.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>images/controls/arrow-right.svg</file>
<file>images/controls/chevron-right.svg</file>
@@ -239,6 +228,9 @@
<file>images/controls/alert-circle.svg</file>
<file>images/controls/file-check-2.svg</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>server_scripts/socks5_proxy/run_container.sh</file>
<file>server_scripts/socks5_proxy/Dockerfile</file>

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

View File

@@ -41,6 +41,7 @@ QVariant ContainersModel::data(const QModelIndex &index, int role) const
case IsCurrentlyProcessedRole: return container == static_cast<DockerContainer>(m_processedContainerIndex);
case IsSupportedRole: return ContainerProps::isSupportedByCurrentPlatform(container);
case IsShareableRole: return ContainerProps::isShareable(container);
case InstallPageOrderRole: return ContainerProps::installPageOrder(container);
}
return QVariant();
@@ -112,5 +113,7 @@ QHash<int, QByteArray> ContainersModel::roleNames() const
roles[IsCurrentlyProcessedRole] = "isCurrentlyProcessed";
roles[IsSupportedRole] = "isSupported";
roles[IsShareableRole] = "isShareable";
roles[InstallPageOrderRole] = "installPageOrder";
return roles;
}

View File

@@ -31,7 +31,9 @@ public:
IsCurrentlyProcessedRole,
IsDefaultRole,
IsSupportedRole,
IsShareableRole
IsShareableRole,
InstallPageOrderRole
};
int rowCount(const QModelIndex &parent = QModelIndex()) const override;

View File

@@ -92,9 +92,9 @@ int LanguageModel::getCurrentLanguageIndex()
int LanguageModel::getLineHeightAppend()
{
int langIndex = getCurrentLanguageIndex();
switch (langIndex) {
case 5: return 10; break; // Burmese
auto language = static_cast<LanguageSettings::AvailableLanguageEnum>(getCurrentLanguageIndex());
switch (language) {
case LanguageSettings::AvailableLanguageEnum::Burmese: return 10; break;
default: return 0; break;
}
}

View File

@@ -6,13 +6,14 @@ import Qt5Compat.GraphicalEffects
import ConnectionState 1.0
import PageEnum 1.0
import Style 1.0
Button {
id: root
property string defaultButtonColor: "#D7D8DB"
property string progressButtonColor: "#D7D8DB"
property string connectedButtonColor: "#FBB26A"
property string defaultButtonColor: AmneziaStyle.color.white
property string progressButtonColor: AmneziaStyle.color.white
property string connectedButtonColor: AmneziaStyle.color.orange
implicitWidth: 190
implicitHeight: 190
@@ -49,13 +50,13 @@ Button {
verticalOffset: 0
radius: 10
samples: 25
color: root.activeFocus ? "#D7D8DB" : "#FBB26A"
color: root.activeFocus ? AmneziaStyle.color.white : AmneziaStyle.color.orange
source: backgroundCircle
}
ShapePath {
fillColor: "transparent"
strokeColor: "#D7D8DB"
fillColor: AmneziaStyle.color.transparent
strokeColor: AmneziaStyle.color.white
strokeWidth: root.activeFocus ? 1 : 0
capStyle: ShapePath.RoundCap
@@ -70,10 +71,10 @@ Button {
}
ShapePath {
fillColor: "transparent"
fillColor: AmneziaStyle.color.transparent
strokeColor: {
if (ConnectionController.isConnectionInProgress) {
return "#261E1A"
return AmneziaStyle.color.connectionInProgress
} else if (ConnectionController.isConnected) {
return connectedButtonColor
} else {
@@ -113,8 +114,8 @@ Button {
visible: ConnectionController.isConnectionInProgress
ShapePath {
fillColor: "transparent"
strokeColor: "#D7D8DB"
fillColor: AmneziaStyle.color.transparent
strokeColor: AmneziaStyle.color.white
strokeWidth: 3
capStyle: ShapePath.RoundCap

View File

@@ -14,7 +14,7 @@ DrawerType2 {
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
anchors.fill: parent
expandedHeight: parent.height * 0.7
expandedHeight: parent.height * 0.9
expandedContent: ColumnLayout {
id: content

View File

@@ -8,6 +8,7 @@ import "../Controls2/TextTypes"
import SortFilterProxyModel 0.2
import InstalledAppsModel 1.0
import Style 1.0
DrawerType2 {
id: root
@@ -133,7 +134,7 @@ DrawerType2 {
anchors.rightMargin: 16
anchors.leftMargin: 16
backgroundColor: "#2C2D30"
backgroundColor: AmneziaStyle.color.greyDark
textFieldPlaceholderText: qsTr("application name")
}

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "../Controls2"
import "../Controls2/TextTypes"
@@ -86,11 +88,11 @@ DrawerType2 {
Layout.rightMargin: 16
Layout.leftMargin: 16
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#D7D8DB"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.white
borderWidth: 1
text: noButtonText

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "../Controls2"
import "../Controls2/TextTypes"
import "../Config"
@@ -145,8 +147,8 @@ DrawerType2 {
indicator: Rectangle {
width: parent.width - 1
height: parent.height
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
border.color: radioButton.focus ? "#D7D8DB" : "transparent"
color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
border.width: radioButton.focus ? 1 : 0
Behavior on color {

View File

@@ -93,20 +93,11 @@ ListView {
PageController.goToPage(PageEnum.PageProtocolRaw)
break
}
case ContainerEnum.Sftp: {
SftpConfigModel.updateModel(config)
PageController.goToPage(PageEnum.PageServiceSftpSettings)
break
}
case ContainerEnum.TorWebSite: {
PageController.goToPage(PageEnum.PageServiceTorWebsiteSettings)
break
}
case ContainerEnum.Dns: {
PageController.goToPage(PageEnum.PageServiceDnsSettings)
break
}
default: { // go to the settings page of the container with multiple protocols
default: {
ProtocolsModel.updateModel(config)
PageController.goToPage(PageEnum.PageSettingsServerProtocol)
}

View File

@@ -9,6 +9,7 @@ import SortFilterProxyModel 0.2
import PageEnum 1.0
import ContainerProps 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -111,11 +112,11 @@ DrawerType2 {
Layout.fillWidth: true
Layout.topMargin: 8
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#D7D8DB"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.white
borderWidth: 1
text: qsTr("Copy")
@@ -134,11 +135,11 @@ DrawerType2 {
visible: false
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#D7D8DB"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.white
borderWidth: 1
text: qsTr("Copy config string")
@@ -153,11 +154,11 @@ DrawerType2 {
Layout.fillWidth: true
Layout.topMargin: 24
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#D7D8DB"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.white
borderWidth: 1
text: qsTr("Show connection settings")
@@ -281,9 +282,9 @@ DrawerType2 {
readOnly: true
activeFocusOnTab: false
color: "#D7D8DB"
selectionColor: "#633303"
selectedTextColor: "#D7D8DB"
color: AmneziaStyle.color.white
selectionColor: AmneziaStyle.color.brown
selectedTextColor: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: Font.Medium
@@ -294,7 +295,7 @@ DrawerType2 {
wrapMode: Text.Wrap
background: Rectangle {
color: "transparent"
color: AmneziaStyle.color.transparent
}
}
}

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "../Controls2"
import "../Controls2/TextTypes"
@@ -14,7 +16,7 @@ Rectangle {
implicitWidth: transportProtoButtonGroup.implicitWidth
implicitHeight: transportProtoButtonGroup.implicitHeight
color: "#1C1D21"
color: AmneziaStyle.color.blackLight
radius: 16
onFocusChanged: {

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Style 1.0
Item {
id: root
@@ -28,7 +30,7 @@ Item {
ImageButtonType {
id: backButton
image: backButtonImage
imageColor: "#D7D8DB"
imageColor: AmneziaStyle.color.white
implicitWidth: 40
implicitHeight: 40
@@ -46,7 +48,7 @@ Item {
id: background
Layout.fillWidth: true
color: "transparent"
color: AmneziaStyle.color.transparent
}
}

View File

@@ -3,20 +3,22 @@ import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes"
Button {
id: root
property string hoveredColor: "#C1C2C5"
property string defaultColor: "#D7D8DB"
property string disabledColor: "#494B50"
property string pressedColor: "#979799"
property string hoveredColor: AmneziaStyle.color.whiteHovered
property string defaultColor: AmneziaStyle.color.white
property string disabledColor: AmneziaStyle.color.greyDisabled
property string pressedColor: AmneziaStyle.color.grey
property string textColor: "#0E0E11"
property string textColor: AmneziaStyle.color.black
property string borderColor: "#D7D8DB"
property string borderFocusedColor: "#D7D8DB"
property string borderColor: AmneziaStyle.color.white
property string borderFocusedColor: AmneziaStyle.color.white
property int borderWidth: 0
property int borderFocusedWidth: 1
@@ -30,6 +32,8 @@ Button {
property var clickedFunc
property alias buttonTextLabel: buttonText
implicitHeight: 56
hoverEnabled: true
@@ -46,8 +50,8 @@ Button {
background: Rectangle {
id: focusBorder
color: "transparent"
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0
anchors.fill: parent
@@ -138,6 +142,8 @@ Button {
}
ButtonTextType {
id: buttonText
color: textColor
text: root.text
visible: root.text === "" ? false : true

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Shapes
import Style 1.0
Popup {
id: root
anchors.centerIn: parent
@@ -16,7 +18,7 @@ Popup {
}
background: Rectangle {
color: "transparent"
color: AmneziaStyle.color.transparent
}
BusyIndicator {
@@ -40,8 +42,8 @@ Popup {
layer.samples: 4
ShapePath {
fillColor: "transparent"
strokeColor: "#787878"
fillColor: AmneziaStyle.color.transparent
strokeColor: AmneziaStyle.color.greyDisabled
strokeWidth: 3
capStyle: ShapePath.RoundCap

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
RadioButton {
id: root
@@ -9,17 +11,17 @@ RadioButton {
property string bodyText
property string footerText
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: Qt.rgba(1, 1, 1, 0)
property string disabledColor: Qt.rgba(1, 1, 1, 0)
property string pressedColor: Qt.rgba(1, 1, 1, 0.05)
property string selectedColor: Qt.rgba(1, 1, 1, 0)
property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: AmneziaStyle.color.transparent
property string disabledColor: AmneziaStyle.color.transparent
property string pressedColor: AmneziaStyle.color.blackPressed
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 selectedBorderColor: "#FBB26A"
property string defaultBodredColor: "transparent"
property string selectedBorderColor: AmneziaStyle.color.orange
property string defaultBodredColor: AmneziaStyle.color.transparent
property int borderWidth: 0
implicitWidth: content.implicitWidth
@@ -82,7 +84,7 @@ RadioButton {
Text {
text: root.headerText
wrapMode: Text.WordWrap
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 25
font.weight: 700
font.family: "PT Root UI VF"
@@ -97,7 +99,7 @@ RadioButton {
Text {
text: root.bodyText
wrapMode: Text.WordWrap
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: 400
font.family: "PT Root UI VF"
@@ -113,7 +115,7 @@ RadioButton {
text: root.footerText
wrapMode: Text.WordWrap
visible: root.footerText !== ""
color: "#878B91"
color: AmneziaStyle.color.grey
font.pixelSize: 13
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -3,32 +3,34 @@ import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes"
CheckBox {
id: root
property string descriptionText
property string descriptionTextColor: "#878B91"
property string descriptionTextDisabledColor: "#494B50"
property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string textColor: "#D7D8DB"
property string textDisabledColor: "#878B91"
property string textColor: AmneziaStyle.color.white
property string textDisabledColor: AmneziaStyle.color.grey
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: "transparent"
property string pressedColor: Qt.rgba(1, 1, 1, 0.05)
property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: AmneziaStyle.color.transparent
property string pressedColor: AmneziaStyle.color.blackPressed
property string defaultBorderColor: "#D7D8DB"
property string checkedBorderColor: "#FBB26A"
property string checkedBorderDisabledColor: "#402102"
property string defaultBorderColor: AmneziaStyle.color.white
property string checkedBorderColor: AmneziaStyle.color.orange
property string checkedBorderDisabledColor: AmneziaStyle.color.brownDark
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property string checkedImageColor: "#FBB26A"
property string pressedImageColor: "#A85809"
property string defaultImageColor: "transparent"
property string checkedDisabledImageColor: "#84603D"
property string checkedImageColor: AmneziaStyle.color.orange
property string pressedImageColor: AmneziaStyle.color.orangeDark
property string defaultImageColor: AmneziaStyle.color.transparent
property string checkedDisabledImageColor: AmneziaStyle.color.brownLight
property string imageSource: "qrc:/images/controls/check.svg"
@@ -45,8 +47,8 @@ CheckBox {
focusPolicy: Qt.NoFocus
background: Rectangle {
color: "transparent"
border.color: root.focus ? borderFocusedColor : "transparent"
color: AmneziaStyle.color.transparent
border.color: root.focus ? borderFocusedColor : AmneziaStyle.color.transparent
border.width: 1
radius: 16
}
@@ -77,7 +79,7 @@ CheckBox {
anchors.centerIn: parent
width: 24
height: 24
color: "transparent"
color: AmneziaStyle.color.transparent
border.color: root.checked ?
(root.enabled ?
checkedBorderColor :

View File

@@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Layouts
import Style 1.0
Rectangle {
Layout.fillWidth: true
@@ -8,5 +10,5 @@ Rectangle {
Layout.rightMargin: 16
height: 1
color: "#2C2D30"
color: AmneziaStyle.color.greyDark
}

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Item {
@@ -19,8 +21,8 @@ Item {
property Component collapsedContent
property Component expandedContent
property string defaultColor: "#1C1D21"
property string borderColor: "#2C2D30"
property string defaultColor: AmneziaStyle.color.blackLight
property string borderColor: AmneziaStyle.color.greyDark
property real expandedHeight
property real collapsedHeight: 0
@@ -90,7 +92,7 @@ Item {
id: background
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 {
PropertyAnimation { duration: 200 }

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
import "../Config"
@@ -9,31 +11,31 @@ Item {
id: root
property string text
property string textColor: "#d7d8db"
property string textDisabledColor: "#878B91"
property string textColor: AmneziaStyle.color.white
property string textDisabledColor: AmneziaStyle.color.grey
property int textMaximumLineCount: 2
property int textElide: Qt.ElideRight
property string descriptionText
property string descriptionTextColor: "#878B91"
property string descriptionTextDisabledColor: "#494B50"
property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string headerText
property string headerBackButtonImage
property var rootButtonClickedFunction
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
property string rootButtonImageColor: "#D7D8DB"
property string rootButtonBackgroundColor: "#1C1D21"
property string rootButtonBackgroundHoveredColor: "#1C1D21"
property string rootButtonBackgroundPressedColor: "#1C1D21"
property string rootButtonImageColor: AmneziaStyle.color.white
property string rootButtonBackgroundColor: AmneziaStyle.color.blackLight
property string rootButtonBackgroundHoveredColor: AmneziaStyle.color.blackLight
property string rootButtonBackgroundPressedColor: AmneziaStyle.color.blackLight
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
property string rootButtonHoveredBorderColor: "#494B50"
property string rootButtonDefaultBorderColor: "#2C2D30"
property string rootButtonPressedBorderColor: "#D7D8DB"
property string rootButtonHoveredBorderColor: AmneziaStyle.color.greyDisabled
property string rootButtonDefaultBorderColor: AmneziaStyle.color.greyDark
property string rootButtonPressedBorderColor: AmneziaStyle.color.white
property int rootButtonTextLeftMargins: 16
property int rootButtonTextTopMargin: 16
@@ -75,8 +77,8 @@ Item {
Rectangle {
id: focusBorder
color: "transparent"
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
color: AmneziaStyle.color.transparent
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
border.width: root.activeFocus ? root.borderFocusedWidth : 0
anchors.fill: rootButtonContent
radius: 16
@@ -96,7 +98,7 @@ Item {
}
return root.hovered ? root.rootButtonBackgroundHoveredColor : root.rootButtonBackgroundColor
} else {
return "transparent"
return AmneziaStyle.color.transparent
}
}

View File

@@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Item {
@@ -37,7 +39,7 @@ Item {
implicitHeight: 40
image: root.actionButtonImage
imageColor: "#D7D8DB"
imageColor: AmneziaStyle.color.white
visible: image ? true : false
@@ -57,7 +59,7 @@ Item {
text: root.descriptionText
color: "#878B91"
color: AmneziaStyle.color.grey
visible: root.descriptionText !== ""
}

View File

@@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Item {
@@ -46,7 +48,7 @@ Item {
Layout.alignment: Qt.AlignRight
image: root.actionButtonImage
imageColor: "#D7D8DB"
imageColor: AmneziaStyle.color.white
visible: image ? true : false
@@ -66,7 +68,7 @@ Item {
text: root.descriptionText
color: "#878B91"
color: AmneziaStyle.color.grey
visible: root.descriptionText !== ""
}

View File

@@ -2,24 +2,26 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
RadioButton {
id: root
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: Qt.rgba(1, 1, 1, 0)
property string checkedColor: Qt.rgba(1, 1, 1, 0)
property string disabledColor: "transparent"
property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: AmneziaStyle.color.transparent
property string checkedColor: AmneziaStyle.color.transparent
property string disabledColor: AmneziaStyle.color.transparent
property string textColor: "#D7D8DB"
property string textDisabledColor: "#878B91"
property string textColor: AmneziaStyle.color.white
property string textDisabledColor: AmneziaStyle.color.grey
property string pressedBorderColor: "#494B50"
property string checkedBorderColor: "#FBB26A"
property string defaultBodredColor: "transparent"
property string checkedDisabledBorderColor: "#84603D"
property string borderFocusedColor: "#D7D8DB"
property string pressedBorderColor: AmneziaStyle.color.greyDisabled
property string checkedBorderColor: AmneziaStyle.color.orange
property string defaultBodredColor: AmneziaStyle.color.transparent
property string checkedDisabledBorderColor: AmneziaStyle.color.brownLight
property string borderFocusedColor: AmneziaStyle.color.white
property int borderWidth: 0
implicitWidth: content.implicitWidth

View File

@@ -2,23 +2,25 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
Button {
id: root
property string image
property string hoveredColor: Qt.rgba(1, 1, 1, 0.08)
property string defaultColor: "transparent"
property string pressedColor: Qt.rgba(1, 1, 1, 0.12)
property string disableColor: "#2C2D30"
property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: AmneziaStyle.color.transparent
property string pressedColor: AmneziaStyle.color.blackPressed
property string disableColor: AmneziaStyle.color.greyDark
property string imageColor: "#878B91"
property string disableImageColor: "#2C2D30"
property string imageColor: AmneziaStyle.color.grey
property string disableImageColor: AmneziaStyle.color.greyDark
property alias backgroundColor: background.color
property alias backgroundRadius: background.radius
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
hoverEnabled: true
@@ -46,7 +48,7 @@ Button {
id: background
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
color: {

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Item {
@@ -24,16 +26,16 @@ Item {
property alias eyeButton: eyeImage
property FlickableType parentFlickable
property string textColor: "#d7d8db"
property string textDisabledColor: "#878B91"
property string descriptionColor: "#878B91"
property string descriptionDisabledColor: "#494B50"
property string textColor: AmneziaStyle.color.white
property string textDisabledColor: AmneziaStyle.color.grey
property string descriptionColor: AmneziaStyle.color.grey
property string descriptionDisabledColor: AmneziaStyle.color.greyDisabled
property real textOpacity: 1.0
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
property string rightImageColor: "#d7d8db"
property string rightImageColor: AmneziaStyle.color.white
property bool descriptionOnTop: false
property bool hideDescription: true
@@ -117,7 +119,7 @@ Item {
Layout.rightMargin: rightImageSource || !isLeftImageHoverEnabled ? 16 : 0
radius: 12
color: "transparent"
color: AmneziaStyle.color.transparent
Behavior on color {
PropertyAnimation { duration: 200 }
@@ -220,7 +222,7 @@ Item {
id: eyeImageBackground
anchors.fill: parent
radius: 12
color: "transparent"
color: AmneziaStyle.color.transparent
Behavior on color {
PropertyAnimation { duration: 200 }
@@ -257,7 +259,7 @@ Item {
id: rightImageBackground
anchors.fill: parent
radius: 12
color: "transparent"
color: AmneziaStyle.color.transparent
Behavior on color {
PropertyAnimation { duration: 200 }
@@ -274,9 +276,9 @@ Item {
Rectangle {
id: background
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

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
ListView {
@@ -103,8 +105,8 @@ ListView {
indicator: Rectangle {
width: parent.width - 1
height: parent.height
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
border.color: radioButton.focus ? "#D7D8DB" : "transparent"
color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
border.width: radioButton.focus ? 1 : 0
Behavior on color {

View File

@@ -2,6 +2,8 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Popup {
@@ -82,11 +84,11 @@ Popup {
implicitHeight: 32
defaultColor: "white"
hoveredColor: "#C1C2C5"
pressedColor: "#AEB0B7"
disabledColor: "#494B50"
hoveredColor: AmneziaStyle.color.whiteHovered
pressedColor: AmneziaStyle.color.whiteHovered
disabledColor: AmneziaStyle.color.greyDisabled
textColor: "#0E0E11"
textColor: AmneziaStyle.color.black
borderWidth: 0
text: qsTr("Close")

View File

@@ -2,20 +2,22 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
ProgressBar {
id: root
implicitHeight: 4
background: Rectangle {
color: "#633303"
color: AmneziaStyle.color.brown
}
contentItem: Item {
Rectangle {
width: root.visualPosition * parent.width
height: parent.height
color: "#FBB26A"
color: AmneziaStyle.color.orange
}
}
}

View File

@@ -2,36 +2,38 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Switch {
id: root
property alias descriptionText: description.text
property string descriptionTextColor: "#878B91"
property string descriptionTextDisabledColor: "#494B50"
property string descriptionTextColor: AmneziaStyle.color.grey
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
property string textColor: "#D7D8DB"
property string textDisabledColor: "#878B91"
property string textColor: AmneziaStyle.color.white
property string textDisabledColor: AmneziaStyle.color.grey
property string checkedIndicatorColor: "#633303"
property string defaultIndicatorColor: "transparent"
property string checkedDisabledIndicatorColor: "#402102"
property string checkedIndicatorColor: AmneziaStyle.color.brown
property string defaultIndicatorColor: AmneziaStyle.color.transparent
property string checkedDisabledIndicatorColor: AmneziaStyle.color.brownDark
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
property string checkedIndicatorBorderColor: "#633303"
property string defaultIndicatorBorderColor: "#494B50"
property string checkedDisabledIndicatorBorderColor: "#402102"
property string checkedIndicatorBorderColor: AmneziaStyle.color.brown
property string defaultIndicatorBorderColor: AmneziaStyle.color.greyDisabled
property string checkedDisabledIndicatorBorderColor: AmneziaStyle.color.brownDark
property string checkedInnerCircleColor: "#FBB26A"
property string defaultInnerCircleColor: "#D7D8DB"
property string checkedDisabledInnerCircleColor: "#84603D"
property string defaultDisabledInnerCircleColor: "#494B50"
property string checkedInnerCircleColor: AmneziaStyle.color.orange
property string defaultInnerCircleColor: AmneziaStyle.color.white
property string checkedDisabledInnerCircleColor: AmneziaStyle.color.brownLight
property string defaultDisabledInnerCircleColor: AmneziaStyle.color.greyDisabled
property string hoveredIndicatorBackgroundColor: Qt.rgba(1, 1, 1, 0.08)
property string defaultIndicatorBackgroundColor: "transparent"
property string hoveredIndicatorBackgroundColor: AmneziaStyle.color.blackHovered
property string defaultIndicatorBackgroundColor: AmneziaStyle.color.transparent
hoverEnabled: enabled ? true : false
focusPolicy: Qt.TabFocus
@@ -100,7 +102,8 @@ Switch {
contentItem: ColumnLayout {
id: content
anchors.verticalCenter: parent.verticalCenter
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
ListItemTitleType {

View File

@@ -1,16 +1,18 @@
import QtQuick
import QtQuick.Controls
import Style 1.0
TabButton {
id: root
property string hoveredColor: "#633303"
property string defaultColor: "#2C2D30"
property string selectedColor: "#FBB26A"
property string hoveredColor: AmneziaStyle.color.brown
property string defaultColor: AmneziaStyle.color.greyDark
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 bool isSelected: false
@@ -24,9 +26,9 @@ TabButton {
id: background
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
Rectangle {

View File

@@ -1,18 +1,20 @@
import QtQuick
import QtQuick.Controls
import Style 1.0
TabButton {
id: root
property string hoveredColor: "#633303"
property string defaultColor: "#D7D8DB"
property string selectedColor: "#FBB26A"
property string hoveredColor: AmneziaStyle.color.brown
property string defaultColor: AmneziaStyle.color.white
property string selectedColor: AmneziaStyle.color.orange
property string image
property bool isSelected: false
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
property var clickedFunc
@@ -26,10 +28,10 @@ TabButton {
background: Rectangle {
id: background
anchors.fill: parent
color: "transparent"
color: AmneziaStyle.color.transparent
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
}

View File

@@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Controls
import Style 1.0
Rectangle {
id: root
@@ -9,12 +11,12 @@ Rectangle {
property alias textArea: textArea
property alias textAreaText: textArea.text
property string borderHoveredColor: "#494B50"
property string borderNormalColor: "#2C2D30"
property string borderFocusedColor: "#d7d8db"
property string borderHoveredColor: AmneziaStyle.color.greyDisabled
property string borderNormalColor: AmneziaStyle.color.greyDark
property string borderFocusedColor: AmneziaStyle.color.white
height: 148
color: "#1C1D21"
color: AmneziaStyle.color.blackLight
border.width: 1
border.color: getBorderColor(borderNormalColor)
radius: 16
@@ -52,10 +54,10 @@ Rectangle {
anchors.topMargin: 16
anchors.bottomMargin: 16
color: "#D7D8DB"
selectionColor: "#633303"
selectedTextColor: "#D7D8DB"
placeholderTextColor: "#878B91"
color: AmneziaStyle.color.white
selectionColor: AmneziaStyle.color.brown
selectedTextColor: AmneziaStyle.color.white
placeholderTextColor: AmneziaStyle.color.grey
font.pixelSize: 16
font.weight: Font.Medium

View File

@@ -2,14 +2,16 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style 1.0
import "TextTypes"
Item {
id: root
property string headerText
property string headerTextDisabledColor: "#494B50"
property string headerTextColor: "#878b91"
property string headerTextDisabledColor: AmneziaStyle.color.greyDisabled
property string headerTextColor: AmneziaStyle.color.grey
property alias errorText: errorField.text
property bool checkEmptyText: false
@@ -21,18 +23,18 @@ Item {
property alias textField: textField
property alias textFieldText: textField.text
property string textFieldTextColor: "#d7d8db"
property string textFieldTextDisabledColor: "#878B91"
property string textFieldTextColor: AmneziaStyle.color.white
property string textFieldTextDisabledColor: AmneziaStyle.color.grey
property string textFieldPlaceholderText
property bool textFieldEditable: true
property string borderColor: "#2C2D30"
property string borderFocusedColor: "#d7d8db"
property string borderColor: AmneziaStyle.color.greyDark
property string borderFocusedColor: AmneziaStyle.color.white
property string backgroundColor: "#1c1d21"
property string backgroundDisabledColor: "transparent"
property string bgBorderHoveredColor: "#494B50"
property string backgroundColor: AmneziaStyle.color.blackLight
property string backgroundDisabledColor: AmneziaStyle.color.transparent
property string bgBorderHoveredColor: AmneziaStyle.color.greyDisabled
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
@@ -90,10 +92,10 @@ Item {
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
placeholderText: root.textFieldPlaceholderText
placeholderTextColor: "#494B50"
placeholderTextColor: AmneziaStyle.color.greyDisabled
selectionColor: "#633303"
selectedTextColor: "#D7D8DB"
selectionColor: AmneziaStyle.color.brown
selectedTextColor: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: 400
@@ -147,7 +149,7 @@ Item {
text: root.errorText
visible: root.errorText !== ""
color: "#EB5757"
color: AmneziaStyle.color.red
}
}

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 24
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: 600
font.family: "PT Root UI VF"

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 16 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#0E0E11"
color: AmneziaStyle.color.black
font.pixelSize: 13
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -1,14 +1,16 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 38 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
font.pixelSize: 36
color: AmneziaStyle.color.white
font.pixelSize: 32
font.weight: 700
font.family: "PT Root UI VF"
font.letterSpacing: -1.08
font.letterSpacing: -1.0
wrapMode: Text.WordWrap
}

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 30 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 25
font.weight: 700
font.family: "PT Root UI VF"

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 16 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#878B91"
color: AmneziaStyle.color.grey
font.pixelSize: 13
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 21.6 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 18
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -1,10 +1,11 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 24 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -1,10 +1,12 @@
import QtQuick
import Style 1.0
Text {
lineHeight: 20 + LanguageModel.getLineHeightAppend()
lineHeightMode: Text.FixedHeight
color: "#D7D8DB"
color: AmneziaStyle.color.white
font.pixelSize: 14
font.weight: 400
font.family: "PT Root UI VF"

View File

@@ -18,14 +18,14 @@ Popup {
}
background: Rectangle {
color: "transparent"
color: AmneziaStyle.color.transparent
}
ImageButtonType {
id: button
image: "qrc:/images/svg/close_black_24dp.svg"
imageColor: "#D7D8DB"
imageColor: AmneziaStyle.color.white
implicitWidth: 40
implicitHeight: 40

View File

@@ -3,6 +3,8 @@ import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes"
RadioButton {
@@ -12,15 +14,15 @@ RadioButton {
property int textElide: Qt.ElideRight
property string descriptionText
property string hoveredColor: Qt.rgba(1, 1, 1, 0.05)
property string defaultColor: Qt.rgba(1, 1, 1, 0)
property string disabledColor: Qt.rgba(1, 1, 1, 0)
property string selectedColor: Qt.rgba(1, 1, 1, 0)
property string hoveredColor: AmneziaStyle.color.blackHovered
property string defaultColor: AmneziaStyle.color.transparent
property string disabledColor: AmneziaStyle.color.transparent
property string selectedColor: AmneziaStyle.color.transparent
property string textColor: "#D7D8DB"
property string selectedTextColor: "#FBB26A"
property string textColor: AmneziaStyle.color.white
property string selectedTextColor: AmneziaStyle.color.orange
property string borderFocusedColor: "#D7D8DB"
property string borderFocusedColor: AmneziaStyle.color.white
property int borderFocusedWidth: 1
property string imageSource
@@ -34,7 +36,7 @@ RadioButton {
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
implicitWidth: 56
@@ -137,7 +139,7 @@ RadioButton {
CaptionTextType {
id: description
color: "#878B91"
color: AmneziaStyle.color.grey
text: root.descriptionText
visible: root.descriptionText !== ""

View File

@@ -3,14 +3,16 @@ import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Style 1.0
import "TextTypes"
Rectangle {
id: root
property string textColor: "#D7D8DB"
property string backGroundColor: "#1C1D21"
property string imageColor: "#D7D8DB"
property string textColor: AmneziaStyle.color.white
property string backGroundColor: AmneziaStyle.color.blackLight
property string imageColor: AmneziaStyle.color.white
property string textString
property int textFormat: Text.PlainText

View File

@@ -0,0 +1,26 @@
pragma Singleton
import QtQuick
QtObject {
property QtObject color: QtObject {
readonly property color transparent: 'transparent'
readonly property color white: '#D7D8DB'
readonly property color whiteHovered: '#C1C2C5'
readonly property color grey: '#878B91'
readonly property color greyDisabled: '#494B50'
readonly property color greyDark: '#2C2D30'
readonly property color blackLight: '#1C1D21'
readonly property color blackHovered: '#01010114'
readonly property color blackPressed: '#0101011f'
readonly property color black: '#0E0E11'
readonly property color orange: '#FBB26A'
readonly property color orangeDark: '#A85809'
readonly property color brownLight: '#84603D'
readonly property color brown: '#633303'
readonly property color brownDark: '#402102'
readonly property color red: '#EB5757'
readonly property color connectionInProgress: '#261E1A'
}
}

View File

@@ -0,0 +1,3 @@
module Style
singleton AmneziaStyle 1.0 AmneziaStyle.qml

View File

@@ -8,6 +8,7 @@ import PageEnum 1.0
import ProtocolEnum 1.0
import ContainerProps 1.0
import ContainersModelFilters 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -55,11 +56,11 @@ PageType {
implicitHeight: 36
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#878B91"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.grey
borderWidth: 0
visible: isLoggingEnabled ? true : false
@@ -84,6 +85,7 @@ PageType {
BasicButtonType {
id: splitTunnelingButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.bottomMargin: 34
leftPadding: 16
@@ -91,14 +93,18 @@ PageType {
implicitHeight: 36
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#878B91"
leftImageColor: "transparent"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.grey
leftImageColor: AmneziaStyle.color.transparent
borderWidth: 0
buttonTextLabel.lineHeight: 20
buttonTextLabel.font.pixelSize: 14
buttonTextLabel.font.weight: 500
property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled ||
(ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi"))
@@ -237,7 +243,7 @@ PageType {
hoverEnabled: false
image: "qrc:/images/controls/chevron-down.svg"
imageColor: "#d7d8db"
imageColor: AmneziaStyle.color.white
icon.width: 18
icon.height: 18
@@ -298,17 +304,17 @@ PageType {
DropDownType {
id: containersDropDown
rootButtonImageColor: "#0E0E11"
rootButtonBackgroundColor: "#D7D8DB"
rootButtonImageColor: AmneziaStyle.color.black
rootButtonBackgroundColor: AmneziaStyle.color.white
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
rootButtonHoveredBorderColor: "transparent"
rootButtonDefaultBorderColor: "transparent"
rootButtonHoveredBorderColor: AmneziaStyle.color.transparent
rootButtonDefaultBorderColor: AmneziaStyle.color.transparent
rootButtonTextTopMargin: 8
rootButtonTextBottomMargin: 8
text: ServersModel.defaultServerDefaultContainerName
textColor: "#0E0E11"
textColor: AmneziaStyle.color.black
headerText: qsTr("VPN protocol")
headerBackButtonImage: "qrc:/images/controls/arrow-left.svg"
@@ -499,7 +505,7 @@ PageType {
ImageButtonType {
id: serverInfoButton
image: "qrc:/images/controls/settings.svg"
imageColor: "#D7D8DB"
imageColor: AmneziaStyle.color.white
implicitWidth: 56
implicitHeight: 56

View File

@@ -6,6 +6,7 @@ import SortFilterProxyModel 0.2
import PageEnum 1.0
import ContainerEnum 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -294,7 +295,7 @@ PageType {
Layout.fillWidth: true
Layout.topMargin: 32
Layout.preferredHeight: checkboxLayout.implicitHeight
color: "#1C1D21"
color: AmneziaStyle.color.blackLight
radius: 16
Connections {

View File

@@ -8,6 +8,7 @@ import PageEnum 1.0
import ProtocolEnum 1.0
import ContainerEnum 1.0
import ContainerProps 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -191,9 +192,9 @@ PageType {
leftPadding: 0
height: 24
color: "#D7D8DB"
selectionColor: "#633303"
selectedTextColor: "#D7D8DB"
color: AmneziaStyle.color.white
selectionColor: AmneziaStyle.color.brown
selectedTextColor: AmneziaStyle.color.white
font.pixelSize: 16
font.weight: Font.Medium
@@ -204,7 +205,7 @@ PageType {
wrapMode: Text.Wrap
background: Rectangle {
color: "transparent"
color: AmneziaStyle.color.transparent
}
}
}
@@ -223,7 +224,7 @@ PageType {
visible: ServersModel.isProcessedServerHasWriteAccess()
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
textColor: "#EB5757"
textColor: AmneziaStyle.color.red
Keys.onTabPressed: lastItemTabClicked(focusItem)
clickedFunction: function() {

View File

@@ -5,6 +5,7 @@ import QtQuick.Layouts
import SortFilterProxyModel 0.2
import PageEnum 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -57,7 +58,7 @@ PageType {
Layout.rightMargin: 16
Layout.leftMargin: 16
headerText: "Amnezia DNS"
headerText: "AmneziaDNS"
descriptionText: qsTr("A DNS service is installed on your server, and it is only accessible via VPN.\n") +
qsTr("The DNS address is the same as the address of your server. You can configure DNS in the settings, under the connections tab.")
}
@@ -69,7 +70,7 @@ PageType {
width: parent.width
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
textColor: "#EB5757"
textColor: AmneziaStyle.color.red
Keys.onTabPressed: root.lastItemTabClicked()
@@ -81,7 +82,7 @@ PageType {
var yesButtonFunction = function() {
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected
&& SettingsController.isAmneziaDnsEnabled()) {
PageController.showNotificationMessage(qsTr("Cannot remove Amnezia DNS from running server"))
PageController.showNotificationMessage(qsTr("Cannot remove AmneziaDNS from running server"))
} else
{
PageController.goToPage(PageEnum.PageDeinstalling)
@@ -103,8 +104,6 @@ PageType {
enabled: false
}
}
DividerType {}
}
}
}

View File

@@ -5,6 +5,7 @@ import QtQuick.Layouts
import SortFilterProxyModel 0.2
import PageEnum 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -73,7 +74,7 @@ PageType {
onFocusChanged: {
if (focus) {
listview.currentItem.focusItem.forceActiveFocus()
listview.currentItem.listViewFocusItem.forceActiveFocus()
}
}
@@ -81,7 +82,7 @@ PageType {
implicitWidth: listview.width
implicitHeight: col.implicitHeight
property alias focusItem: hostLabel.rightButton
property alias listViewFocusItem: hostLabel.rightButton
ColumnLayout {
id: col
@@ -114,7 +115,7 @@ PageType {
descriptionOnTop: true
rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
clickedFunction: function() {
GC.copyToClipBoard(descriptionText)
@@ -138,7 +139,7 @@ PageType {
KeyNavigation.tab: usernameLabel.rightButton
rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
clickedFunction: function() {
GC.copyToClipBoard(descriptionText)
@@ -162,7 +163,7 @@ PageType {
KeyNavigation.tab: passwordLabel.eyeButton
rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
clickedFunction: function() {
GC.copyToClipBoard(descriptionText)
@@ -193,7 +194,7 @@ PageType {
}
rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
buttonImageSource: hideDescription ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg"
@@ -216,11 +217,11 @@ PageType {
Layout.leftMargin: 16
Layout.rightMargin: 16
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#D7D8DB"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.white
borderWidth: 1
parentFlickable: fl
@@ -232,7 +233,7 @@ PageType {
PageController.showBusyIndicator(true)
InstallController.mountSftpDrive(port, password, username)
PageController.showBusyIndicator(false)
}
}
}
ParagraphTextType {
@@ -280,57 +281,21 @@ PageType {
Layout.leftMargin: 8
implicitHeight: 32
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#FBB26A"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.orange
text: qsTr("Detailed instructions")
parentFlickable: fl
KeyNavigation.tab: removeButton
Keys.onTabPressed: lastItemTabClicked(focusItem)
clickedFunc: function() {
// Qt.openUrlExternally("https://github.com/amnezia-vpn/desktop-client/releases/latest")
}
}
BasicButtonType {
id: removeButton
Layout.topMargin: 24
Layout.bottomMargin: 16
Layout.leftMargin: 8
implicitHeight: 32
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
textColor: "#EB5757"
parentFlickable: fl
Keys.onTabPressed: lastItemTabClicked()
text: qsTr("Remove SFTP and all data stored there")
clickedFunc: function() {
var headerText = qsTr("Remove SFTP and all data stored there?")
var yesButtonText = qsTr("Continue")
var noButtonText = qsTr("Cancel")
var yesButtonFunction = function() {
PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeProcessedContainer()
}
var noButtonFunction = function() {
if (!GC.isMobile()) {
removeButton.forceActiveFocus()
}
}
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
}
}
}
}
}

View File

@@ -6,6 +6,7 @@ import SortFilterProxyModel 0.2
import PageEnum 1.0
import ContainerProps 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -82,12 +83,12 @@ PageType {
}
descriptionOnTop: true
textColor: "#FBB26A"
textColor: AmneziaStyle.color.orange
rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
KeyNavigation.tab: removeButton
Keys.onTabPressed: lastItemTabClicked(focusItem)
clickedFunction: function() {
GC.copyToClipBoard(descriptionText)
@@ -126,41 +127,6 @@ PageType {
text: qsTr("When configuring WordPress set the this onion address as domain.")
}
BasicButtonType {
id: removeButton
Layout.topMargin: 24
Layout.bottomMargin: 16
Layout.leftMargin: 8
implicitHeight: 32
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
textColor: "#EB5757"
text: qsTr("Remove website")
Keys.onTabPressed: lastItemTabClicked(focusItem)
clickedFunc: function() {
var headerText = qsTr("The site with all data will be removed from the tor network.")
var yesButtonText = qsTr("Continue")
var noButtonText = qsTr("Cancel")
var yesButtonFunction = function() {
PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeProcessedContainer()
}
var noButtonFunction = function() {
if (!GC.isMobile()) {
removeButton.forceActiveFocus()
}
}
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
}
}
}
}
}

View File

@@ -3,6 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import PageEnum 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -84,7 +85,7 @@ PageType {
font.pixelSize: 14
text: qsTr("Amnezia is a free and open-source application. You can support the developers if you like it.")
color: "#CCCAC8"
color: AmneziaStyle.color.white
}
ParagraphTextType {
@@ -176,7 +177,7 @@ PageType {
horizontalAlignment: Text.AlignHCenter
text: qsTr("Software version: %1").arg(SettingsController.getAppVersion())
color: "#878B91"
color: AmneziaStyle.color.grey
}
BasicButtonType {
@@ -186,11 +187,11 @@ PageType {
Layout.bottomMargin: 16
implicitHeight: 32
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#FBB26A"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.orange
text: qsTr("Check for updates")
@@ -209,11 +210,11 @@ PageType {
Layout.topMargin: -15
implicitHeight: 25
defaultColor: "transparent"
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
pressedColor: Qt.rgba(1, 1, 1, 0.12)
disabledColor: "#878B91"
textColor: "#FBB26A"
defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.blackHovered
pressedColor: AmneziaStyle.color.blackPressed
disabledColor: AmneziaStyle.color.grey
textColor: AmneziaStyle.color.orange
text: qsTr("Privacy Policy")

View File

@@ -10,6 +10,7 @@ import SortFilterProxyModel 0.2
import PageEnum 1.0
import ProtocolEnum 1.0
import ContainerProps 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -214,7 +215,7 @@ PageType {
text: appPath
rightImageSource: "qrc:/images/controls/trash.svg"
rightImageColor: "#D7D8DB"
rightImageColor: AmneziaStyle.color.white
clickedFunction: function() {
var headerText = qsTr("Remove ") + appPath + "?"
@@ -241,7 +242,7 @@ PageType {
Rectangle {
anchors.fill: addAppButton
anchors.bottomMargin: -24
color: "#0E0E11"
color: AmneziaStyle.color.black
opacity: 0.8
}
@@ -275,7 +276,7 @@ PageType {
if (Qt.platform.os === "windows") {
var fileName = SystemController.getFileName(qsTr("Open executable file"),
qsTr("Executable file (*.*)"))
qsTr("Executable files (*.*)"))
if (fileName !== "") {
AppSplitTunnelingController.addApp(fileName)
}

View File

@@ -3,6 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import PageEnum 1.0
import Style 1.0
import "./"
import "../Controls2"
@@ -50,6 +51,8 @@ PageType {
anchors.left: parent.left
anchors.right: parent.right
spacing: 0
HeaderType {
Layout.fillWidth: true
Layout.leftMargin: 16
@@ -221,7 +224,7 @@ PageType {
text: qsTr("Reset settings and remove all data from the application")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
textColor: "#EB5757"
textColor: AmneziaStyle.color.red
Keys.onTabPressed: lastItemTabClicked()
parentFlickable: fl

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