47 lines
1.8 KiB
Dart
47 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|||
|
|
|
||
|
|
import '../../../core/theme/theme_x.dart';
|
||
|
|
|
||
|
|
/// Static warning — NodeMaster's REST API has no built-in authentication.
|
||
|
|
/// Anyone who can reach a node's port can start/stop services or trigger
|
||
|
|
/// backups on it. Not dismissable: this is a standing property of the
|
||
|
|
/// backend, not a one-time notice.
|
||
|
|
class NoAuthCallout extends StatelessWidget {
|
||
|
|
const NoAuthCallout({super.key});
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return Container(
|
||
|
|
padding: const EdgeInsets.all(14),
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
color: Color.alphaBlend(context.status.warning.withValues(alpha: 0.10), context.colors.surface),
|
||
|
|
borderRadius: BorderRadius.circular(10),
|
||
|
|
border: Border.all(color: context.status.warning.withValues(alpha: 0.4)),
|
||
|
|
),
|
||
|
|
child: Row(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
|
children: [
|
||
|
|
Icon(Icons.warning_amber_rounded, size: 18, color: context.status.warning),
|
||
|
|
const SizedBox(width: 12),
|
||
|
|
Expanded(
|
||
|
|
child: RichText(
|
||
|
|
text: TextSpan(
|
||
|
|
style: context.text.bodyMedium,
|
||
|
|
children: [
|
||
|
|
TextSpan(text: 'No API authentication yet. ', style: const TextStyle(fontWeight: FontWeight.w700)),
|
||
|
|
const TextSpan(
|
||
|
|
text: "NodeMaster's REST API has no built-in auth — anyone who can reach a node's "
|
||
|
|
'port can start, stop, or trigger backups on it. Until token auth ships, keep it '
|
||
|
|
'behind a VPN or a reverse proxy with its own access control, and treat saved '
|
||
|
|
'connection URLs as sensitive.',
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|