mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-07-03 14:07:39 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 407350a4b4 | |||
| c98faf3603 |
+2
-2
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
||||
|
||||
set(PROJECT AmneziaVPN)
|
||||
|
||||
project(${PROJECT} VERSION 4.6.0.3
|
||||
project(${PROJECT} VERSION 4.6.0.1
|
||||
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 55)
|
||||
set(APP_ANDROID_VERSION_CODE 54)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(MZ_PLATFORM_NAME "linux")
|
||||
|
||||
@@ -18,9 +18,7 @@ Amnezia is an open-source VPN client, with a key feature that enables you to dep
|
||||
|
||||
[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_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)
|
||||
|
||||
## Tech
|
||||
@@ -54,7 +52,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.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:
|
||||
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:
|
||||
- MacOS
|
||||
- iOS
|
||||
- Qt 5 Compatibility Module
|
||||
@@ -144,10 +142,10 @@ GPL v3.0
|
||||
|
||||
## Donate
|
||||
|
||||
Patreon: [https://www.patreon.com/amneziavpn](https://www.patreon.com/amneziavpn)
|
||||
USDT BEP20: 0x6abD576765a826f87D1D95183438f9408C901bE4
|
||||
USDT TRC20: TELAitazF1MZGmiNjTcnxDjEiH5oe7LC9d
|
||||
Bitcoin: bc1qn9rhsffuxwnhcuuu4qzrwp4upkrq94xnh8r26u
|
||||
XMR: 48spms39jt1L2L5vyw2RQW6CXD6odUd4jFu19GZcDyKKQV9U88wsJVjSbL4CfRys37jVMdoaWVPSvezCQPhHXUW5UKLqUp3
|
||||
payeer.com: P2561305
|
||||
ko-fi.com: [https://ko-fi.com/amnezia_vpn](https://ko-fi.com/amnezia_vpn)
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
|
||||
+1
-1
Submodule client/3rd-prebuilt updated: ff8445c8aa...ea49bf8796
Vendored
+1
-1
Submodule client/3rd/amneziawg-apple updated: 76e7db556a...0829e99ea9
@@ -157,7 +157,6 @@ 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));
|
||||
|
||||
|
||||
@@ -384,8 +384,7 @@ class AmneziaActivity : QtActivity() {
|
||||
getVpnProto(vpnConfig)?.let { proto ->
|
||||
Log.d(TAG, "Proto from config: $proto, current proto: $vpnProto")
|
||||
if (isServiceConnected) {
|
||||
if (proto.serviceClass == vpnProto?.serviceClass) {
|
||||
vpnProto = proto
|
||||
if (proto == vpnProto) {
|
||||
connectToVpn(vpnConfig)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -49,15 +49,7 @@ enum class VpnProto(
|
||||
"org.amnezia.vpn:amneziaXrayService",
|
||||
XrayService::class.java
|
||||
) {
|
||||
override fun createProtocol(): Protocol = Xray.instance
|
||||
},
|
||||
|
||||
SSXRAY(
|
||||
"SSXRay",
|
||||
"org.amnezia.vpn:amneziaXrayService",
|
||||
XrayService::class.java
|
||||
) {
|
||||
override fun createProtocol(): Protocol = Xray.instance
|
||||
override fun createProtocol(): Protocol = Xray()
|
||||
};
|
||||
|
||||
private var _protocol: Protocol? = null
|
||||
|
||||
@@ -5,7 +5,6 @@ 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
|
||||
@@ -115,14 +114,17 @@ class Xray : Protocol() {
|
||||
return
|
||||
}
|
||||
|
||||
val xrayJsonConfig = config.optJSONObject("xray_config_data")
|
||||
?: config.optJSONObject("ssxray_config_data")
|
||||
?: throw BadConfigException("config_data not found")
|
||||
val xrayJsonConfig = config.getJSONObject("xray_config_data")
|
||||
val xrayConfig = parseConfig(config, xrayJsonConfig)
|
||||
|
||||
(xrayJsonConfig.optJSONObject("log") ?: JSONObject().also { xrayJsonConfig.put("log", it) })
|
||||
.put("loglevel", "warning")
|
||||
.put("access", "none") // disable access log
|
||||
// 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")
|
||||
|
||||
start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect)
|
||||
state.value = CONNECTED
|
||||
@@ -226,10 +228,6 @@ 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) {
|
||||
|
||||
@@ -90,7 +90,7 @@ QMap<DockerContainer, QString> ContainerProps::containerHumanNames()
|
||||
{
|
||||
return { { DockerContainer::None, "Not installed" },
|
||||
{ DockerContainer::OpenVpn, "OpenVPN" },
|
||||
{ DockerContainer::ShadowSocks, "OpenVPN over SS" },
|
||||
{ DockerContainer::ShadowSocks, "ShadowSocks" },
|
||||
{ DockerContainer::Cloak, "OpenVPN over Cloak" },
|
||||
{ DockerContainer::WireGuard, "WireGuard" },
|
||||
{ DockerContainer::Awg, "AmneziaWG" },
|
||||
@@ -285,7 +285,6 @@ bool ContainerProps::isSupportedByCurrentPlatform(DockerContainer c)
|
||||
case DockerContainer::WireGuard: return true;
|
||||
case DockerContainer::OpenVpn: return true;
|
||||
case DockerContainer::Awg: return true;
|
||||
case DockerContainer::Xray: return true;
|
||||
case DockerContainer::Cloak:
|
||||
return true;
|
||||
// case DockerContainer::ShadowSocks: return true;
|
||||
@@ -306,7 +305,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -390,18 +388,3 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,8 +72,6 @@ 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()
|
||||
|
||||
@@ -50,12 +50,10 @@ set_target_properties("networkextension" PROPERTIES
|
||||
find_library(FW_ASSETS_LIBRARY AssetsLibrary)
|
||||
find_library(FW_MOBILE_CORE MobileCoreServices)
|
||||
find_library(FW_UI_KIT UIKit)
|
||||
find_library(FW_LIBRESOLV libresolv.9.tbd)
|
||||
|
||||
target_link_libraries(networkextension PRIVATE ${FW_ASSETS_LIBRARY})
|
||||
target_link_libraries(networkextension PRIVATE ${FW_MOBILE_CORE})
|
||||
target_link_libraries(networkextension PRIVATE ${FW_UI_KIT})
|
||||
target_link_libraries(networkextension PRIVATE ${FW_LIBRESOLV})
|
||||
|
||||
target_compile_options(networkextension PRIVATE -DGROUP_ID=\"${BUILD_IOS_GROUP_IDENTIFIER}\")
|
||||
target_compile_options(networkextension PRIVATE -DNETWORK_EXTENSION=1)
|
||||
@@ -82,14 +80,12 @@ target_sources(networkextension PRIVATE
|
||||
${WG_APPLE_SOURCE_DIR}/WireGuardKit/Array+ConcurrentMap.swift
|
||||
${WG_APPLE_SOURCE_DIR}/WireGuardKit/IPAddress+AddrInfo.swift
|
||||
${WG_APPLE_SOURCE_DIR}/WireGuardKit/PrivateKey.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/HevSocksTunnel.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/NELogController.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/Log.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/LogRecord.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider.swift
|
||||
${CLIENT_ROOT_DIR}/platforms/ios/PacketTunnelProvider+WireGuard.swift
|
||||
${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/iosglue.mm
|
||||
)
|
||||
@@ -118,5 +114,3 @@ target_include_directories(networkextension PRIVATE ${CLIENT_ROOT_DIR})
|
||||
target_include_directories(networkextension PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_link_libraries(networkextension PRIVATE ${CLIENT_ROOT_DIR}/3rd-prebuilt/3rd-prebuilt/wireguard/ios/arm64/libwg-go.a)
|
||||
|
||||
target_link_libraries(networkextension PRIVATE ${CLIENT_ROOT_DIR}/3rd-prebuilt/3rd-prebuilt/xray/HevSocks5Tunnel.xcframework)
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
import HevSocks5Tunnel
|
||||
|
||||
public enum Socks5Tunnel {
|
||||
|
||||
private static var tunnelFileDescriptor: Int32? {
|
||||
var ctlInfo = ctl_info()
|
||||
withUnsafeMutablePointer(to: &ctlInfo.ctl_name) {
|
||||
$0.withMemoryRebound(to: CChar.self, capacity: MemoryLayout.size(ofValue: $0.pointee)) {
|
||||
_ = strcpy($0, "com.apple.net.utun_control")
|
||||
}
|
||||
}
|
||||
for fd: Int32 in 0...1024 {
|
||||
var addr = sockaddr_ctl()
|
||||
var ret: Int32 = -1
|
||||
var len = socklen_t(MemoryLayout.size(ofValue: addr))
|
||||
withUnsafeMutablePointer(to: &addr) {
|
||||
$0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
|
||||
ret = getpeername(fd, $0, &len)
|
||||
}
|
||||
}
|
||||
if ret != 0 || addr.sc_family != AF_SYSTEM {
|
||||
continue
|
||||
}
|
||||
if ctlInfo.ctl_id == 0 {
|
||||
ret = ioctl(fd, CTLIOCGINFO, &ctlInfo)
|
||||
if ret != 0 {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if addr.sc_id == ctlInfo.ctl_id {
|
||||
return fd
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
private static var interfaceName: String? {
|
||||
guard let tunnelFileDescriptor = self.tunnelFileDescriptor else {
|
||||
return nil
|
||||
}
|
||||
var buffer = [UInt8](repeating: 0, count: Int(IFNAMSIZ))
|
||||
return buffer.withUnsafeMutableBufferPointer { mutableBufferPointer in
|
||||
guard let baseAddress = mutableBufferPointer.baseAddress else {
|
||||
return nil
|
||||
}
|
||||
var ifnameSize = socklen_t(IFNAMSIZ)
|
||||
let result = getsockopt(
|
||||
tunnelFileDescriptor,
|
||||
2 /* SYSPROTO_CONTROL */,
|
||||
2 /* UTUN_OPT_IFNAME */,
|
||||
baseAddress,
|
||||
&ifnameSize
|
||||
)
|
||||
if result == 0 {
|
||||
return String(cString: baseAddress)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public static func run(withConfig filePath: String) -> Int32 {
|
||||
guard let fileDescriptor = self.tunnelFileDescriptor else {
|
||||
fatalError("Get tunnel file descriptor failed.")
|
||||
}
|
||||
return hev_socks5_tunnel_main(filePath.cString(using: .utf8), fileDescriptor)
|
||||
}
|
||||
|
||||
public static func quit() {
|
||||
hev_socks5_tunnel_quit()
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,6 @@ public func ovpnLog(_ type: OSLogType, title: String = "", message: String) {
|
||||
neLog(type, title: "OVPN: \(title)", message: message)
|
||||
}
|
||||
|
||||
public func xrayLog(_ type: OSLogType, title: String = "", message: String) {
|
||||
neLog(type, title: "XRAY: \(title)", message: message)
|
||||
}
|
||||
|
||||
public func neLog(_ type: OSLogType, title: String = "", message: String) {
|
||||
Log.log(type, title: "NE: \(title)", message: message)
|
||||
}
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
import Foundation
|
||||
import NetworkExtension
|
||||
import WireGuardKitGo
|
||||
|
||||
enum XrayErrors: Error {
|
||||
case noXrayConfig
|
||||
case cantSaveXrayConfig
|
||||
case cantParseListenAndPort
|
||||
case cantSaveHevSocksConfig
|
||||
}
|
||||
|
||||
extension Constants {
|
||||
static let cachesDirectory: URL = {
|
||||
if let cachesDirectoryURL = FileManager.default.urls(for: .cachesDirectory,
|
||||
in: .userDomainMask).first {
|
||||
return cachesDirectoryURL
|
||||
} else {
|
||||
fatalError("Unable to retrieve caches directory.")
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
extension PacketTunnelProvider {
|
||||
func startXray(completionHandler: @escaping (Error?) -> Void) {
|
||||
|
||||
// Xray configuration
|
||||
guard let protocolConfiguration = self.protocolConfiguration as? NETunnelProviderProtocol,
|
||||
let providerConfiguration = protocolConfiguration.providerConfiguration,
|
||||
let xrayConfigData = providerConfiguration[Constants.xrayConfigKey] as? Data else {
|
||||
xrayLog(.error, message: "Can't get xray configuration")
|
||||
completionHandler(XrayErrors.noXrayConfig)
|
||||
return
|
||||
}
|
||||
|
||||
// Tunnel settings
|
||||
let ipv6Enabled = true
|
||||
let hideVPNIcon = false
|
||||
|
||||
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "254.1.1.1")
|
||||
settings.mtu = 9000
|
||||
|
||||
settings.ipv4Settings = {
|
||||
let settings = NEIPv4Settings(addresses: ["198.18.0.1"], subnetMasks: ["255.255.0.0"])
|
||||
settings.includedRoutes = [NEIPv4Route.default()]
|
||||
return settings
|
||||
}()
|
||||
|
||||
settings.ipv6Settings = {
|
||||
guard ipv6Enabled else {
|
||||
return nil
|
||||
}
|
||||
let settings = NEIPv6Settings(addresses: ["fd6e:a81b:704f:1211::1"], networkPrefixLengths: [64])
|
||||
settings.includedRoutes = [NEIPv6Route.default()]
|
||||
if hideVPNIcon {
|
||||
settings.excludedRoutes = [NEIPv6Route(destinationAddress: "::", networkPrefixLength: 128)]
|
||||
}
|
||||
return settings
|
||||
}()
|
||||
|
||||
let dns = ["8.8.4.4","1.1.1.1"]
|
||||
settings.dnsSettings = NEDNSSettings(servers: dns)
|
||||
|
||||
do {
|
||||
let port = 10808
|
||||
let address = "::1"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 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
|
||||
}
|
||||
}
|
||||
|
||||
func stopXray(completionHandler: () -> Void) {
|
||||
Socks5Tunnel.quit()
|
||||
LibXrayStopXray()
|
||||
completionHandler()
|
||||
}
|
||||
|
||||
private func setupAndStartXray(configData: Data,
|
||||
completionHandler: @escaping (Error?) -> Void) {
|
||||
let path = Constants.cachesDirectory.appendingPathComponent("config.json", isDirectory: false).path
|
||||
guard FileManager.default.createFile(atPath: path, contents: configData) else {
|
||||
xrayLog(.error, message: "Can't save xray configuration")
|
||||
completionHandler(XrayErrors.cantSaveXrayConfig)
|
||||
return
|
||||
}
|
||||
|
||||
LibXrayRunXray(nil,
|
||||
path,
|
||||
Int64.max)
|
||||
|
||||
completionHandler(nil)
|
||||
xrayLog(.info, message: "Xray started")
|
||||
}
|
||||
|
||||
private func setupAndRunTun2socks(configData: Data,
|
||||
address: String,
|
||||
port: Int,
|
||||
completionHandler: @escaping (Error?) -> Void) {
|
||||
let config = """
|
||||
tunnel:
|
||||
mtu: 9000
|
||||
socks5:
|
||||
port: \(port)
|
||||
address: \(address)
|
||||
udp: 'udp'
|
||||
misc:
|
||||
task-stack-size: 20480
|
||||
connect-timeout: 5000
|
||||
read-write-timeout: 60000
|
||||
log-file: stderr
|
||||
log-level: error
|
||||
limit-nofile: 65535
|
||||
"""
|
||||
|
||||
let configurationFilePath = Constants.cachesDirectory.appendingPathComponent("config.yml", isDirectory: false).path
|
||||
guard FileManager.default.createFile(atPath: configurationFilePath, contents: config.data(using: .utf8)!) else {
|
||||
xrayLog(.info, message: "Cant save hevSocks configuration")
|
||||
completionHandler(XrayErrors.cantSaveHevSocksConfig)
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.global().async {
|
||||
xrayLog(.info, message: "Hev socks started")
|
||||
completionHandler(nil)
|
||||
Socks5Tunnel.run(withConfig: configurationFilePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,7 @@ import Darwin
|
||||
import OpenVPNAdapter
|
||||
|
||||
enum TunnelProtoType: String {
|
||||
case wireguard, openvpn, xray
|
||||
|
||||
case wireguard, openvpn
|
||||
}
|
||||
|
||||
struct Constants {
|
||||
@@ -14,7 +13,6 @@ struct Constants {
|
||||
static let processQueueName = "org.amnezia.process-packets"
|
||||
static let kActivationAttemptId = "activationAttemptId"
|
||||
static let ovpnConfigKey = "ovpn"
|
||||
static let xrayConfigKey = "xray"
|
||||
static let wireGuardConfigKey = "wireguard"
|
||||
static let loggerTag = "NET"
|
||||
|
||||
@@ -93,8 +91,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
protoType = .openvpn
|
||||
} else if (providerConfiguration?[Constants.wireGuardConfigKey] as? Data) != nil {
|
||||
protoType = .wireguard
|
||||
} else if (providerConfiguration?[Constants.xrayConfigKey] as? Data) != nil {
|
||||
protoType = .xray
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,9 +107,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
completionHandler: completionHandler)
|
||||
case .openvpn:
|
||||
startOpenVPN(completionHandler: completionHandler)
|
||||
case .xray:
|
||||
startXray(completionHandler: completionHandler)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +124,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
case .openvpn:
|
||||
stopOpenVPN(with: reason,
|
||||
completionHandler: completionHandler)
|
||||
case .xray:
|
||||
stopXray(completionHandler: completionHandler)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +138,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||
handleWireguardStatusMessage(messageData, completionHandler: completionHandler)
|
||||
case .openvpn:
|
||||
handleOpenVPNStatusMessage(messageData, completionHandler: completionHandler)
|
||||
case .xray:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 == nil ? "" : "PresharedKey = \(presharedKey!)")
|
||||
PresharedKey = \(presharedKey)
|
||||
AllowedIPs = \(allowedIPs.joined(separator: ", "))
|
||||
Endpoint = \(hostName):\(port)
|
||||
PersistentKeepalive = \(persistentKeepAlive)
|
||||
|
||||
@@ -72,11 +72,9 @@ private:
|
||||
bool setupCloak();
|
||||
bool setupWireGuard();
|
||||
bool setupAwg();
|
||||
bool setupXray();
|
||||
|
||||
bool startOpenVPN(const QString &config);
|
||||
bool startWireGuard(const QString &jsonConfig);
|
||||
bool startXray(const QString &jsonConfig);
|
||||
|
||||
void startTunnel();
|
||||
|
||||
|
||||
@@ -216,9 +216,6 @@ bool IosController::connectVpn(amnezia::Proto proto, const QJsonObject& configur
|
||||
if (proto == amnezia::Proto::Awg) {
|
||||
return setupAwg();
|
||||
}
|
||||
if (proto == amnezia::Proto::Xray) {
|
||||
return setupXray();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -504,15 +501,6 @@ bool IosController::setupWireGuard()
|
||||
return startWireGuard(wgConfigDocStr);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
bool IosController::setupAwg()
|
||||
{
|
||||
QJsonObject config = m_rawConfig[ProtocolProps::key_proto_config_data(amnezia::Proto::Awg)].toObject();
|
||||
@@ -602,20 +590,6 @@ bool IosController::startWireGuard(const QString &config)
|
||||
startTunnel();
|
||||
}
|
||||
|
||||
bool IosController::startXray(const QString &config)
|
||||
{
|
||||
qDebug() << "IosController::startXray";
|
||||
|
||||
NETunnelProviderProtocol *tunnelProtocol = [[NETunnelProviderProtocol alloc] init];
|
||||
tunnelProtocol.providerBundleIdentifier = [NSString stringWithUTF8String:VPN_NE_BUNDLEID];
|
||||
tunnelProtocol.providerConfiguration = @{@"xray": [[NSString stringWithUTF8String:config.toStdString().c_str()] dataUsingEncoding:NSUTF8StringEncoding]};
|
||||
tunnelProtocol.serverAddress = m_serverAddress;
|
||||
|
||||
m_currentTunnel.protocolConfiguration = tunnelProtocol;
|
||||
|
||||
startTunnel();
|
||||
}
|
||||
|
||||
void IosController::startTunnel()
|
||||
{
|
||||
NSString *protocolName = @"Unknown";
|
||||
|
||||
@@ -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.contains(IPAddress("0.0.0.0/0"))) {
|
||||
if (config.m_allowedIPAddressRanges.at(0).toString() == "0.0.0.0/0"){
|
||||
params.blockAll = true;
|
||||
if (config.m_excludedAddresses.size()) {
|
||||
params.allowNets = true;
|
||||
|
||||
@@ -137,8 +137,7 @@ bool WireguardUtilsMacos::addInterface(const InterfaceConfig& config) {
|
||||
if (config.m_killSwitchEnabled) {
|
||||
FirewallParams params { };
|
||||
params.dnsServers.append(config.m_dnsServer);
|
||||
|
||||
if (config.m_allowedIPAddressRanges.contains(IPAddress("0.0.0.0/0"))) {
|
||||
if (config.m_allowedIPAddressRanges.at(0).toString() == "0.0.0.0/0"){
|
||||
params.blockAll = true;
|
||||
if (config.m_excludedAddresses.size()) {
|
||||
params.allowNets = true;
|
||||
|
||||
@@ -239,8 +239,6 @@
|
||||
<file>images/controls/alert-circle.svg</file>
|
||||
<file>images/controls/file-check-2.svg</file>
|
||||
<file>ui/qml/Controls2/WarningType.qml</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>
|
||||
|
||||
@@ -1,31 +1,27 @@
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
sudo iptables -C INPUT -p icmp --icmp-type echo-request -j DROP || sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
|
||||
|
||||
#sudo iptables -P FORWARD ACCEPT
|
||||
sudo iptables -C FORWARD -j DOCKER-USER || sudo iptables -A FORWARD -j DOCKER-USER
|
||||
sudo iptables -C FORWARD -j DOCKER-ISOLATION-STAGE-1 || sudo iptables -A FORWARD -j DOCKER-ISOLATION-STAGE-1; \
|
||||
sudo iptables -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT || sudo iptables -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT; \
|
||||
sudo iptables -C FORWARD -o docker0 -j DOCKER || sudo iptables -A FORWARD -o docker0 -j DOCKER; \
|
||||
sudo iptables -C FORWARD -i docker0 ! -o docker0 -j ACCEPT || sudo iptables -A FORWARD -i docker0 ! -o docker0 -j ACCEPT; \
|
||||
sudo iptables -C FORWARD -i docker0 -o docker0 -j ACCEPT || sudo iptables -A FORWARD -i docker0 -o docker0 -j ACCEPT
|
||||
|
||||
# Tuning network
|
||||
sudo sysctl fs.file-max=51200; \
|
||||
sudo sysctl net.core.rmem_max=67108864; \
|
||||
sudo sysctl net.core.wmem_max=67108864; \
|
||||
sudo sysctl net.core.netdev_max_backlog=250000; \
|
||||
sudo sysctl net.core.somaxconn=4096; \
|
||||
sudo sysctl net.ipv4.tcp_syncookies=1; \
|
||||
sudo sysctl net.ipv4.tcp_tw_reuse=1; \
|
||||
sudo sysctl net.ipv4.tcp_tw_recycle=0; \
|
||||
sudo sysctl net.ipv4.tcp_fin_timeout=30; \
|
||||
sudo sysctl net.ipv4.tcp_keepalive_time=1200; \
|
||||
sudo sysctl net.ipv4.ip_local_port_range="10000 65000"; \
|
||||
sudo sysctl net.ipv4.tcp_max_syn_backlog=8192; \
|
||||
sudo sysctl net.ipv4.tcp_max_tw_buckets=5000; \
|
||||
sudo sysctl net.ipv4.tcp_fastopen=3; \
|
||||
sudo sysctl net.ipv4.tcp_mem="25600 51200 102400"; \
|
||||
sudo sysctl net.ipv4.tcp_rmem="4096 87380 67108864"; \
|
||||
sudo sysctl net.ipv4.tcp_wmem="4096 65536 67108864"; \
|
||||
sudo sysctl net.ipv4.tcp_mtu_probing=1; \
|
||||
sudo sysctl -w net.ipv4.ip_forward=1;\
|
||||
sudo iptables -C INPUT -p icmp --icmp-type echo-request -j DROP || sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP;\
|
||||
sudo iptables -C FORWARD -j DOCKER-USER || sudo iptables -A FORWARD -j DOCKER-USER;\
|
||||
sudo iptables -C FORWARD -j DOCKER-ISOLATION-STAGE-1 || sudo iptables -A FORWARD -j DOCKER-ISOLATION-STAGE-1;\
|
||||
sudo iptables -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT || sudo iptables -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT;\
|
||||
sudo iptables -C FORWARD -o docker0 -j DOCKER || sudo iptables -A FORWARD -o docker0 -j DOCKER;\
|
||||
sudo iptables -C FORWARD -i docker0 ! -o docker0 -j ACCEPT || sudo iptables -A FORWARD -i docker0 ! -o docker0 -j ACCEPT;\
|
||||
sudo iptables -C FORWARD -i docker0 -o docker0 -j ACCEPT || sudo iptables -A FORWARD -i docker0 -o docker0 -j ACCEPT;\
|
||||
sudo sysctl fs.file-max=51200;\
|
||||
sudo sysctl net.core.rmem_max=67108864;\
|
||||
sudo sysctl net.core.wmem_max=67108864;\
|
||||
sudo sysctl net.core.netdev_max_backlog=250000;\
|
||||
sudo sysctl net.core.somaxconn=4096;\
|
||||
sudo sysctl net.ipv4.tcp_syncookies=1;\
|
||||
sudo sysctl net.ipv4.tcp_tw_reuse=1;\
|
||||
sudo sysctl net.ipv4.tcp_tw_recycle=0;\
|
||||
sudo sysctl net.ipv4.tcp_fin_timeout=30;\
|
||||
sudo sysctl net.ipv4.tcp_keepalive_time=1200;\
|
||||
sudo sysctl net.ipv4.ip_local_port_range="10000 65000";\
|
||||
sudo sysctl net.ipv4.tcp_max_syn_backlog=8192;\
|
||||
sudo sysctl net.ipv4.tcp_max_tw_buckets=5000;\
|
||||
sudo sysctl net.ipv4.tcp_fastopen=3;\
|
||||
sudo sysctl net.ipv4.tcp_mem="25600 51200 102400";\
|
||||
sudo sysctl net.ipv4.tcp_rmem="4096 87380 67108864";\
|
||||
sudo sysctl net.ipv4.tcp_wmem="4096 65536 67108864";\
|
||||
sudo sysctl net.ipv4.tcp_mtu_probing=1;\
|
||||
sudo sysctl net.ipv4.tcp_congestion_control=hybla
|
||||
|
||||
@@ -41,7 +41,6 @@ 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();
|
||||
@@ -113,7 +112,5 @@ QHash<int, QByteArray> ContainersModel::roleNames() const
|
||||
roles[IsCurrentlyProcessedRole] = "isCurrentlyProcessed";
|
||||
roles[IsSupportedRole] = "isSupported";
|
||||
roles[IsShareableRole] = "isShareable";
|
||||
|
||||
roles[InstallPageOrderRole] = "installPageOrder";
|
||||
return roles;
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ public:
|
||||
IsCurrentlyProcessedRole,
|
||||
IsDefaultRole,
|
||||
IsSupportedRole,
|
||||
IsShareableRole,
|
||||
|
||||
InstallPageOrderRole
|
||||
IsShareableRole
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
@@ -6,14 +6,13 @@ import Qt5Compat.GraphicalEffects
|
||||
|
||||
import ConnectionState 1.0
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
Button {
|
||||
id: root
|
||||
|
||||
property string defaultButtonColor: AmneziaStyle.color.white
|
||||
property string progressButtonColor: AmneziaStyle.color.white
|
||||
property string connectedButtonColor: AmneziaStyle.color.orange
|
||||
property string defaultButtonColor: "#D7D8DB"
|
||||
property string progressButtonColor: "#D7D8DB"
|
||||
property string connectedButtonColor: "#FBB26A"
|
||||
|
||||
implicitWidth: 190
|
||||
implicitHeight: 190
|
||||
@@ -50,13 +49,13 @@ Button {
|
||||
verticalOffset: 0
|
||||
radius: 10
|
||||
samples: 25
|
||||
color: root.activeFocus ? AmneziaStyle.color.white : AmneziaStyle.color.orange
|
||||
color: root.activeFocus ? "#D7D8DB" : "#FBB26A"
|
||||
source: backgroundCircle
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: AmneziaStyle.color.transparent
|
||||
strokeColor: AmneziaStyle.color.white
|
||||
fillColor: "transparent"
|
||||
strokeColor: "#D7D8DB"
|
||||
strokeWidth: root.activeFocus ? 1 : 0
|
||||
capStyle: ShapePath.RoundCap
|
||||
|
||||
@@ -71,10 +70,10 @@ Button {
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: AmneziaStyle.color.transparent
|
||||
fillColor: "transparent"
|
||||
strokeColor: {
|
||||
if (ConnectionController.isConnectionInProgress) {
|
||||
return AmneziaStyle.color.connectionInProgress
|
||||
return "#261E1A"
|
||||
} else if (ConnectionController.isConnected) {
|
||||
return connectedButtonColor
|
||||
} else {
|
||||
@@ -114,8 +113,8 @@ Button {
|
||||
visible: ConnectionController.isConnectionInProgress
|
||||
|
||||
ShapePath {
|
||||
fillColor: AmneziaStyle.color.transparent
|
||||
strokeColor: AmneziaStyle.color.white
|
||||
fillColor: "transparent"
|
||||
strokeColor: "#D7D8DB"
|
||||
strokeWidth: 3
|
||||
capStyle: ShapePath.RoundCap
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import "../Controls2/TextTypes"
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import InstalledAppsModel 1.0
|
||||
import Style 1.0
|
||||
|
||||
DrawerType2 {
|
||||
id: root
|
||||
@@ -134,7 +133,7 @@ DrawerType2 {
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
backgroundColor: AmneziaStyle.color.greyDark
|
||||
backgroundColor: "#2C2D30"
|
||||
|
||||
textFieldPlaceholderText: qsTr("application name")
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
@@ -88,11 +86,11 @@ DrawerType2 {
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: noButtonText
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
@@ -147,8 +145,8 @@ DrawerType2 {
|
||||
indicator: Rectangle {
|
||||
width: parent.width - 1
|
||||
height: parent.height
|
||||
color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
|
||||
border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
|
||||
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
|
||||
border.color: radioButton.focus ? "#D7D8DB" : "transparent"
|
||||
border.width: radioButton.focus ? 1 : 0
|
||||
|
||||
Behavior on color {
|
||||
|
||||
@@ -9,7 +9,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -112,11 +111,11 @@ DrawerType2 {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Copy")
|
||||
@@ -135,11 +134,11 @@ DrawerType2 {
|
||||
|
||||
visible: false
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Copy config string")
|
||||
@@ -154,11 +153,11 @@ DrawerType2 {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Show connection settings")
|
||||
@@ -282,9 +281,9 @@ DrawerType2 {
|
||||
readOnly: true
|
||||
activeFocusOnTab: false
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
selectionColor: AmneziaStyle.color.brown
|
||||
selectedTextColor: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
selectionColor: "#633303"
|
||||
selectedTextColor: "#D7D8DB"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.Medium
|
||||
@@ -295,7 +294,7 @@ DrawerType2 {
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
@@ -16,7 +14,7 @@ Rectangle {
|
||||
implicitWidth: transportProtoButtonGroup.implicitWidth
|
||||
implicitHeight: transportProtoButtonGroup.implicitHeight
|
||||
|
||||
color: AmneziaStyle.color.blackLight
|
||||
color: "#1C1D21"
|
||||
radius: 16
|
||||
|
||||
onFocusChanged: {
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
@@ -30,7 +28,7 @@ Item {
|
||||
ImageButtonType {
|
||||
id: backButton
|
||||
image: backButtonImage
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
@@ -48,7 +46,7 @@ Item {
|
||||
id: background
|
||||
Layout.fillWidth: true
|
||||
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,22 +3,20 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Button {
|
||||
id: root
|
||||
|
||||
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 hoveredColor: "#C1C2C5"
|
||||
property string defaultColor: "#D7D8DB"
|
||||
property string disabledColor: "#494B50"
|
||||
property string pressedColor: "#979799"
|
||||
|
||||
property string textColor: AmneziaStyle.color.black
|
||||
property string textColor: "#0E0E11"
|
||||
|
||||
property string borderColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderColor: "#D7D8DB"
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderWidth: 0
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
@@ -48,8 +46,8 @@ Button {
|
||||
background: Rectangle {
|
||||
id: focusBorder
|
||||
|
||||
color: AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Shapes
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
anchors.centerIn: parent
|
||||
@@ -18,7 +16,7 @@ Popup {
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
@@ -42,8 +40,8 @@ Popup {
|
||||
layer.samples: 4
|
||||
|
||||
ShapePath {
|
||||
fillColor: AmneziaStyle.color.transparent
|
||||
strokeColor: AmneziaStyle.color.greyDisabled
|
||||
fillColor: "transparent"
|
||||
strokeColor: "#787878"
|
||||
strokeWidth: 3
|
||||
capStyle: ShapePath.RoundCap
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
RadioButton {
|
||||
id: root
|
||||
|
||||
@@ -11,17 +9,17 @@ RadioButton {
|
||||
property string bodyText
|
||||
property string footerText
|
||||
|
||||
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 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 textColor: AmneziaStyle.color.black
|
||||
property string textColor: "#0E0E11"
|
||||
|
||||
property string pressedBorderColor: Qt.rgba(251/255, 178/255, 106/255, 0.3)
|
||||
property string selectedBorderColor: AmneziaStyle.color.orange
|
||||
property string defaultBodredColor: AmneziaStyle.color.transparent
|
||||
property string selectedBorderColor: "#FBB26A"
|
||||
property string defaultBodredColor: "transparent"
|
||||
property int borderWidth: 0
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
@@ -84,7 +82,7 @@ RadioButton {
|
||||
Text {
|
||||
text: root.headerText
|
||||
wrapMode: Text.WordWrap
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 25
|
||||
font.weight: 700
|
||||
font.family: "PT Root UI VF"
|
||||
@@ -99,7 +97,7 @@ RadioButton {
|
||||
Text {
|
||||
text: root.bodyText
|
||||
wrapMode: Text.WordWrap
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 16
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
@@ -115,7 +113,7 @@ RadioButton {
|
||||
text: root.footerText
|
||||
wrapMode: Text.WordWrap
|
||||
visible: root.footerText !== ""
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
font.pixelSize: 13
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -3,34 +3,32 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
CheckBox {
|
||||
id: root
|
||||
|
||||
property string descriptionText
|
||||
property string descriptionTextColor: AmneziaStyle.color.grey
|
||||
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
|
||||
property string descriptionTextColor: "#878B91"
|
||||
property string descriptionTextDisabledColor: "#494B50"
|
||||
|
||||
property string textColor: AmneziaStyle.color.white
|
||||
property string textDisabledColor: AmneziaStyle.color.grey
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
property string hoveredColor: AmneziaStyle.color.blackHovered
|
||||
property string defaultColor: AmneziaStyle.color.transparent
|
||||
property string pressedColor: AmneziaStyle.color.blackPressed
|
||||
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 defaultBorderColor: AmneziaStyle.color.white
|
||||
property string checkedBorderColor: AmneziaStyle.color.orange
|
||||
property string checkedBorderDisabledColor: AmneziaStyle.color.brownDark
|
||||
property string defaultBorderColor: "#D7D8DB"
|
||||
property string checkedBorderColor: "#FBB26A"
|
||||
property string checkedBorderDisabledColor: "#402102"
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
|
||||
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 checkedImageColor: "#FBB26A"
|
||||
property string pressedImageColor: "#A85809"
|
||||
property string defaultImageColor: "transparent"
|
||||
property string checkedDisabledImageColor: "#84603D"
|
||||
|
||||
property string imageSource: "qrc:/images/controls/check.svg"
|
||||
|
||||
@@ -47,8 +45,8 @@ CheckBox {
|
||||
focusPolicy: Qt.NoFocus
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
border.color: root.focus ? borderFocusedColor : AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
border.color: root.focus ? borderFocusedColor : "transparent"
|
||||
border.width: 1
|
||||
radius: 16
|
||||
}
|
||||
@@ -79,7 +77,7 @@ CheckBox {
|
||||
anchors.centerIn: parent
|
||||
width: 24
|
||||
height: 24
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
border.color: root.checked ?
|
||||
(root.enabled ?
|
||||
checkedBorderColor :
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -10,5 +8,5 @@ Rectangle {
|
||||
Layout.rightMargin: 16
|
||||
|
||||
height: 1
|
||||
color: AmneziaStyle.color.greyDark
|
||||
color: "#2C2D30"
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Item {
|
||||
@@ -21,8 +19,8 @@ Item {
|
||||
property Component collapsedContent
|
||||
property Component expandedContent
|
||||
|
||||
property string defaultColor: AmneziaStyle.color.blackLight
|
||||
property string borderColor: AmneziaStyle.color.greyDark
|
||||
property string defaultColor: "#1C1D21"
|
||||
property string borderColor: "#2C2D30"
|
||||
|
||||
property real expandedHeight
|
||||
property real collapsedHeight: 0
|
||||
@@ -92,7 +90,7 @@ Item {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
color: root.isCollapsed ? AmneziaStyle.color.transparent : Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
||||
color: root.isCollapsed ? "transparent" : Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
import "../Config"
|
||||
|
||||
@@ -11,31 +9,31 @@ Item {
|
||||
id: root
|
||||
|
||||
property string text
|
||||
property string textColor: AmneziaStyle.color.white
|
||||
property string textDisabledColor: AmneziaStyle.color.grey
|
||||
property string textColor: "#d7d8db"
|
||||
property string textDisabledColor: "#878B91"
|
||||
property int textMaximumLineCount: 2
|
||||
property int textElide: Qt.ElideRight
|
||||
|
||||
property string descriptionText
|
||||
property string descriptionTextColor: AmneziaStyle.color.grey
|
||||
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
|
||||
property string descriptionTextColor: "#878B91"
|
||||
property string descriptionTextDisabledColor: "#494B50"
|
||||
|
||||
property string headerText
|
||||
property string headerBackButtonImage
|
||||
|
||||
property var rootButtonClickedFunction
|
||||
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
|
||||
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 rootButtonImageColor: "#D7D8DB"
|
||||
property string rootButtonBackgroundColor: "#1C1D21"
|
||||
property string rootButtonBackgroundHoveredColor: "#1C1D21"
|
||||
property string rootButtonBackgroundPressedColor: "#1C1D21"
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property string rootButtonHoveredBorderColor: AmneziaStyle.color.greyDisabled
|
||||
property string rootButtonDefaultBorderColor: AmneziaStyle.color.greyDark
|
||||
property string rootButtonPressedBorderColor: AmneziaStyle.color.white
|
||||
property string rootButtonHoveredBorderColor: "#494B50"
|
||||
property string rootButtonDefaultBorderColor: "#2C2D30"
|
||||
property string rootButtonPressedBorderColor: "#D7D8DB"
|
||||
|
||||
property int rootButtonTextLeftMargins: 16
|
||||
property int rootButtonTextTopMargin: 16
|
||||
@@ -77,8 +75,8 @@ Item {
|
||||
Rectangle {
|
||||
id: focusBorder
|
||||
|
||||
color: AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
anchors.fill: rootButtonContent
|
||||
radius: 16
|
||||
@@ -98,7 +96,7 @@ Item {
|
||||
}
|
||||
return root.hovered ? root.rootButtonBackgroundHoveredColor : root.rootButtonBackgroundColor
|
||||
} else {
|
||||
return AmneziaStyle.color.transparent
|
||||
return "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Item {
|
||||
@@ -39,7 +37,7 @@ Item {
|
||||
implicitHeight: 40
|
||||
|
||||
image: root.actionButtonImage
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
visible: image ? true : false
|
||||
|
||||
@@ -59,7 +57,7 @@ Item {
|
||||
|
||||
text: root.descriptionText
|
||||
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
|
||||
visible: root.descriptionText !== ""
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Item {
|
||||
@@ -48,7 +46,7 @@ Item {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
image: root.actionButtonImage
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
visible: image ? true : false
|
||||
|
||||
@@ -68,7 +66,7 @@ Item {
|
||||
|
||||
text: root.descriptionText
|
||||
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
|
||||
visible: root.descriptionText !== ""
|
||||
}
|
||||
|
||||
@@ -2,26 +2,24 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
RadioButton {
|
||||
id: root
|
||||
|
||||
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 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 textColor: AmneziaStyle.color.white
|
||||
property string textDisabledColor: AmneziaStyle.color.grey
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
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 string pressedBorderColor: "#494B50"
|
||||
property string checkedBorderColor: "#FBB26A"
|
||||
property string defaultBodredColor: "transparent"
|
||||
property string checkedDisabledBorderColor: "#84603D"
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderWidth: 0
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
|
||||
@@ -2,25 +2,23 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Button {
|
||||
id: root
|
||||
|
||||
property string image
|
||||
|
||||
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 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 imageColor: AmneziaStyle.color.grey
|
||||
property string disableImageColor: AmneziaStyle.color.greyDark
|
||||
property string imageColor: "#878B91"
|
||||
property string disableImageColor: "#2C2D30"
|
||||
|
||||
property alias backgroundColor: background.color
|
||||
property alias backgroundRadius: background.radius
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
hoverEnabled: true
|
||||
@@ -48,7 +46,7 @@ Button {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
|
||||
color: {
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Item {
|
||||
@@ -26,16 +24,16 @@ Item {
|
||||
property alias eyeButton: eyeImage
|
||||
property FlickableType parentFlickable
|
||||
|
||||
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 string textColor: "#d7d8db"
|
||||
property string textDisabledColor: "#878B91"
|
||||
property string descriptionColor: "#878B91"
|
||||
property string descriptionDisabledColor: "#494B50"
|
||||
property real textOpacity: 1.0
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property string rightImageColor: AmneziaStyle.color.white
|
||||
property string rightImageColor: "#d7d8db"
|
||||
|
||||
property bool descriptionOnTop: false
|
||||
property bool hideDescription: true
|
||||
@@ -119,7 +117,7 @@ Item {
|
||||
Layout.rightMargin: rightImageSource || !isLeftImageHoverEnabled ? 16 : 0
|
||||
|
||||
radius: 12
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
@@ -222,7 +220,7 @@ Item {
|
||||
id: eyeImageBackground
|
||||
anchors.fill: parent
|
||||
radius: 12
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
@@ -259,7 +257,7 @@ Item {
|
||||
id: rightImageBackground
|
||||
anchors.fill: parent
|
||||
radius: 12
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
@@ -276,9 +274,9 @@ Item {
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill: root
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
ListView {
|
||||
@@ -105,8 +103,8 @@ ListView {
|
||||
indicator: Rectangle {
|
||||
width: parent.width - 1
|
||||
height: parent.height
|
||||
color: radioButton.hovered ? AmneziaStyle.color.greyDark : AmneziaStyle.color.blackLight
|
||||
border.color: radioButton.focus ? AmneziaStyle.color.white : AmneziaStyle.color.transparent
|
||||
color: radioButton.hovered ? "#2C2D30" : "#1C1D21"
|
||||
border.color: radioButton.focus ? "#D7D8DB" : "transparent"
|
||||
border.width: radioButton.focus ? 1 : 0
|
||||
|
||||
Behavior on color {
|
||||
|
||||
@@ -2,8 +2,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Popup {
|
||||
@@ -84,11 +82,11 @@ Popup {
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: "white"
|
||||
hoveredColor: AmneziaStyle.color.whiteHovered
|
||||
pressedColor: AmneziaStyle.color.whiteHovered
|
||||
disabledColor: AmneziaStyle.color.greyDisabled
|
||||
hoveredColor: "#C1C2C5"
|
||||
pressedColor: "#AEB0B7"
|
||||
disabledColor: "#494B50"
|
||||
|
||||
textColor: AmneziaStyle.color.black
|
||||
textColor: "#0E0E11"
|
||||
borderWidth: 0
|
||||
|
||||
text: qsTr("Close")
|
||||
|
||||
@@ -2,22 +2,20 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
ProgressBar {
|
||||
id: root
|
||||
|
||||
implicitHeight: 4
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.brown
|
||||
color: "#633303"
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
Rectangle {
|
||||
width: root.visualPosition * parent.width
|
||||
height: parent.height
|
||||
color: AmneziaStyle.color.orange
|
||||
color: "#FBB26A"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,38 +2,36 @@ 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: AmneziaStyle.color.grey
|
||||
property string descriptionTextDisabledColor: AmneziaStyle.color.greyDisabled
|
||||
property string descriptionTextColor: "#878B91"
|
||||
property string descriptionTextDisabledColor: "#494B50"
|
||||
|
||||
property string textColor: AmneziaStyle.color.white
|
||||
property string textDisabledColor: AmneziaStyle.color.grey
|
||||
property string textColor: "#D7D8DB"
|
||||
property string textDisabledColor: "#878B91"
|
||||
|
||||
property string checkedIndicatorColor: AmneziaStyle.color.brown
|
||||
property string defaultIndicatorColor: AmneziaStyle.color.transparent
|
||||
property string checkedDisabledIndicatorColor: AmneziaStyle.color.brownDark
|
||||
property string checkedIndicatorColor: "#633303"
|
||||
property string defaultIndicatorColor: "transparent"
|
||||
property string checkedDisabledIndicatorColor: "#402102"
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property string checkedIndicatorBorderColor: AmneziaStyle.color.brown
|
||||
property string defaultIndicatorBorderColor: AmneziaStyle.color.greyDisabled
|
||||
property string checkedDisabledIndicatorBorderColor: AmneziaStyle.color.brownDark
|
||||
property string checkedIndicatorBorderColor: "#633303"
|
||||
property string defaultIndicatorBorderColor: "#494B50"
|
||||
property string checkedDisabledIndicatorBorderColor: "#402102"
|
||||
|
||||
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 checkedInnerCircleColor: "#FBB26A"
|
||||
property string defaultInnerCircleColor: "#D7D8DB"
|
||||
property string checkedDisabledInnerCircleColor: "#84603D"
|
||||
property string defaultDisabledInnerCircleColor: "#494B50"
|
||||
|
||||
property string hoveredIndicatorBackgroundColor: AmneziaStyle.color.blackHovered
|
||||
property string defaultIndicatorBackgroundColor: AmneziaStyle.color.transparent
|
||||
property string hoveredIndicatorBackgroundColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
property string defaultIndicatorBackgroundColor: "transparent"
|
||||
|
||||
hoverEnabled: enabled ? true : false
|
||||
focusPolicy: Qt.TabFocus
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import Style 1.0
|
||||
|
||||
TabButton {
|
||||
id: root
|
||||
|
||||
property string hoveredColor: AmneziaStyle.color.brown
|
||||
property string defaultColor: AmneziaStyle.color.greyDark
|
||||
property string selectedColor: AmneziaStyle.color.orange
|
||||
property string hoveredColor: "#633303"
|
||||
property string defaultColor: "#2C2D30"
|
||||
property string selectedColor: "#FBB26A"
|
||||
|
||||
property string textColor: AmneziaStyle.color.white
|
||||
property string textColor: "#D7D8DB"
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property bool isSelected: false
|
||||
@@ -26,9 +24,9 @@ TabButton {
|
||||
id: background
|
||||
|
||||
anchors.fill: parent
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
|
||||
Rectangle {
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import Style 1.0
|
||||
|
||||
TabButton {
|
||||
id: root
|
||||
|
||||
property string hoveredColor: AmneziaStyle.color.brown
|
||||
property string defaultColor: AmneziaStyle.color.white
|
||||
property string selectedColor: AmneziaStyle.color.orange
|
||||
property string hoveredColor: "#633303"
|
||||
property string defaultColor: "#D7D8DB"
|
||||
property string selectedColor: "#FBB26A"
|
||||
|
||||
property string image
|
||||
|
||||
property bool isSelected: false
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property var clickedFunc
|
||||
@@ -28,10 +26,10 @@ TabButton {
|
||||
background: Rectangle {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
radius: 10
|
||||
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
border.color: root.activeFocus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.activeFocus ? root.borderFocusedWidth : 0
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
@@ -11,12 +9,12 @@ Rectangle {
|
||||
property alias textArea: textArea
|
||||
property alias textAreaText: textArea.text
|
||||
|
||||
property string borderHoveredColor: AmneziaStyle.color.greyDisabled
|
||||
property string borderNormalColor: AmneziaStyle.color.greyDark
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderHoveredColor: "#494B50"
|
||||
property string borderNormalColor: "#2C2D30"
|
||||
property string borderFocusedColor: "#d7d8db"
|
||||
|
||||
height: 148
|
||||
color: AmneziaStyle.color.blackLight
|
||||
color: "#1C1D21"
|
||||
border.width: 1
|
||||
border.color: getBorderColor(borderNormalColor)
|
||||
radius: 16
|
||||
@@ -54,10 +52,10 @@ Rectangle {
|
||||
anchors.topMargin: 16
|
||||
anchors.bottomMargin: 16
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
selectionColor: AmneziaStyle.color.brown
|
||||
selectedTextColor: AmneziaStyle.color.white
|
||||
placeholderTextColor: AmneziaStyle.color.grey
|
||||
color: "#D7D8DB"
|
||||
selectionColor: "#633303"
|
||||
selectedTextColor: "#D7D8DB"
|
||||
placeholderTextColor: "#878B91"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.Medium
|
||||
|
||||
@@ -2,16 +2,14 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string headerText
|
||||
property string headerTextDisabledColor: AmneziaStyle.color.greyDisabled
|
||||
property string headerTextColor: AmneziaStyle.color.grey
|
||||
property string headerTextDisabledColor: "#494B50"
|
||||
property string headerTextColor: "#878b91"
|
||||
|
||||
property alias errorText: errorField.text
|
||||
property bool checkEmptyText: false
|
||||
@@ -23,18 +21,18 @@ Item {
|
||||
|
||||
property alias textField: textField
|
||||
property alias textFieldText: textField.text
|
||||
property string textFieldTextColor: AmneziaStyle.color.white
|
||||
property string textFieldTextDisabledColor: AmneziaStyle.color.grey
|
||||
property string textFieldTextColor: "#d7d8db"
|
||||
property string textFieldTextDisabledColor: "#878B91"
|
||||
|
||||
property string textFieldPlaceholderText
|
||||
property bool textFieldEditable: true
|
||||
|
||||
property string borderColor: AmneziaStyle.color.greyDark
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderColor: "#2C2D30"
|
||||
property string borderFocusedColor: "#d7d8db"
|
||||
|
||||
property string backgroundColor: AmneziaStyle.color.blackLight
|
||||
property string backgroundDisabledColor: AmneziaStyle.color.transparent
|
||||
property string bgBorderHoveredColor: AmneziaStyle.color.greyDisabled
|
||||
property string backgroundColor: "#1c1d21"
|
||||
property string backgroundDisabledColor: "transparent"
|
||||
property string bgBorderHoveredColor: "#494B50"
|
||||
|
||||
implicitWidth: content.implicitWidth
|
||||
implicitHeight: content.implicitHeight
|
||||
@@ -92,10 +90,10 @@ Item {
|
||||
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
|
||||
|
||||
placeholderText: root.textFieldPlaceholderText
|
||||
placeholderTextColor: AmneziaStyle.color.greyDisabled
|
||||
placeholderTextColor: "#494B50"
|
||||
|
||||
selectionColor: AmneziaStyle.color.brown
|
||||
selectedTextColor: AmneziaStyle.color.white
|
||||
selectionColor: "#633303"
|
||||
selectedTextColor: "#D7D8DB"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: 400
|
||||
@@ -149,7 +147,7 @@ Item {
|
||||
|
||||
text: root.errorText
|
||||
visible: root.errorText !== ""
|
||||
color: AmneziaStyle.color.red
|
||||
color: "#EB5757"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 24
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 16
|
||||
font.weight: 600
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 16 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.black
|
||||
color: "#0E0E11"
|
||||
font.pixelSize: 13
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 38 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 36
|
||||
font.weight: 700
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 30 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 25
|
||||
font.weight: 700
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 16 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
font.pixelSize: 13
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 21.6 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 18
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import QtQuick
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 24 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 16
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import QtQuick
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Text {
|
||||
lineHeight: 20 + LanguageModel.getLineHeightAppend()
|
||||
lineHeightMode: Text.FixedHeight
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
font.pixelSize: 14
|
||||
font.weight: 400
|
||||
font.family: "PT Root UI VF"
|
||||
|
||||
@@ -18,14 +18,14 @@ Popup {
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
ImageButtonType {
|
||||
id: button
|
||||
|
||||
image: "qrc:/images/svg/close_black_24dp.svg"
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
|
||||
@@ -3,8 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
RadioButton {
|
||||
@@ -14,15 +12,15 @@ RadioButton {
|
||||
property int textElide: Qt.ElideRight
|
||||
property string descriptionText
|
||||
|
||||
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 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 textColor: AmneziaStyle.color.white
|
||||
property string selectedTextColor: AmneziaStyle.color.orange
|
||||
property string textColor: "#D7D8DB"
|
||||
property string selectedTextColor: "#FBB26A"
|
||||
|
||||
property string borderFocusedColor: AmneziaStyle.color.white
|
||||
property string borderFocusedColor: "#D7D8DB"
|
||||
property int borderFocusedWidth: 1
|
||||
|
||||
property string imageSource
|
||||
@@ -36,7 +34,7 @@ RadioButton {
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
border.color: root.focus ? root.borderFocusedColor : AmneziaStyle.color.transparent
|
||||
border.color: root.focus ? root.borderFocusedColor : "transparent"
|
||||
border.width: root.focus ? root.borderFocusedWidth : 0
|
||||
|
||||
implicitWidth: 56
|
||||
@@ -139,7 +137,7 @@ RadioButton {
|
||||
CaptionTextType {
|
||||
id: description
|
||||
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
text: root.descriptionText
|
||||
|
||||
visible: root.descriptionText !== ""
|
||||
|
||||
@@ -3,16 +3,14 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string textColor: AmneziaStyle.color.white
|
||||
property string backGroundColor: AmneziaStyle.color.blackLight
|
||||
property string imageColor: AmneziaStyle.color.white
|
||||
property string textColor: "#D7D8DB"
|
||||
property string backGroundColor: "#1C1D21"
|
||||
property string imageColor: "#D7D8DB"
|
||||
property string textString
|
||||
property int textFormat: Text.PlainText
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
module Style
|
||||
|
||||
singleton AmneziaStyle 1.0 AmneziaStyle.qml
|
||||
@@ -8,7 +8,6 @@ import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import ContainersModelFilters 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -56,11 +55,11 @@ PageType {
|
||||
|
||||
implicitHeight: 36
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.grey
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#878B91"
|
||||
borderWidth: 0
|
||||
|
||||
visible: isLoggingEnabled ? true : false
|
||||
@@ -92,12 +91,12 @@ PageType {
|
||||
|
||||
implicitHeight: 36
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.grey
|
||||
leftImageColor: AmneziaStyle.color.transparent
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#878B91"
|
||||
leftImageColor: "transparent"
|
||||
borderWidth: 0
|
||||
|
||||
property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled ||
|
||||
@@ -238,7 +237,7 @@ PageType {
|
||||
|
||||
hoverEnabled: false
|
||||
image: "qrc:/images/controls/chevron-down.svg"
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#d7d8db"
|
||||
|
||||
icon.width: 18
|
||||
icon.height: 18
|
||||
@@ -299,17 +298,17 @@ PageType {
|
||||
DropDownType {
|
||||
id: containersDropDown
|
||||
|
||||
rootButtonImageColor: AmneziaStyle.color.black
|
||||
rootButtonBackgroundColor: AmneziaStyle.color.white
|
||||
rootButtonImageColor: "#0E0E11"
|
||||
rootButtonBackgroundColor: "#D7D8DB"
|
||||
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
|
||||
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
|
||||
rootButtonHoveredBorderColor: AmneziaStyle.color.transparent
|
||||
rootButtonDefaultBorderColor: AmneziaStyle.color.transparent
|
||||
rootButtonHoveredBorderColor: "transparent"
|
||||
rootButtonDefaultBorderColor: "transparent"
|
||||
rootButtonTextTopMargin: 8
|
||||
rootButtonTextBottomMargin: 8
|
||||
|
||||
text: ServersModel.defaultServerDefaultContainerName
|
||||
textColor: AmneziaStyle.color.black
|
||||
textColor: "#0E0E11"
|
||||
headerText: qsTr("VPN protocol")
|
||||
headerBackButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
@@ -500,7 +499,7 @@ PageType {
|
||||
ImageButtonType {
|
||||
id: serverInfoButton
|
||||
image: "qrc:/images/controls/settings.svg"
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
implicitWidth: 56
|
||||
implicitHeight: 56
|
||||
|
||||
@@ -6,7 +6,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -295,7 +294,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 32
|
||||
Layout.preferredHeight: checkboxLayout.implicitHeight
|
||||
color: AmneziaStyle.color.blackLight
|
||||
color: "#1C1D21"
|
||||
radius: 16
|
||||
|
||||
Connections {
|
||||
|
||||
@@ -8,7 +8,6 @@ import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -192,9 +191,9 @@ PageType {
|
||||
leftPadding: 0
|
||||
height: 24
|
||||
|
||||
color: AmneziaStyle.color.white
|
||||
selectionColor: AmneziaStyle.color.brown
|
||||
selectedTextColor: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
selectionColor: "#633303"
|
||||
selectedTextColor: "#D7D8DB"
|
||||
|
||||
font.pixelSize: 16
|
||||
font.weight: Font.Medium
|
||||
@@ -205,7 +204,7 @@ PageType {
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,7 +223,7 @@ PageType {
|
||||
visible: ServersModel.isProcessedServerHasWriteAccess()
|
||||
|
||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||
clickedFunction: function() {
|
||||
|
||||
@@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -70,7 +69,7 @@ PageType {
|
||||
width: parent.width
|
||||
|
||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: root.lastItemTabClicked()
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -115,7 +114,7 @@ PageType {
|
||||
descriptionOnTop: true
|
||||
|
||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
@@ -139,7 +138,7 @@ PageType {
|
||||
KeyNavigation.tab: usernameLabel.rightButton
|
||||
|
||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
@@ -163,7 +162,7 @@ PageType {
|
||||
KeyNavigation.tab: passwordLabel.eyeButton
|
||||
|
||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
GC.copyToClipBoard(descriptionText)
|
||||
@@ -194,7 +193,7 @@ PageType {
|
||||
}
|
||||
|
||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
buttonImageSource: hideDescription ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg"
|
||||
|
||||
@@ -217,11 +216,11 @@ PageType {
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
parentFlickable: fl
|
||||
@@ -281,11 +280,11 @@ PageType {
|
||||
Layout.leftMargin: 8
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.orange
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#FBB26A"
|
||||
|
||||
text: qsTr("Detailed instructions")
|
||||
|
||||
@@ -304,10 +303,10 @@ PageType {
|
||||
Layout.leftMargin: 8
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
textColor: AmneziaStyle.color.red
|
||||
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()
|
||||
|
||||
@@ -6,7 +6,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -83,10 +82,10 @@ PageType {
|
||||
}
|
||||
|
||||
descriptionOnTop: true
|
||||
textColor: AmneziaStyle.color.orange
|
||||
textColor: "#FBB26A"
|
||||
|
||||
rightImageSource: "qrc:/images/controls/copy.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
KeyNavigation.tab: removeButton
|
||||
|
||||
@@ -135,10 +134,10 @@ PageType {
|
||||
Layout.leftMargin: 8
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
textColor: AmneziaStyle.color.red
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
textColor: "#EB5757"
|
||||
|
||||
text: qsTr("Remove website")
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -85,7 +84,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: AmneziaStyle.color.white
|
||||
color: "#CCCAC8"
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
@@ -177,7 +176,7 @@ PageType {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
text: qsTr("Software version: %1").arg(SettingsController.getAppVersion())
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
@@ -187,11 +186,11 @@ PageType {
|
||||
Layout.bottomMargin: 16
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.orange
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#FBB26A"
|
||||
|
||||
text: qsTr("Check for updates")
|
||||
|
||||
@@ -210,11 +209,11 @@ PageType {
|
||||
Layout.topMargin: -15
|
||||
implicitHeight: 25
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.orange
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#FBB26A"
|
||||
|
||||
text: qsTr("Privacy Policy")
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import SortFilterProxyModel 0.2
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -215,7 +214,7 @@ PageType {
|
||||
|
||||
text: appPath
|
||||
rightImageSource: "qrc:/images/controls/trash.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
var headerText = qsTr("Remove ") + appPath + "?"
|
||||
@@ -242,7 +241,7 @@ PageType {
|
||||
Rectangle {
|
||||
anchors.fill: addAppButton
|
||||
anchors.bottomMargin: -24
|
||||
color: AmneziaStyle.color.black
|
||||
color: "#0E0E11"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -222,7 +221,7 @@ PageType {
|
||||
|
||||
text: qsTr("Reset settings and remove all data from the application")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: lastItemTabClicked()
|
||||
parentFlickable: fl
|
||||
|
||||
@@ -6,7 +6,6 @@ import QtQuick.Dialogs
|
||||
import QtCore
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -121,11 +120,11 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -8
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Restore from backup")
|
||||
|
||||
@@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -102,11 +101,11 @@ PageType {
|
||||
id: restoreDefaultButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Restore default")
|
||||
|
||||
@@ -6,7 +6,6 @@ import QtQuick.Dialogs
|
||||
import QtCore
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Config"
|
||||
@@ -115,7 +114,7 @@ disabled after 14 days, and all log files will be deleted.")
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Open folder with logs")
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +159,7 @@ disabled after 14 days, and all log files will be deleted.")
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Save logs to file")
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +208,7 @@ disabled after 14 days, and all log files will be deleted.")
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Clear logs")
|
||||
color: AmneziaStyle.color.white
|
||||
color: "#D7D8DB"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
@@ -119,7 +118,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Reboot server")
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
KeyNavigation.tab: labelWithButton3
|
||||
|
||||
@@ -160,7 +159,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Remove server from application")
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: {
|
||||
if (content.isServerWithWriteAccess) {
|
||||
@@ -208,7 +207,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Clear server from Amnezia software")
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: labelWithButton5.visible ?
|
||||
labelWithButton5.forceActiveFocus() :
|
||||
@@ -251,7 +250,7 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Reset API config")
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
Keys.onTabPressed: root.lastItemTabClickedSignal()
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import ProtocolProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -176,7 +175,7 @@ PageType {
|
||||
&& !ServersModel.getProcessedServerData("hasInstalledContainers")) ? 2 : 0
|
||||
|
||||
background: Rectangle {
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
activeFocusOnTab: true
|
||||
|
||||
@@ -8,7 +8,6 @@ import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -183,7 +182,7 @@ PageType {
|
||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||
|
||||
text: qsTr("Remove ") + ContainersModel.getProcessedContainerName()
|
||||
textColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
|
||||
clickedFunction: function() {
|
||||
var headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getProcessedContainerName())
|
||||
|
||||
@@ -60,8 +60,7 @@ PageType {
|
||||
id: proxyContainersModel
|
||||
sourceModel: ContainersModel
|
||||
sorters: [
|
||||
RoleSorter { roleName: "isInstalled"; sortOrder: Qt.DescendingOrder },
|
||||
RoleSorter { roleName: "installPageOrder"; sortOrder: Qt.AscendingOrder }
|
||||
RoleSorter { roleName: "isInstalled"; sortOrder: Qt.DescendingOrder }
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import SortFilterProxyModel 0.2
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -266,7 +265,7 @@ PageType {
|
||||
text: url
|
||||
descriptionText: ip
|
||||
rightImageSource: "qrc:/images/controls/trash.svg"
|
||||
rightImageColor: AmneziaStyle.color.white
|
||||
rightImageColor: "#D7D8DB"
|
||||
|
||||
clickedFunction: function() {
|
||||
var headerText = qsTr("Remove ") + url + "?"
|
||||
@@ -300,7 +299,7 @@ PageType {
|
||||
Rectangle {
|
||||
anchors.fill: addSiteButton
|
||||
anchors.bottomMargin: -24
|
||||
color: AmneziaStyle.color.black
|
||||
color: "#0E0E11"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
@@ -341,7 +340,7 @@ PageType {
|
||||
implicitHeight: 56
|
||||
|
||||
image: "qrc:/images/controls/more-vertical.svg"
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
onClicked: function () {
|
||||
moreActionsDrawer.open()
|
||||
|
||||
@@ -7,7 +7,6 @@ import SortFilterProxyModel 0.2
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import ProtocolProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -186,11 +185,11 @@ PageType {
|
||||
anchors.topMargin: 8
|
||||
anchors.bottomMargin: 24
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||
|
||||
@@ -50,9 +50,6 @@ PageType {
|
||||
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSetupWizardStart)) {
|
||||
PageController.replaceStartPage()
|
||||
}
|
||||
if (stackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageHome)) {
|
||||
PageController.goToPageHome()
|
||||
}
|
||||
|
||||
PageController.showNotificationMessage(finishedMessage)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import SortFilterProxyModel 0.2
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import ProtocolProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -94,11 +93,11 @@ PageType {
|
||||
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.orange
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#FBB26A"
|
||||
|
||||
text: qsTr("More detailed")
|
||||
KeyNavigation.tab: transportProtoSelector
|
||||
@@ -195,7 +194,7 @@ PageType {
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
@@ -248,7 +247,7 @@ PageType {
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
@@ -262,8 +261,7 @@ PageType {
|
||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||
|
||||
clickedFunc: function() {
|
||||
if (!port.textField.acceptableInput &&
|
||||
ContainerProps.containerTypeToString(dockerContainer) !== "torwebsite") {
|
||||
if (!port.textField.acceptableInput) {
|
||||
port.errorText = qsTr("The port must be in the range of 1 to 65535")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -34,10 +34,6 @@ PageType {
|
||||
value: true
|
||||
}
|
||||
]
|
||||
sorters: RoleSorter {
|
||||
roleName: "installPageOrder"
|
||||
sortOrder: Qt.AscendingOrder
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
@@ -5,7 +5,6 @@ import QtQuick.Dialogs
|
||||
|
||||
import PageEnum 1.0
|
||||
import QRCodeReader 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -61,7 +60,7 @@ PageType {
|
||||
anchors.rightMargin: 16
|
||||
anchors.bottomMargin: 34
|
||||
|
||||
color: AmneziaStyle.color.transparent
|
||||
color: "transparent"
|
||||
//radius: 16
|
||||
|
||||
QRCodeReader {
|
||||
|
||||
@@ -3,7 +3,6 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -167,11 +166,11 @@ PageType {
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("I have nothing")
|
||||
|
||||
@@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -55,9 +54,6 @@ PageType {
|
||||
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSetupWizardStart)) {
|
||||
PageController.replaceStartPage()
|
||||
}
|
||||
if (stackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageHome)) {
|
||||
PageController.goToPageHome()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,11 +102,11 @@ PageType {
|
||||
Layout.leftMargin: -8
|
||||
implicitHeight: 32
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.orange
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#FBB26A"
|
||||
|
||||
text: showContent ? qsTr("Collapse content") : qsTr("Show content")
|
||||
KeyNavigation.tab: connectButton
|
||||
@@ -139,8 +135,8 @@ PageType {
|
||||
|
||||
iconPath: "qrc:/images/controls/alert-circle.svg"
|
||||
|
||||
textColor: AmneziaStyle.color.red
|
||||
imageColor: AmneziaStyle.color.red
|
||||
textColor: "#EB5757"
|
||||
imageColor: "#EB5757"
|
||||
}
|
||||
|
||||
WarningType {
|
||||
@@ -159,7 +155,7 @@ PageType {
|
||||
implicitHeight: configContent.implicitHeight
|
||||
|
||||
radius: 10
|
||||
color: AmneziaStyle.color.blackLight
|
||||
color: "#1C1D21"
|
||||
|
||||
visible: showContent
|
||||
|
||||
@@ -180,7 +176,7 @@ PageType {
|
||||
Rectangle {
|
||||
anchors.fill: columnContent
|
||||
anchors.bottomMargin: -24
|
||||
color: AmneziaStyle.color.black
|
||||
color: "#0E0E11"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -268,7 +267,7 @@ PageType {
|
||||
implicitWidth: accessTypeSelectorContent.implicitWidth
|
||||
implicitHeight: accessTypeSelectorContent.implicitHeight
|
||||
|
||||
color: AmneziaStyle.color.blackLight
|
||||
color: "#1C1D21"
|
||||
radius: 16
|
||||
|
||||
RowLayout {
|
||||
@@ -322,7 +321,7 @@ PageType {
|
||||
visible: accessTypeSelector.currentIndex === 0
|
||||
|
||||
text: qsTr("Share VPN access without the ability to manage the server")
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
@@ -653,7 +652,7 @@ PageType {
|
||||
ImageButtonType {
|
||||
id: closeSearchButton
|
||||
image: "qrc:/images/controls/close.svg"
|
||||
imageColor: AmneziaStyle.color.white
|
||||
imageColor: "#D7D8DB"
|
||||
|
||||
Keys.onTabPressed: {
|
||||
if (!GC.isMobile()) {
|
||||
@@ -801,7 +800,7 @@ PageType {
|
||||
ColumnLayout
|
||||
{
|
||||
id: textColumn
|
||||
property string textColor: AmneziaStyle.color.grey
|
||||
property string textColor: "#878B91"
|
||||
Layout.bottomMargin: 24
|
||||
|
||||
ParagraphTextType {
|
||||
@@ -847,11 +846,11 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Rename")
|
||||
@@ -940,11 +939,11 @@ PageType {
|
||||
id: revokeButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Revoke")
|
||||
|
||||
@@ -7,7 +7,6 @@ import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -67,7 +66,7 @@ PageType {
|
||||
|
||||
text: qsTr("We recommend that you use full access to the server only for your own additional devices.\n") +
|
||||
qsTr("If you share full access with other people, they can remove and add protocols and services to the server, which will cause the VPN to work incorrectly for all users. ")
|
||||
color: AmneziaStyle.color.grey
|
||||
color: "#878B91"
|
||||
}
|
||||
|
||||
DropDownType {
|
||||
|
||||
@@ -4,7 +4,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Shapes
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
@@ -219,8 +218,8 @@ PageType {
|
||||
PathLine { x: 0; y: 0 }
|
||||
|
||||
strokeWidth: 1
|
||||
strokeColor: AmneziaStyle.color.greyDark
|
||||
fillColor: AmneziaStyle.color.blackLight
|
||||
strokeColor: "#2C2D30"
|
||||
fillColor: "#1C1D21"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import PageEnum 1.0
|
||||
import Style 1.0
|
||||
|
||||
import "Config"
|
||||
import "Controls2"
|
||||
@@ -22,7 +21,7 @@ Window {
|
||||
maximumWidth: 600
|
||||
maximumHeight: 800
|
||||
|
||||
color: AmneziaStyle.color.black
|
||||
color: "#0E0E11"
|
||||
|
||||
onClosing: function() {
|
||||
console.debug("QML onClosing signal")
|
||||
@@ -195,11 +194,11 @@ Window {
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: AmneziaStyle.color.transparent
|
||||
hoveredColor: AmneziaStyle.color.blackHovered
|
||||
pressedColor: AmneziaStyle.color.blackPressed
|
||||
disabledColor: AmneziaStyle.color.grey
|
||||
textColor: AmneziaStyle.color.white
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Save")
|
||||
|
||||
Reference in New Issue
Block a user