fix: alot
This commit is contained in:
@@ -33,11 +33,8 @@ class AdminScreenView extends StatelessWidget {
|
||||
final confirmed = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Disconnect from server'),
|
||||
content: const Text(
|
||||
'This will unlink the device from the remote server. '
|
||||
'Open tabs will no longer be synced. Continue?',
|
||||
),
|
||||
title: Text(l10n.disconnectFromServer),
|
||||
content: Text(l10n.disconnectFromServerDescription),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, false),
|
||||
@@ -46,7 +43,7 @@ class AdminScreenView extends StatelessWidget {
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.pop(ctx, true),
|
||||
style: FilledButton.styleFrom(backgroundColor: Colors.red),
|
||||
child: const Text('Disconnect'),
|
||||
child: Text(l10n.disconnect),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -109,35 +106,33 @@ class AdminScreenView extends StatelessWidget {
|
||||
subtitle: l10n.closedTabs,
|
||||
onTap: () => context.push('/history'),
|
||||
),
|
||||
_AdminTile(
|
||||
icon: Icons.file_upload_outlined,
|
||||
title: l10n.importData,
|
||||
subtitle: l10n.importNamesDescription,
|
||||
onTap: () => context.push('/admin/import'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_AdminSection(
|
||||
title: 'Remote Server',
|
||||
title: l10n.remoteServer,
|
||||
children: [
|
||||
if (remoteSync.isConfigured) ...[
|
||||
_AdminTile(
|
||||
icon: Icons.cloud_done_outlined,
|
||||
title: 'Connected',
|
||||
subtitle: 'Device linked to remote server',
|
||||
title: l10n.connected,
|
||||
subtitle: l10n.deviceLinked,
|
||||
trailing: TextButton(
|
||||
onPressed: () => _confirmUnlink(context),
|
||||
style: TextButton.styleFrom(foregroundColor: Colors.red),
|
||||
child: const Text('Disconnect'),
|
||||
child: Text(l10n.disconnect),
|
||||
),
|
||||
onTap: null,
|
||||
),
|
||||
] else
|
||||
_AdminTile(
|
||||
icon: Icons.cloud_outlined,
|
||||
title: 'Not connected',
|
||||
subtitle: 'Link to remote dashboard',
|
||||
icon: remoteSync.wasRevoked
|
||||
? Icons.cloud_off_rounded
|
||||
: Icons.cloud_outlined,
|
||||
title: l10n.notConnected,
|
||||
subtitle: remoteSync.wasRevoked
|
||||
? l10n.deviceAccessRevoked
|
||||
: l10n.linkToDashboard,
|
||||
onTap: () => context.push('/register'),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user