mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
remove qml limit device
This commit is contained in:
@@ -781,14 +781,6 @@ void PairingUiController::dispatchPhoneScanQrAttempt(const QString &qrUuid, cons
|
||||
return;
|
||||
}
|
||||
|
||||
if (logicalErr == ErrorCode::ApiConfigLimitError) {
|
||||
setPhoneBusy(false);
|
||||
m_phoneStatusMessage.clear();
|
||||
emit phoneStatusMessageChanged();
|
||||
emit phonePairingRejectedDeviceLimit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (isPairingRetriableError(logicalErr) && retryAttempt + 1 < kPairingRetryMaxAttempts) {
|
||||
const int delayMs = pairingRetryDelayMs(retryAttempt);
|
||||
QTimer::singleShot(delayMs, this, [this, qrUuid, isTestPurchase, vpnKey, serviceInfo, supportedProtocols,
|
||||
|
||||
@@ -126,8 +126,6 @@ signals:
|
||||
|
||||
void tvPairingConfigReceived();
|
||||
void phonePairingSucceeded();
|
||||
/** scan_qr rejected: subscription device quota full (no generic error dialog). */
|
||||
void phonePairingRejectedDeviceLimit();
|
||||
|
||||
void pairingUuidFromScan(const QString &uuid);
|
||||
void tvPairingUiPhaseChanged();
|
||||
|
||||
@@ -83,7 +83,6 @@ namespace PageLoader
|
||||
PageSettingsApiQrPairingDev,
|
||||
PageSettingsApiQrPairingSend,
|
||||
PageSetupWizardApiQrPairingReceive,
|
||||
PageSettingsApiDeviceLimit,
|
||||
|
||||
PageDevMenu
|
||||
};
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
import "../Components"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
readonly property int activeDevices: ApiAccountInfoModel.data("activeDeviceCount")
|
||||
readonly property int maxDevices: ApiAccountInfoModel.data("maxDeviceCount")
|
||||
|
||||
FlickableType {
|
||||
anchors.fill: parent
|
||||
contentHeight: layout.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: layout
|
||||
width: root.width
|
||||
spacing: 16
|
||||
|
||||
BackButtonType {
|
||||
Layout.topMargin: 20 + PageController.safeAreaTopMargin
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
Layout.topMargin: 8
|
||||
text: qsTr("Device limit reached")
|
||||
font.pixelSize: 28
|
||||
font.bold: true
|
||||
color: AmneziaStyle.color.paleGray
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
text: root.maxDevices > 0
|
||||
? qsTr("The maximum number of devices is already in use (%1 of %2). Remove a device to add a new one.")
|
||||
.arg(root.activeDevices).arg(root.maxDevices)
|
||||
: qsTr("The maximum number of devices for this subscription is already in use. Remove a device to add a new one.")
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
Layout.topMargin: 24
|
||||
Layout.bottomMargin: 24 + PageController.safeAreaBottomMargin
|
||||
|
||||
text: qsTr("View All Devices")
|
||||
defaultColor: AmneziaStyle.color.paleGray
|
||||
hoveredColor: AmneziaStyle.color.lightGray
|
||||
pressedColor: AmneziaStyle.color.mutedGray
|
||||
textColor: AmneziaStyle.color.midnightBlack
|
||||
|
||||
clickedFunc: function() {
|
||||
PageController.closePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,12 +54,6 @@ PageType {
|
||||
}
|
||||
|
||||
function openAddDeviceViaQr() {
|
||||
const maxC = ApiAccountInfoModel.data("maxDeviceCount")
|
||||
const activeC = ApiAccountInfoModel.data("activeDeviceCount")
|
||||
if (maxC > 0 && activeC >= maxC) {
|
||||
PageController.goToPage(PageEnum.PageSettingsApiDeviceLimit)
|
||||
return
|
||||
}
|
||||
if (Qt.platform.os !== "android" && Qt.platform.os !== "ios") {
|
||||
PageController.goToPage(PageEnum.PageSettingsApiQrPairingSend)
|
||||
return
|
||||
@@ -135,12 +129,6 @@ PageType {
|
||||
}
|
||||
}
|
||||
|
||||
function onPhonePairingRejectedDeviceLimit() {
|
||||
if (!root.visible) {
|
||||
return
|
||||
}
|
||||
PageController.goToPage(PageEnum.PageSettingsApiDeviceLimit)
|
||||
}
|
||||
}
|
||||
|
||||
ListViewType {
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
<file>Pages2/PageSettingsApiServerInfo.qml</file>
|
||||
<file>Pages2/PageSettingsApiQrPairingDev.qml</file>
|
||||
<file>Pages2/PageSettingsApiQrPairingSend.qml</file>
|
||||
<file>Pages2/PageSettingsApiDeviceLimit.qml</file>
|
||||
<file>Pages2/PageSetupWizardApiQrPairingReceive.qml</file>
|
||||
<file>Pages2/PageSettingsApplication.qml</file>
|
||||
<file>Pages2/PageSettingsAppSplitTunneling.qml</file>
|
||||
|
||||
Reference in New Issue
Block a user