mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-18 13:37:52 +08:00
Merge pull request #3513 from grummbeer/fix-shared-dialog-change-id
fix. Mobile. Style of input on "changeID" dialog
This commit is contained in:
commit
9031f8cbd4
@ -63,8 +63,9 @@ void changeIdDialog() {
|
|||||||
final Iterable violations = rules.where((r) => !r.validate(newId));
|
final Iterable violations = rules.where((r) => !r.validate(newId));
|
||||||
if (violations.isNotEmpty) {
|
if (violations.isNotEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
msg =
|
msg = isDesktop
|
||||||
'${translate('Prompt')}: ${violations.map((r) => r.name).join(', ')}';
|
? '${translate('Prompt')}: ${violations.map((r) => r.name).join(', ')}'
|
||||||
|
: violations.map((r) => r.name).join(', ');
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -87,7 +88,9 @@ void changeIdDialog() {
|
|||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
isInProgress = false;
|
isInProgress = false;
|
||||||
msg = '${translate('Prompt')}: ${translate(status)}';
|
msg = isDesktop
|
||||||
|
? '${translate('Prompt')}: ${translate(status)}'
|
||||||
|
: translate(status);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +106,7 @@ void changeIdDialog() {
|
|||||||
TextField(
|
TextField(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: translate('Your new ID'),
|
labelText: translate('Your new ID'),
|
||||||
border: const OutlineInputBorder(),
|
border: isDesktop ? const OutlineInputBorder() : null,
|
||||||
errorText: msg.isEmpty ? null : translate(msg),
|
errorText: msg.isEmpty ? null : translate(msg),
|
||||||
suffixText: '${rxId.value.length}/16',
|
suffixText: '${rxId.value.length}/16',
|
||||||
suffixStyle: const TextStyle(fontSize: 12, color: Colors.grey)),
|
suffixStyle: const TextStyle(fontSize: 12, color: Colors.grey)),
|
||||||
@ -123,7 +126,8 @@ void changeIdDialog() {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 8.0,
|
height: 8.0,
|
||||||
),
|
),
|
||||||
Obx(() => Wrap(
|
isDesktop
|
||||||
|
? Obx(() => Wrap(
|
||||||
runSpacing: 8,
|
runSpacing: 8,
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
children: rules.map((e) {
|
children: rules.map((e) {
|
||||||
@ -140,10 +144,8 @@ void changeIdDialog() {
|
|||||||
? const Color(0xFFD0F7ED)
|
? const Color(0xFFD0F7ED)
|
||||||
: Color.fromARGB(255, 247, 205, 232));
|
: Color.fromARGB(255, 247, 205, 232));
|
||||||
}).toList(),
|
}).toList(),
|
||||||
)),
|
)).marginOnly(bottom: 8)
|
||||||
const SizedBox(
|
: SizedBox.shrink(),
|
||||||
height: 8.0,
|
|
||||||
),
|
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: !isInProgress, child: const LinearProgressIndicator())
|
offstage: !isInProgress, child: const LinearProgressIndicator())
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user