diff --git a/flutter/lib/desktop/pages/server_page.dart b/flutter/lib/desktop/pages/server_page.dart index ae69497bc..aae6da8fc 100644 --- a/flutter/lib/desktop/pages/server_page.dart +++ b/flutter/lib/desktop/pages/server_page.dart @@ -304,7 +304,9 @@ class _CmHeaderState extends State<_CmHeader> void initState() { super.initState(); _timer = Timer.periodic(Duration(seconds: 1), (_) { - if (!client.disconnected) _time.value = _time.value + 1; + if (client.authorized && !client.disconnected) { + _time.value = _time.value + 1; + } }); } @@ -358,12 +360,15 @@ class _CmHeaderState extends State<_CmHeader> FittedBox( child: Row( children: [ - Text(client.disconnected - ? translate("Disconnected") - : translate("Connected")) + Text(client.authorized + ? client.disconnected + ? translate("Disconnected") + : translate("Connected") + : "${translate("Request access to your device")}...") .marginOnly(right: 8.0), - Obx(() => Text( - formatDurationToTime(Duration(seconds: _time.value)))) + if (client.authorized) + Obx(() => Text( + formatDurationToTime(Duration(seconds: _time.value)))) ], )) ], diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 99150acd0..f5684b4c4 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -393,5 +393,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 5e38c3d27..7256c5d1f 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", "一次性密码"), ("Use one-time password", "使用一次性密码"), ("One-time password length", "一次性密码长度"), + ("Request access to your device", "请求访问你的设备"), ].iter().cloned().collect(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 6081e4212..63fac7288 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index ab1dbff38..4278cdc20 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index 328c5128b..5d82f84d1 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 9cd6eacd1..3c7ac806a 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index 210dc4352..5dd471a4b 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 7432dd8a1..0ea1f6f55 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -393,5 +393,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", "رمز عبور یکبار مصرف"), ("Use one-time password", "استفاده از رمز عبور یکبار مصرف"), ("One-time password length", "طول رمز عبور یکبار مصرف"), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index b24fb71da..4b8d0d83e 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index b65ff2579..9802ddb6f 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 0fb623606..002789066 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 47c186fe5..46602dfd4 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index fcd579c9f..b032fbe7e 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index ee28e05eb..338fc7ffe 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/kz.rs b/src/lang/kz.rs index 768e735b8..3a343da21 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pl.rs b/src/lang/pl.rs index c6ba009d3..b4f760a35 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index 97800a8f7..dbb5fbbe9 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index f773a0a93..7d9c0b270 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index fdee117c5..ded00af23 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 4013a95c0..8da18e035 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index bd0f87519..bc9bc95e3 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 5aef77c22..86283557f 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index 7e3c451f7..cc8f65e1c 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", "一次性密碼"), ("Use one-time password", "使用一次性密碼"), ("One-time password length", "一次性密碼長度"), + ("Request access to your device", "請求訪問你的設備"), ].iter().cloned().collect(); } diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 656d7665b..7d14ee7e0 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index a5dc66db8..3ddacdf8d 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -394,5 +394,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("One-time Password", ""), ("Use one-time password", ""), ("One-time password length", ""), + ("Request access to your device", ""), ].iter().cloned().collect(); } diff --git a/src/ui/cm.tis b/src/ui/cm.tis index 4ecbe706c..2cfc14bf1 100644 --- a/src/ui/cm.tis +++ b/src/ui/cm.tis @@ -41,7 +41,10 @@ class Body: Reactor.Component
{c.name}
({c.peer_id})
-
{disconnected ? translate('Disconnected') : translate('Connected')} {" "} {getElaspsed(c.time, c.now)}
+
{auth + ? {disconnected ? translate('Disconnected') : translate('Connected')}{" "}{getElaspsed(c.time, c.now)} + : {translate('Request access to your device')}{"..."}} +
@@ -472,12 +475,13 @@ function updateTime() { self.timer(1s, function() { var now = new Date(); connections.map(function(c) { + if (!c.authorized) c.time = now; if (!c.disconnected) c.now = now; }); var el = $(#time); if (el) { var c = connections[body.cur]; - if (c && !c.disconnected) { + if (c && c.authorized && !c.disconnected) { el.text = getElaspsed(c.time, c.now); } }