mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
networking: add hidden network option (#30808)
* init * once * match * fix * maybe * maybe * Revert "maybe" This reverts commit 8386a0a381d5cfe94d7bbf0187d5e311d4b4e9c3. * Revert "maybe" This reverts commit 3abf7b19836e5f353fbb94c9bee52b185bd3fc17. * Revert "fix" This reverts commit 09e0146f4deeac07b9c26e916a75b70c7dcff1f1. * Revert "match" This reverts commit 39a90c6cf88f310623d5e9058152d025ee7213ea. * fix not at bottom * padding * match * Update networking.cc * min chars * translations * shouldn't need * need! * just in case * Revert "just in case" This reverts commit a3c1e090682e30400ba9c20b04407b9e5677ad7a. * finish translations * not secret * optional * allow open networks * fix * try * working * add divider * update translations * fix * better name * translate hidden network * auto * v2 * remove v1 * fix * fix translations old-commit-hash: 96c91c486e9b39c11632691fe5761975d9aa53b6
This commit is contained in:
@@ -48,6 +48,7 @@ Networking::Networking(QWidget* parent, bool show_advanced) : QFrame(parent) {
|
||||
|
||||
an = new AdvancedNetworking(this, wifi);
|
||||
connect(an, &AdvancedNetworking::backPress, [=]() { main_layout->setCurrentWidget(wifiScreen); });
|
||||
connect(an, &AdvancedNetworking::requestWifiScreen, [=]() { main_layout->setCurrentWidget(wifiScreen); });
|
||||
main_layout->addWidget(an);
|
||||
|
||||
QPalette pal = palette();
|
||||
@@ -181,6 +182,25 @@ AdvancedNetworking::AdvancedNetworking(QWidget* parent, WifiManager* wifi): QWid
|
||||
});
|
||||
list->addItem(meteredToggle);
|
||||
|
||||
// Hidden Network
|
||||
hiddenNetworkButton = new ButtonControl(tr("Hidden Network"), tr("CONNECT"));
|
||||
connect(hiddenNetworkButton, &ButtonControl::clicked, [=]() {
|
||||
QString ssid = InputDialog::getText(tr("Enter SSID"), this, "", false, 1);
|
||||
if (!ssid.isEmpty()) {
|
||||
QString pass = InputDialog::getText(tr("Enter password"), this, tr("for \"%1\"").arg(ssid), true, -1);
|
||||
Network hidden_network;
|
||||
hidden_network.ssid = ssid.toUtf8();
|
||||
if (!pass.isEmpty()) {
|
||||
hidden_network.security_type = SecurityType::WPA;
|
||||
wifi->connect(hidden_network, pass);
|
||||
} else {
|
||||
wifi->connect(hidden_network);
|
||||
}
|
||||
emit requestWifiScreen();
|
||||
}
|
||||
});
|
||||
list->addItem(hiddenNetworkButton);
|
||||
|
||||
// Set initial config
|
||||
wifi->updateGsmSettings(roamingEnabled, QString::fromStdString(params.get("GsmApn")), metered);
|
||||
|
||||
|
||||
@@ -62,12 +62,14 @@ private:
|
||||
ToggleControl* tetheringToggle;
|
||||
ToggleControl* roamingToggle;
|
||||
ButtonControl* editApnButton;
|
||||
ButtonControl* hiddenNetworkButton;
|
||||
ToggleControl* meteredToggle;
|
||||
WifiManager* wifi = nullptr;
|
||||
Params params;
|
||||
|
||||
signals:
|
||||
void backPress();
|
||||
void requestWifiScreen();
|
||||
|
||||
public slots:
|
||||
void toggleTethering(bool enabled);
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>منع تحميل البيانات الكبيرة عندما يكون الاتصال محدوداً</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation>شبكة مخفية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation>الاتصال</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation>أدخل SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation>أدخل كلمة المرور</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation>من أجل "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>Hochladen großer Dateien über getaktete Verbindungen unterbinden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">CONNECT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">SSID eingeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">Passwort eingeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">für "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>Éviter les transferts de données importants sur une connexion limitée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">CONNECTER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">Entrer le SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">Entrer le mot de passe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">pour "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>大量のデータのアップロードを防止します。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">接続</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">SSID を入力</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">パスワードを入力</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">ネットワーク名:%1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>데이터 요금제 연결 시 대용량 데이터 업로드를 방지합니다</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">연결됨</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">SSID 입력</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">비밀번호를 입력하세요</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">"%1"에 접속하려면 비밀번호가 필요합니다</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>Evite grandes uploads de dados quando estiver em uma conexão limitada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">CONEXÃO</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">Insira SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">Insira a senha</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">para "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>ปิดการอัพโหลดข้อมูลขนาดใหญ่เมื่อเชื่อมต่อผ่านเซลลูล่าร์</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">เชื่อมต่อ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">ป้อนค่า SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">ใส่รหัสผ่าน</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">สำหรับ "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">BAĞLANTI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">APN Gir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">Parolayı girin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">için "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>当使用按流量计费的连接时,避免上传大流量数据</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">CONNECT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">输入SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">输入密码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">网络名称:"%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
@@ -66,6 +66,26 @@
|
||||
<source>Prevent large data uploads when on a metered connection</source>
|
||||
<translation>防止使用行動網路上傳大量的數據</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hidden Network</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CONNECT</source>
|
||||
<translation type="unfinished">雲端服務</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter SSID</source>
|
||||
<translation type="unfinished">輸入 SSID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter password</source>
|
||||
<translation type="unfinished">輸入密碼</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>for "%1"</source>
|
||||
<translation type="unfinished">給 "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AnnotatedCameraWidget</name>
|
||||
|
||||
Reference in New Issue
Block a user