mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-05-10 16:18:10 +03:00
improved oidc login error
This commit is contained in:
@@ -224,21 +224,59 @@ class _WidgetOPState extends State<WidgetOP> {
|
|||||||
return Offstage(
|
return Offstage(
|
||||||
offstage:
|
offstage:
|
||||||
_failedMsg.isEmpty && widget.curOP.value != widget.config.op,
|
_failedMsg.isEmpty && widget.curOP.value != widget.config.op,
|
||||||
child: RichText(
|
child: Column(
|
||||||
text: TextSpan(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
text: '$_stateMsg ',
|
children: [
|
||||||
style:
|
if (_stateMsg.isNotEmpty && _failedMsg.isEmpty)
|
||||||
DefaultTextStyle.of(context).style.copyWith(fontSize: 12),
|
Padding(
|
||||||
children: <TextSpan>[
|
padding: const EdgeInsets.only(top: 8.0),
|
||||||
TextSpan(
|
child: SelectableText(
|
||||||
text: _failedMsg,
|
translate(_stateMsg),
|
||||||
style: DefaultTextStyle.of(context).style.copyWith(
|
style: DefaultTextStyle.of(context)
|
||||||
fontSize: 14,
|
.style
|
||||||
color: Colors.red,
|
.copyWith(fontSize: 12),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
if (_failedMsg.isNotEmpty)
|
||||||
),
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8.0),
|
||||||
|
child: Builder(builder: (context) {
|
||||||
|
final errorColor =
|
||||||
|
Theme.of(context).colorScheme.error;
|
||||||
|
final bgColor = Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.errorContainer
|
||||||
|
.withOpacity(0.3);
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8.0, vertical: 6.0),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: bgColor,
|
||||||
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.error_outline,
|
||||||
|
color: errorColor, size: 16),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Flexible(
|
||||||
|
child: SelectableText(
|
||||||
|
translate(_failedMsg),
|
||||||
|
style: DefaultTextStyle.of(context)
|
||||||
|
.style
|
||||||
|
.copyWith(
|
||||||
|
fontSize: 13,
|
||||||
|
color: errorColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user