mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-26 18:56:38 +00:00
update
This commit is contained in:
parent
eb2c8dca23
commit
aabad65698
|
@ -178,7 +178,8 @@
|
||||||
"17": "Check",
|
"17": "Check",
|
||||||
"18": "How to obtain Hetzner API Token",
|
"18": "How to obtain Hetzner API Token",
|
||||||
"19": "1 Go via this link ",
|
"19": "1 Go via this link ",
|
||||||
"20": "\n"
|
"20": "\n",
|
||||||
|
"21": "One more restart to apply your security certificates."
|
||||||
},
|
},
|
||||||
"modals": {
|
"modals": {
|
||||||
"_comment": "messages in modals",
|
"_comment": "messages in modals",
|
||||||
|
|
|
@ -178,7 +178,8 @@
|
||||||
"17": "Проверка",
|
"17": "Проверка",
|
||||||
"18": "Как получить Hetzner API Token'",
|
"18": "Как получить Hetzner API Token'",
|
||||||
"19": "1 Переходим по ссылке ",
|
"19": "1 Переходим по ссылке ",
|
||||||
"20": "\n2 Заходим в созданный нами проект. Если такового - нет, значит создаём.\n3 Наводим мышкой на боковую панель. Она должна раскрыться, показав нам пункты меню. Нас интересует последний — Security (с иконкой ключика).\n4 Далее, в верхней части интерфейса видим примерно такой список: SSH Keys, API Tokens, Certificates, Members. Нам нужен API Tokens. Переходим по нему.\n5 В правой части интерфейса, нас будет ожидать кнопка Generate API token. Если же вы используете мобильную версию сайта, в нижнем правом углу вы увидите красный плюсик. Нажимаем на эту кнопку.\n6 В поле Description, даём нашему токену название (это может быть любое название, которые вам нравиться. Сути оно не меняет."
|
"20": "\n2 Заходим в созданный нами проект. Если такового - нет, значит создаём.\n3 Наводим мышкой на боковую панель. Она должна раскрыться, показав нам пункты меню. Нас интересует последний — Security (с иконкой ключика).\n4 Далее, в верхней части интерфейса видим примерно такой список: SSH Keys, API Tokens, Certificates, Members. Нам нужен API Tokens. Переходим по нему.\n5 В правой части интерфейса, нас будет ожидать кнопка Generate API token. Если же вы используете мобильную версию сайта, в нижнем правом углу вы увидите красный плюсик. Нажимаем на эту кнопку.\n6 В поле Description, даём нашему токену название (это может быть любое название, которые вам нравиться. Сути оно не меняет.",
|
||||||
|
"21": "Сейчас будет дополнительная перезагрузка для активации сертификатов безопастности"
|
||||||
},
|
},
|
||||||
"modals": {
|
"modals": {
|
||||||
"_comment": "messages in modals",
|
"_comment": "messages in modals",
|
||||||
|
|
|
@ -56,5 +56,6 @@ class BNames {
|
||||||
static String isServerStarted = 'isServerStarted';
|
static String isServerStarted = 'isServerStarted';
|
||||||
static String backblazeKey = 'backblazeKey';
|
static String backblazeKey = 'backblazeKey';
|
||||||
static String isLoading = 'isLoading';
|
static String isLoading = 'isLoading';
|
||||||
static String isServerReseted = 'isServerReseted';
|
static String isServerResetedFirstTime = 'isServerResetedFirstTime';
|
||||||
|
static String isServerResetedSecondTime = 'isServerResetedSecondTime';
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,9 @@ final linkStyle = defaultTextStyle.copyWith(color: BrandColors.blue);
|
||||||
final progressTextStyleLight = TextStyle(
|
final progressTextStyleLight = TextStyle(
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
color: BrandColors.textColor1,
|
color: BrandColors.textColor1,
|
||||||
|
height: 1.7,
|
||||||
);
|
);
|
||||||
|
|
||||||
final progressTextStyleDark = TextStyle(
|
final progressTextStyleDark = progressTextStyleLight.copyWith(
|
||||||
fontSize: 11,
|
|
||||||
color: BrandColors.white,
|
color: BrandColors.white,
|
||||||
);
|
);
|
||||||
|
|
|
@ -94,7 +94,7 @@ class HetznerApi extends ApiMap {
|
||||||
);
|
);
|
||||||
var dbId = dbCreateResponse.data['volume']['id'];
|
var dbId = dbCreateResponse.data['volume']['id'];
|
||||||
var data = jsonDecode(
|
var data = jsonDecode(
|
||||||
'''{"name":"selfprivacy-server","server_type":"cx11","start_after_create":false,"image":"ubuntu-20.04", "volumes":[$dbId],"networks":[],"user_data":"#cloud-config\\nruncmd:\\n- curl https://git.selfprivacy.org/ilchub/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-20.09 DOMAIN=$domainName LUSER=${rootUser.login} PASSWORD=${rootUser.password} HASHED_PASSWORD=${rootUser.hashPassword} CF_TOKEN=$cloudFlareKey DB_PASSWORD=$dbPassword bash 2>&1 | tee /tmp/infect.log","labels":{},"automount":true, "location": "fsn1"}''',
|
'''{"name":"$domainName","server_type":"cx11","start_after_create":false,"image":"ubuntu-20.04", "volumes":[$dbId],"networks":[],"user_data":"#cloud-config\\nruncmd:\\n- curl https://git.selfprivacy.org/ilchub/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-20.09 DOMAIN=$domainName LUSER=${rootUser.login} PASSWORD=${rootUser.password} HASHED_PASSWORD=${rootUser.hashPassword} CF_TOKEN=$cloudFlareKey DB_PASSWORD=$dbPassword bash 2>&1 | tee /tmp/infect.log","labels":{},"automount":true, "location": "fsn1"}''',
|
||||||
);
|
);
|
||||||
|
|
||||||
Response serverCreateResponse = await client.post(
|
Response serverCreateResponse = await client.post(
|
||||||
|
@ -113,12 +113,14 @@ class HetznerApi extends ApiMap {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deleteSelfprivacyServerAndAllVolumes() async {
|
Future<void> deleteSelfprivacyServerAndAllVolumes({
|
||||||
|
required String domainName,
|
||||||
|
}) async {
|
||||||
var client = await getClient();
|
var client = await getClient();
|
||||||
|
|
||||||
Response serversReponse = await client.get('/servers');
|
Response serversReponse = await client.get('/servers');
|
||||||
List servers = serversReponse.data['servers'];
|
List servers = serversReponse.data['servers'];
|
||||||
var server = servers.firstWhere((el) => el['name'] == 'selfprivacy-server');
|
var server = servers.firstWhere((el) => el['name'] == domainName);
|
||||||
await client.delete('/servers/${server['id']}');
|
await client.delete('/servers/${server['id']}');
|
||||||
|
|
||||||
Response volumesReponse = await client.get('/volumes');
|
Response volumesReponse = await client.get('/volumes');
|
||||||
|
|
|
@ -35,7 +35,10 @@ part 'app_config_state.dart';
|
||||||
/// c. if server is ok wait 30 sec
|
/// c. if server is ok wait 30 sec
|
||||||
/// d. reset server
|
/// d. reset server
|
||||||
///
|
///
|
||||||
/// 2.3. a. wait 60sec |finishCheckIfServerIsOkay
|
/// 2.3. a. wait 60sec |oneMoreReset()
|
||||||
|
/// d. reset server
|
||||||
|
///
|
||||||
|
/// 2.4. a. wait 30sec |finishCheckIfServerIsOkay
|
||||||
/// b. checkServer
|
/// b. checkServer
|
||||||
/// c. if server is okay set that fully checked
|
/// c. if server is okay set that fully checked
|
||||||
|
|
||||||
|
@ -54,6 +57,8 @@ class AppConfigCubit extends Cubit<AppConfigState> {
|
||||||
} else if (state.progress == 7) {
|
} else if (state.progress == 7) {
|
||||||
resetServerIfServerIsOkay(state: state, isImmediate: true);
|
resetServerIfServerIsOkay(state: state, isImmediate: true);
|
||||||
} else if (state.progress == 8) {
|
} else if (state.progress == 8) {
|
||||||
|
oneMoreReset(state: state, isImmediate: true);
|
||||||
|
} else if (state.progress == 9) {
|
||||||
finishCheckIfServerIsOkay(state: state, isImmediate: true);
|
finishCheckIfServerIsOkay(state: state, isImmediate: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,6 +111,61 @@ class AppConfigCubit extends Cubit<AppConfigState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void oneMoreReset({
|
||||||
|
AppConfigState? state,
|
||||||
|
bool isImmediate = false,
|
||||||
|
}) async {
|
||||||
|
var dataState = state ?? this.state;
|
||||||
|
|
||||||
|
var work = () async {
|
||||||
|
emit(TimerState(dataState: dataState, isLoading: true));
|
||||||
|
|
||||||
|
var isServerWorking = await repository.isHttpServerWorking();
|
||||||
|
|
||||||
|
if (isServerWorking) {
|
||||||
|
var pauseDuration = Duration(seconds: 30);
|
||||||
|
emit(TimerState(
|
||||||
|
dataState: dataState,
|
||||||
|
timerStart: DateTime.now(),
|
||||||
|
isLoading: false,
|
||||||
|
duration: pauseDuration,
|
||||||
|
));
|
||||||
|
timer = Timer(pauseDuration, () async {
|
||||||
|
var hetznerServerDetails = await repository.restart(
|
||||||
|
dataState.hetznerServer!,
|
||||||
|
);
|
||||||
|
repository.saveIsServerResetedSecondTime(true);
|
||||||
|
repository.saveServerDetails(hetznerServerDetails);
|
||||||
|
|
||||||
|
emit(
|
||||||
|
dataState.copyWith(
|
||||||
|
isServerResetedSecondTime: true,
|
||||||
|
hetznerServer: hetznerServerDetails,
|
||||||
|
isLoading: false,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
finishCheckIfServerIsOkay();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
oneMoreReset();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (isImmediate) {
|
||||||
|
work();
|
||||||
|
} else {
|
||||||
|
var pauseDuration = Duration(seconds: 60);
|
||||||
|
emit(
|
||||||
|
TimerState(
|
||||||
|
dataState: dataState,
|
||||||
|
timerStart: DateTime.now(),
|
||||||
|
duration: pauseDuration,
|
||||||
|
isLoading: false,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
timer = Timer(pauseDuration, work);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void resetServerIfServerIsOkay({
|
void resetServerIfServerIsOkay({
|
||||||
AppConfigState? state,
|
AppConfigState? state,
|
||||||
bool isImmediate = false,
|
bool isImmediate = false,
|
||||||
|
@ -129,17 +189,17 @@ class AppConfigCubit extends Cubit<AppConfigState> {
|
||||||
var hetznerServerDetails = await repository.restart(
|
var hetznerServerDetails = await repository.restart(
|
||||||
dataState.hetznerServer!,
|
dataState.hetznerServer!,
|
||||||
);
|
);
|
||||||
repository.saveIsServerReseted(true);
|
repository.saveIsServerResetedFirstTime(true);
|
||||||
repository.saveServerDetails(hetznerServerDetails);
|
repository.saveServerDetails(hetznerServerDetails);
|
||||||
|
|
||||||
emit(
|
emit(
|
||||||
dataState.copyWith(
|
dataState.copyWith(
|
||||||
isServerReseted: true,
|
isServerResetedFirstTime: true,
|
||||||
hetznerServer: hetznerServerDetails,
|
hetznerServer: hetznerServerDetails,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
finishCheckIfServerIsOkay();
|
oneMoreReset();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
resetServerIfServerIsOkay();
|
resetServerIfServerIsOkay();
|
||||||
|
|
|
@ -30,12 +30,17 @@ class AppConfigRepository {
|
||||||
hetznerServer: getIt<ApiConfigModel>().hetznerServer,
|
hetznerServer: getIt<ApiConfigModel>().hetznerServer,
|
||||||
rootUser: box.get(BNames.rootUser),
|
rootUser: box.get(BNames.rootUser),
|
||||||
isServerStarted: box.get(BNames.isServerStarted, defaultValue: false),
|
isServerStarted: box.get(BNames.isServerStarted, defaultValue: false),
|
||||||
isServerReseted: box.get(BNames.isServerReseted, defaultValue: false),
|
isServerResetedFirstTime:
|
||||||
|
box.get(BNames.isServerResetedFirstTime, defaultValue: false),
|
||||||
|
isServerResetedSecondTime:
|
||||||
|
box.get(BNames.isServerResetedSecondTime, defaultValue: false),
|
||||||
hasFinalChecked: box.get(BNames.hasFinalChecked, defaultValue: false),
|
hasFinalChecked: box.get(BNames.hasFinalChecked, defaultValue: false),
|
||||||
error: null,
|
error: null,
|
||||||
isLoading: box.get(BNames.isLoading, defaultValue: false),
|
isLoading: box.get(BNames.isLoading, defaultValue: false),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +124,8 @@ class AppConfigRepository {
|
||||||
text: 'basis.delete'.tr(),
|
text: 'basis.delete'.tr(),
|
||||||
isRed: true,
|
isRed: true,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await hetznerApi.deleteSelfprivacyServerAndAllVolumes();
|
await hetznerApi.deleteSelfprivacyServerAndAllVolumes(
|
||||||
|
domainName: domainName);
|
||||||
|
|
||||||
var serverDetails = await hetznerApi.createServer(
|
var serverDetails = await hetznerApi.createServer(
|
||||||
cloudFlareKey: cloudFlareKey,
|
cloudFlareKey: cloudFlareKey,
|
||||||
|
@ -198,8 +204,12 @@ class AppConfigRepository {
|
||||||
await box.put(BNames.isServerStarted, value);
|
await box.put(BNames.isServerStarted, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> saveIsServerReseted(bool value) async {
|
Future<void> saveIsServerResetedFirstTime(bool value) async {
|
||||||
await box.put(BNames.isServerReseted, value);
|
await box.put(BNames.isServerResetedFirstTime, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> saveIsServerResetedSecondTime(bool value) async {
|
||||||
|
await box.put(BNames.isServerResetedSecondTime, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveRootUser(User rootUser) async {
|
void saveRootUser(User rootUser) async {
|
||||||
|
|
|
@ -9,7 +9,8 @@ class AppConfigState extends Equatable {
|
||||||
required this.rootUser,
|
required this.rootUser,
|
||||||
required this.hetznerServer,
|
required this.hetznerServer,
|
||||||
required this.isServerStarted,
|
required this.isServerStarted,
|
||||||
required this.isServerReseted,
|
required this.isServerResetedFirstTime,
|
||||||
|
required this.isServerResetedSecondTime,
|
||||||
required this.hasFinalChecked,
|
required this.hasFinalChecked,
|
||||||
required this.isLoading,
|
required this.isLoading,
|
||||||
required this.error,
|
required this.error,
|
||||||
|
@ -24,7 +25,7 @@ class AppConfigState extends Equatable {
|
||||||
rootUser,
|
rootUser,
|
||||||
hetznerServer,
|
hetznerServer,
|
||||||
isServerStarted,
|
isServerStarted,
|
||||||
isServerReseted,
|
isServerResetedFirstTime,
|
||||||
hasFinalChecked,
|
hasFinalChecked,
|
||||||
isLoading,
|
isLoading,
|
||||||
error,
|
error,
|
||||||
|
@ -37,7 +38,9 @@ class AppConfigState extends Equatable {
|
||||||
final User? rootUser;
|
final User? rootUser;
|
||||||
final HetznerServerDetails? hetznerServer;
|
final HetznerServerDetails? hetznerServer;
|
||||||
final bool isServerStarted;
|
final bool isServerStarted;
|
||||||
final bool isServerReseted;
|
final bool isServerResetedFirstTime;
|
||||||
|
final bool isServerResetedSecondTime;
|
||||||
|
|
||||||
final bool hasFinalChecked;
|
final bool hasFinalChecked;
|
||||||
|
|
||||||
final bool? isLoading;
|
final bool? isLoading;
|
||||||
|
@ -51,7 +54,8 @@ class AppConfigState extends Equatable {
|
||||||
User? rootUser,
|
User? rootUser,
|
||||||
HetznerServerDetails? hetznerServer,
|
HetznerServerDetails? hetznerServer,
|
||||||
bool? isServerStarted,
|
bool? isServerStarted,
|
||||||
bool? isServerReseted,
|
bool? isServerResetedFirstTime,
|
||||||
|
bool? isServerResetedSecondTime,
|
||||||
bool? hasFinalChecked,
|
bool? hasFinalChecked,
|
||||||
bool? isLoading,
|
bool? isLoading,
|
||||||
Exception? error,
|
Exception? error,
|
||||||
|
@ -64,7 +68,10 @@ class AppConfigState extends Equatable {
|
||||||
rootUser: rootUser ?? this.rootUser,
|
rootUser: rootUser ?? this.rootUser,
|
||||||
hetznerServer: hetznerServer ?? this.hetznerServer,
|
hetznerServer: hetznerServer ?? this.hetznerServer,
|
||||||
isServerStarted: isServerStarted ?? this.isServerStarted,
|
isServerStarted: isServerStarted ?? this.isServerStarted,
|
||||||
isServerReseted: isServerReseted ?? this.isServerReseted,
|
isServerResetedFirstTime:
|
||||||
|
isServerResetedFirstTime ?? this.isServerResetedFirstTime,
|
||||||
|
isServerResetedSecondTime:
|
||||||
|
isServerResetedSecondTime ?? this.isServerResetedSecondTime,
|
||||||
hasFinalChecked: hasFinalChecked ?? this.hasFinalChecked,
|
hasFinalChecked: hasFinalChecked ?? this.hasFinalChecked,
|
||||||
isLoading: isLoading ?? this.isLoading,
|
isLoading: isLoading ?? this.isLoading,
|
||||||
error: error ?? this.error,
|
error: error ?? this.error,
|
||||||
|
@ -89,11 +96,11 @@ class AppConfigState extends Equatable {
|
||||||
isUserFilled,
|
isUserFilled,
|
||||||
isServerCreated,
|
isServerCreated,
|
||||||
isServerStarted,
|
isServerStarted,
|
||||||
isServerReseted,
|
isServerResetedFirstTime,
|
||||||
|
isServerResetedSecondTime,
|
||||||
hasFinalChecked,
|
hasFinalChecked,
|
||||||
];
|
];
|
||||||
|
|
||||||
print(res);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +115,8 @@ class InitialAppConfigState extends AppConfigState {
|
||||||
rootUser: null,
|
rootUser: null,
|
||||||
hetznerServer: null,
|
hetznerServer: null,
|
||||||
isServerStarted: false,
|
isServerStarted: false,
|
||||||
isServerReseted: false,
|
isServerResetedFirstTime: false,
|
||||||
|
isServerResetedSecondTime: false,
|
||||||
hasFinalChecked: false,
|
hasFinalChecked: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
error: null,
|
error: null,
|
||||||
|
@ -129,7 +137,8 @@ class TimerState extends AppConfigState {
|
||||||
rootUser: dataState.rootUser,
|
rootUser: dataState.rootUser,
|
||||||
hetznerServer: dataState.hetznerServer,
|
hetznerServer: dataState.hetznerServer,
|
||||||
isServerStarted: dataState.isServerStarted,
|
isServerStarted: dataState.isServerStarted,
|
||||||
isServerReseted: dataState.isServerReseted,
|
isServerResetedFirstTime: dataState.isServerResetedFirstTime,
|
||||||
|
isServerResetedSecondTime: dataState.isServerResetedSecondTime,
|
||||||
hasFinalChecked: dataState.hasFinalChecked,
|
hasFinalChecked: dataState.hasFinalChecked,
|
||||||
isLoading: isLoading,
|
isLoading: isLoading,
|
||||||
error: dataState.error,
|
error: dataState.error,
|
||||||
|
|
|
@ -47,14 +47,13 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
odd
|
odd.insert(
|
||||||
..insert(
|
|
||||||
0,
|
0,
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 20,
|
width: 10,
|
||||||
),
|
),
|
||||||
)
|
);
|
||||||
..add(
|
even.add(
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10,
|
width: 10,
|
||||||
),
|
),
|
||||||
|
@ -65,7 +64,10 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
children: [
|
children: [
|
||||||
BrandText.h2('Progress'),
|
BrandText.h2('Progress'),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
Row(children: even),
|
Row(
|
||||||
|
children: even,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
),
|
||||||
SizedBox(height: 7),
|
SizedBox(height: 7),
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
|
@ -96,12 +98,13 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
SizedBox(height: 5),
|
SizedBox(height: 5),
|
||||||
Row(
|
Row(
|
||||||
children: odd,
|
children: odd,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expanded _stepTitle({
|
Container _stepTitle({
|
||||||
required int index,
|
required int index,
|
||||||
TextStyle? style,
|
TextStyle? style,
|
||||||
String? step,
|
String? step,
|
||||||
|
@ -110,17 +113,19 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
var checked = index < widget.activeIndex;
|
var checked = index < widget.activeIndex;
|
||||||
|
|
||||||
style = isActive ? style!.copyWith(fontWeight: FontWeight.w700) : style;
|
style = isActive ? style!.copyWith(fontWeight: FontWeight.w700) : style;
|
||||||
return Expanded(
|
return Container(
|
||||||
flex: 2,
|
padding: EdgeInsets.only(left: 10),
|
||||||
|
height: 20,
|
||||||
|
alignment: Alignment.center,
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.justify,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
style: progressTextStyleLight,
|
style: progressTextStyleLight,
|
||||||
children: [
|
children: [
|
||||||
checked
|
checked
|
||||||
? WidgetSpan(
|
? WidgetSpan(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 0, right: 2),
|
padding: const EdgeInsets.only(bottom: 2, right: 2),
|
||||||
child: Icon(BrandIcons.check, size: 11),
|
child: Icon(BrandIcons.check, size: 11),
|
||||||
))
|
))
|
||||||
: TextSpan(text: '${index + 1}.', style: style),
|
: TextSpan(text: '${index + 1}.', style: style),
|
||||||
|
|
|
@ -34,6 +34,7 @@ class InitializingPage extends StatelessWidget {
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
|
() => _stepCheck(cubit),
|
||||||
() => Container(child: Text('Everythigng is initialized'))
|
() => Container(child: Text('Everythigng is initialized'))
|
||||||
][cubit.state.progress]();
|
][cubit.state.progress]();
|
||||||
return BlocListener<AppConfigCubit, AppConfigState>(
|
return BlocListener<AppConfigCubit, AppConfigState>(
|
||||||
|
@ -58,7 +59,8 @@ class InitializingPage extends StatelessWidget {
|
||||||
'Server',
|
'Server',
|
||||||
' ✅',
|
' ✅',
|
||||||
' ✅',
|
' ✅',
|
||||||
' ✅'
|
' ✅',
|
||||||
|
' ✅',
|
||||||
],
|
],
|
||||||
activeIndex: cubit.state.progress,
|
activeIndex: cubit.state.progress,
|
||||||
),
|
),
|
||||||
|
@ -427,8 +429,10 @@ class InitializingPage extends StatelessWidget {
|
||||||
var state = appConfigCubit.state as TimerState;
|
var state = appConfigCubit.state as TimerState;
|
||||||
|
|
||||||
late String? text;
|
late String? text;
|
||||||
if (state.isServerReseted) {
|
if (state.isServerResetedSecondTime) {
|
||||||
text = 'initializing.13'.tr();
|
text = 'initializing.13'.tr();
|
||||||
|
} else if (state.isServerResetedFirstTime) {
|
||||||
|
text = 'initializing.21'.tr();
|
||||||
} else if (state.isServerStarted) {
|
} else if (state.isServerStarted) {
|
||||||
text = 'initializing.14'.tr();
|
text = 'initializing.14'.tr();
|
||||||
} else if (state.isServerCreated) {
|
} else if (state.isServerCreated) {
|
||||||
|
|
Loading…
Reference in a new issue