fix: Fix some initializing errors

Correct progress index calculation and hardcore cloudflare loading until new providers for DNS are supported
pull/149/head
NaiJi ✨ 2022-11-30 19:05:21 +04:00
parent 899c84c54f
commit 29b0bf2397
2 changed files with 7 additions and 8 deletions

View File

@ -75,13 +75,12 @@ class ServerInstallationRepository {
);
}
if (serverDomain != null && serverDomain.provider != DnsProvider.unknown) {
ApiController.initDnsProviderApiFactory(
DnsProviderApiFactorySettings(
provider: serverDomain.provider,
),
);
}
// No other DNS provider is supported for now, so it's fine.
ApiController.initDnsProviderApiFactory(
DnsProviderApiFactorySettings(
provider: DnsProvider.cloudflare,
),
);
if (box.get(BNames.hasFinalChecked, defaultValue: false)) {
return ServerInstallationFinished(

View File

@ -48,7 +48,7 @@ abstract class ServerInstallationState extends Equatable {
bool get isFullyInitilized => _fulfilementList.every((final el) => el!);
ServerSetupProgress get progress => ServerSetupProgress
.values[_fulfilementList.where((final el) => el!).length];
.values[_fulfilementList.where((final el) => el!).length + 1];
int get porgressBar {
if (progress.index < 6) {