feat: persist server settings
This commit is contained in:
@@ -59,12 +59,13 @@ class _ServerDiscoveryScreenState extends ConsumerState<ServerDiscoveryScreen> {
|
||||
await OnboardingClient(config: config).getChecklist();
|
||||
|
||||
ref.read(serverConfigProvider.notifier).state = config;
|
||||
await ref.read(credentialStoreProvider).saveServer(config);
|
||||
|
||||
if (!mounted) return;
|
||||
if (!checklist.hasAdmin) {
|
||||
context.go('/onboarding');
|
||||
context.push('/onboarding');
|
||||
} else {
|
||||
context.go('/login');
|
||||
context.push('/login');
|
||||
}
|
||||
} catch (e) {
|
||||
setState(() => _error = e.toString());
|
||||
|
||||
Reference in New Issue
Block a user