Improve Login and Settings

This commit is contained in:
2026-02-01 22:42:00 +01:00
parent 9dc86419e4
commit 9fd0c210ae
11 changed files with 140 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import '../services/authentication_manager.dart';
import '../services/brandmeister_client.dart';
@@ -133,11 +134,39 @@ class _AuthViewState extends State<AuthView> {
const SizedBox(height: 24),
TextButton.icon(
onPressed: () {
// Open BrandMeister website
final url = Uri.parse('https://brandmeister.network/?page=profile-api');
launchUrl(url, mode: LaunchMode.externalApplication);
},
icon: const Icon(Icons.open_in_new),
label: const Text('Get API Token from BrandMeister'),
),
const SizedBox(height: 32),
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(12),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
Icons.lock_outline,
size: 20,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
const SizedBox(width: 12),
Expanded(
child: Text(
'Your API token is stored securely in encrypted storage on your device. It is never shared with anyone and is only used to authenticate with the BrandMeister network.',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
],
),
),
],
),
),