mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-07 00:24:18 +00:00
Merge pull request 'refactor: Fix linter warnings' (#384) from lints into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/384 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
699f906bf1
|
@ -103,7 +103,7 @@ class BackblazeApi extends RestApiMap {
|
||||||
} else {
|
} else {
|
||||||
throw Exception('code: ${response.statusCode}');
|
throw Exception('code: ${response.statusCode}');
|
||||||
}
|
}
|
||||||
} on DioError catch (e) {
|
} on DioException catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
return GenericResult(
|
return GenericResult(
|
||||||
data: false,
|
data: false,
|
||||||
|
@ -137,7 +137,7 @@ class BackblazeApi extends RestApiMap {
|
||||||
{
|
{
|
||||||
'daysFromHidingToDeleting': 30,
|
'daysFromHidingToDeleting': 30,
|
||||||
'daysFromUploadingToHiding': null,
|
'daysFromUploadingToHiding': null,
|
||||||
'fileNamePrefix': ''
|
'fileNamePrefix': '',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -144,7 +144,7 @@ class CloudflareApi extends RestApiMap {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await Future.wait(allCreateFutures);
|
await Future.wait(allCreateFutures);
|
||||||
} on DioError catch (e) {
|
} on DioException catch (e) {
|
||||||
print(e.message);
|
print(e.message);
|
||||||
rethrow;
|
rethrow;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ class DigitalOceanDnsApi extends RestApiMap {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await Future.wait(allCreateFutures);
|
await Future.wait(allCreateFutures);
|
||||||
} on DioError catch (e) {
|
} on DioException catch (e) {
|
||||||
print(e.message);
|
print(e.message);
|
||||||
rethrow;
|
rethrow;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -15,8 +15,8 @@ abstract class RestApiMap {
|
||||||
dio.interceptors.add(PrettyDioLogger());
|
dio.interceptors.add(PrettyDioLogger());
|
||||||
}
|
}
|
||||||
dio.interceptors.add(ConsoleInterceptor());
|
dio.interceptors.add(ConsoleInterceptor());
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).createHttpClient = () {
|
||||||
(final HttpClient client) {
|
final HttpClient client = HttpClient();
|
||||||
client.badCertificateCallback =
|
client.badCertificateCallback =
|
||||||
(final X509Certificate cert, final String host, final int port) =>
|
(final X509Certificate cert, final String host, final int port) =>
|
||||||
true;
|
true;
|
||||||
|
@ -25,7 +25,7 @@ abstract class RestApiMap {
|
||||||
|
|
||||||
dio.interceptors.add(
|
dio.interceptors.add(
|
||||||
InterceptorsWrapper(
|
InterceptorsWrapper(
|
||||||
onError: (final DioError e, final ErrorInterceptorHandler handler) {
|
onError: (final DioException e, final ErrorInterceptorHandler handler) {
|
||||||
print(e.requestOptions.path);
|
print(e.requestOptions.path);
|
||||||
print(e.requestOptions.data);
|
print(e.requestOptions.data);
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class ConsoleInterceptor extends InterceptorsWrapper {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onError(
|
Future<void> onError(
|
||||||
final DioError err,
|
final DioException err,
|
||||||
final ErrorInterceptorHandler handler,
|
final ErrorInterceptorHandler handler,
|
||||||
) async {
|
) async {
|
||||||
final Response? response = err.response;
|
final Response? response = err.response;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import 'package:selfprivacy/config/get_it_config.dart';
|
||||||
import 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
import 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
||||||
import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart';
|
import 'package:selfprivacy/logic/api_maps/rest_maps/rest_api_map.dart';
|
||||||
import 'package:selfprivacy/logic/api_maps/tls_options.dart';
|
import 'package:selfprivacy/logic/api_maps/tls_options.dart';
|
||||||
import 'package:selfprivacy/logic/models/disk_size.dart';
|
|
||||||
import 'package:selfprivacy/logic/models/hive/user.dart';
|
import 'package:selfprivacy/logic/models/hive/user.dart';
|
||||||
import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart';
|
import 'package:selfprivacy/logic/models/json/digital_ocean_server_info.dart';
|
||||||
import 'package:selfprivacy/utils/password_generator.dart';
|
import 'package:selfprivacy/utils/password_generator.dart';
|
||||||
|
|
|
@ -87,7 +87,7 @@ class HetznerApi extends RestApiMap {
|
||||||
final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false';
|
final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false';
|
||||||
Response? serverCreateResponse;
|
Response? serverCreateResponse;
|
||||||
HetznerServerInfo? serverInfo;
|
HetznerServerInfo? serverInfo;
|
||||||
DioError? hetznerError;
|
DioException? hetznerError;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
final Dio client = await getClient();
|
final Dio client = await getClient();
|
||||||
|
@ -117,7 +117,7 @@ class HetznerApi extends RestApiMap {
|
||||||
serverCreateResponse.data['server'],
|
serverCreateResponse.data['server'],
|
||||||
);
|
);
|
||||||
success = true;
|
success = true;
|
||||||
} on DioError catch (e) {
|
} on DioException catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
hetznerError = e;
|
hetznerError = e;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -402,7 +402,7 @@ class HetznerApi extends RestApiMap {
|
||||||
'labels': {'labelkey': 'value'},
|
'labels': {'labelkey': 'value'},
|
||||||
'location': region,
|
'location': region,
|
||||||
'automount': false,
|
'automount': false,
|
||||||
'format': 'ext4'
|
'format': 'ext4',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
volume = HetznerVolume.fromJson(createVolumeResponse.data['volume']);
|
volume = HetznerVolume.fromJson(createVolumeResponse.data['volume']);
|
||||||
|
@ -579,7 +579,7 @@ class HetznerApi extends RestApiMap {
|
||||||
final Map<String, dynamic> queryParameters = {
|
final Map<String, dynamic> queryParameters = {
|
||||||
'start': start.toUtc().toIso8601String(),
|
'start': start.toUtc().toIso8601String(),
|
||||||
'end': end.toUtc().toIso8601String(),
|
'end': end.toUtc().toIso8601String(),
|
||||||
'type': type
|
'type': type,
|
||||||
};
|
};
|
||||||
final Response res = await client.get(
|
final Response res = await client.get(
|
||||||
'/servers/$serverId/metrics',
|
'/servers/$serverId/metrics',
|
||||||
|
|
|
@ -26,7 +26,7 @@ abstract class ServerInstallationState extends Equatable {
|
||||||
serverDetails,
|
serverDetails,
|
||||||
isServerStarted,
|
isServerStarted,
|
||||||
isServerResetedFirstTime,
|
isServerResetedFirstTime,
|
||||||
installationDialoguePopUp
|
installationDialoguePopUp,
|
||||||
];
|
];
|
||||||
|
|
||||||
final String? providerApiToken;
|
final String? providerApiToken;
|
||||||
|
@ -317,7 +317,7 @@ class ServerInstallationRecovery extends ServerInstallationState {
|
||||||
isServerStarted,
|
isServerStarted,
|
||||||
isServerResetedFirstTime,
|
isServerResetedFirstTime,
|
||||||
currentStep,
|
currentStep,
|
||||||
installationDialoguePopUp
|
installationDialoguePopUp,
|
||||||
];
|
];
|
||||||
|
|
||||||
ServerInstallationRecovery copyWith({
|
ServerInstallationRecovery copyWith({
|
||||||
|
|
|
@ -90,7 +90,7 @@ class ServerJobsCubit
|
||||||
ServerJobsState(
|
ServerJobsState(
|
||||||
serverJobList: [
|
serverJobList: [
|
||||||
for (final ServerJob job in state.serverJobList)
|
for (final ServerJob job in state.serverJobList)
|
||||||
if (job.uid != uid) job
|
if (job.uid != uid) job,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -385,7 +385,7 @@ class CloudflareDnsProvider extends DnsProvider {
|
||||||
mx,
|
mx,
|
||||||
txt1,
|
txt1,
|
||||||
txt2,
|
txt2,
|
||||||
vpn
|
vpn,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,7 @@ class DesecDnsProvider extends DnsProvider {
|
||||||
mx,
|
mx,
|
||||||
txt1,
|
txt1,
|
||||||
txt2,
|
txt2,
|
||||||
vpn
|
vpn,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ class DigitalOceanDnsProvider extends DnsProvider {
|
||||||
mx,
|
mx,
|
||||||
txt1,
|
txt1,
|
||||||
txt2,
|
txt2,
|
||||||
vpn
|
vpn,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
end: Alignment.bottomRight,
|
end: Alignment.bottomRight,
|
||||||
colors: [
|
colors: [
|
||||||
Theme.of(context).colorScheme.primary,
|
Theme.of(context).colorScheme.primary,
|
||||||
Theme.of(context).colorScheme.secondary
|
Theme.of(context).colorScheme.secondary,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -110,7 +110,7 @@ class _ProgressBarState extends State<ProgressBar> {
|
||||||
style: progressTextStyleLight,
|
style: progressTextStyleLight,
|
||||||
children: [
|
children: [
|
||||||
TextSpan(text: '${index + 1}.', style: style),
|
TextSpan(text: '${index + 1}.', style: style),
|
||||||
TextSpan(text: step, style: style)
|
TextSpan(text: step, style: style),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -32,7 +32,7 @@ class EmptyPagePlaceholder extends StatelessWidget {
|
||||||
child: _expandedContent(context),
|
child: _expandedContent(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ class BackupDetailsPage extends StatelessWidget {
|
||||||
autobackupPeriod != null
|
autobackupPeriod != null
|
||||||
? 'backup.autobackup_period_subtitle'.tr(
|
? 'backup.autobackup_period_subtitle'.tr(
|
||||||
namedArgs: {
|
namedArgs: {
|
||||||
'period': autobackupPeriod.toPrettyString(context.locale)
|
'period': autobackupPeriod.toPrettyString(context.locale),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: 'backup.autobackup_period_never'.tr(),
|
: 'backup.autobackup_period_never'.tr(),
|
||||||
|
@ -337,7 +337,7 @@ class BackupDetailsPage extends StatelessWidget {
|
||||||
actionButtonOnPressed: () => {
|
actionButtonOnPressed: () => {
|
||||||
context.read<BackupsCubit>().forgetSnapshot(
|
context.read<BackupsCubit>().forgetSnapshot(
|
||||||
backup.id,
|
backup.id,
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -385,7 +385,7 @@ class BackupDetailsPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
context.pushRoute(BackupsListRoute(service: null)),
|
context.pushRoute(BackupsListRoute(service: null)),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
|
@ -39,68 +39,70 @@ class BackupsListPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
...backups.map((final Backup backup) {
|
...backups.map(
|
||||||
final service = context
|
(final Backup backup) {
|
||||||
.read<ServicesCubit>()
|
final service = context
|
||||||
.state
|
.read<ServicesCubit>()
|
||||||
.getServiceById(backup.serviceId);
|
.state
|
||||||
return ListTile(
|
.getServiceById(backup.serviceId);
|
||||||
onTap: preventActions
|
return ListTile(
|
||||||
? null
|
onTap: preventActions
|
||||||
: () {
|
? null
|
||||||
showModalBottomSheet(
|
: () {
|
||||||
useRootNavigator: true,
|
showModalBottomSheet(
|
||||||
context: context,
|
useRootNavigator: true,
|
||||||
isScrollControlled: true,
|
context: context,
|
||||||
builder: (final BuildContext context) =>
|
isScrollControlled: true,
|
||||||
DraggableScrollableSheet(
|
builder: (final BuildContext context) =>
|
||||||
expand: false,
|
DraggableScrollableSheet(
|
||||||
maxChildSize: 0.9,
|
expand: false,
|
||||||
minChildSize: 0.5,
|
maxChildSize: 0.9,
|
||||||
initialChildSize: 0.7,
|
minChildSize: 0.5,
|
||||||
builder: (final context, final scrollController) =>
|
initialChildSize: 0.7,
|
||||||
SnapshotModal(
|
builder: (final context, final scrollController) =>
|
||||||
snapshot: backup,
|
SnapshotModal(
|
||||||
scrollController: scrollController,
|
snapshot: backup,
|
||||||
|
scrollController: scrollController,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
onLongPress: preventActions
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
showPopUpAlert(
|
||||||
|
alertTitle: 'backup.forget_snapshot'.tr(),
|
||||||
|
description: 'backup.forget_snapshot_alert'.tr(),
|
||||||
|
actionButtonTitle: 'backup.forget_snapshot'.tr(),
|
||||||
|
actionButtonOnPressed: () => {
|
||||||
|
context.read<BackupsCubit>().forgetSnapshot(
|
||||||
|
backup.id,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
title: Text(
|
||||||
|
'${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}',
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
service?.displayName ?? backup.fallbackServiceName,
|
||||||
|
),
|
||||||
|
leading: service != null
|
||||||
|
? SvgPicture.string(
|
||||||
|
service.svgIcon,
|
||||||
|
height: 24,
|
||||||
|
width: 24,
|
||||||
|
colorFilter: ColorFilter.mode(
|
||||||
|
Theme.of(context).colorScheme.onBackground,
|
||||||
|
BlendMode.srcIn,
|
||||||
),
|
),
|
||||||
);
|
)
|
||||||
},
|
: const Icon(
|
||||||
onLongPress: preventActions
|
Icons.question_mark_outlined,
|
||||||
? null
|
|
||||||
: () {
|
|
||||||
showPopUpAlert(
|
|
||||||
alertTitle: 'backup.forget_snapshot'.tr(),
|
|
||||||
description: 'backup.forget_snapshot_alert'.tr(),
|
|
||||||
actionButtonTitle: 'backup.forget_snapshot'.tr(),
|
|
||||||
actionButtonOnPressed: () => {
|
|
||||||
context.read<BackupsCubit>().forgetSnapshot(
|
|
||||||
backup.id,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
title: Text(
|
|
||||||
'${MaterialLocalizations.of(context).formatShortDate(backup.time)} ${TimeOfDay.fromDateTime(backup.time).format(context)}',
|
|
||||||
),
|
|
||||||
subtitle: Text(
|
|
||||||
service?.displayName ?? backup.fallbackServiceName,
|
|
||||||
),
|
|
||||||
leading: service != null
|
|
||||||
? SvgPicture.string(
|
|
||||||
service.svgIcon,
|
|
||||||
height: 24,
|
|
||||||
width: 24,
|
|
||||||
colorFilter: ColorFilter.mode(
|
|
||||||
Theme.of(context).colorScheme.onBackground,
|
|
||||||
BlendMode.srcIn,
|
|
||||||
),
|
),
|
||||||
)
|
);
|
||||||
: const Icon(
|
},
|
||||||
Icons.question_mark_outlined,
|
),
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ class _SnapshotModalState extends State<SnapshotModal> {
|
||||||
isWarning: true,
|
isWarning: true,
|
||||||
text: 'backup.snapshot_modal_service_not_found'.tr(),
|
text: 'backup.snapshot_modal_service_not_found'.tr(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -62,7 +62,7 @@ class _AppSettingsPageState extends State<AppSettingsPage> {
|
||||||
),
|
),
|
||||||
const _ResetAppTile(),
|
const _ResetAppTile(),
|
||||||
// const Divider(height: 0),
|
// const Divider(height: 0),
|
||||||
_deleteServer(context)
|
_deleteServer(context),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ class MorePage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -113,7 +113,7 @@ class _Chart extends StatelessWidget {
|
||||||
titles: [
|
titles: [
|
||||||
'resource_chart.month'.tr(),
|
'resource_chart.month'.tr(),
|
||||||
'resource_chart.day'.tr(),
|
'resource_chart.day'.tr(),
|
||||||
'resource_chart.hour'.tr()
|
'resource_chart.hour'.tr(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
|
@ -65,7 +65,7 @@ class CpuChart extends StatelessWidget {
|
||||||
isCurved: false,
|
isCurved: false,
|
||||||
barWidth: 2,
|
barWidth: 2,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
dotData: FlDotData(
|
dotData: const FlDotData(
|
||||||
show: false,
|
show: false,
|
||||||
),
|
),
|
||||||
belowBarData: BarAreaData(
|
belowBarData: BarAreaData(
|
||||||
|
@ -86,7 +86,9 @@ class CpuChart extends StatelessWidget {
|
||||||
maxY: 100,
|
maxY: 100,
|
||||||
minX: 0,
|
minX: 0,
|
||||||
titlesData: FlTitlesData(
|
titlesData: FlTitlesData(
|
||||||
topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
topTitles: const AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
bottomTitles: AxisTitles(
|
bottomTitles: AxisTitles(
|
||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
interval: 40,
|
interval: 40,
|
||||||
|
@ -107,12 +109,12 @@ class CpuChart extends StatelessWidget {
|
||||||
showTitles: true,
|
showTitles: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
leftTitles: AxisTitles(
|
leftTitles: const AxisTitles(
|
||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
showTitles: false,
|
showTitles: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
rightTitles: AxisTitles(
|
rightTitles: const AxisTitles(
|
||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
showTitles: false,
|
showTitles: false,
|
||||||
),
|
),
|
||||||
|
|
|
@ -73,7 +73,7 @@ class NetworkChart extends StatelessWidget {
|
||||||
isCurved: false,
|
isCurved: false,
|
||||||
barWidth: 2,
|
barWidth: 2,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
dotData: FlDotData(
|
dotData: const FlDotData(
|
||||||
show: false,
|
show: false,
|
||||||
),
|
),
|
||||||
belowBarData: BarAreaData(
|
belowBarData: BarAreaData(
|
||||||
|
@ -94,7 +94,7 @@ class NetworkChart extends StatelessWidget {
|
||||||
isCurved: false,
|
isCurved: false,
|
||||||
barWidth: 2,
|
barWidth: 2,
|
||||||
color: Theme.of(context).colorScheme.tertiary,
|
color: Theme.of(context).colorScheme.tertiary,
|
||||||
dotData: FlDotData(
|
dotData: const FlDotData(
|
||||||
show: false,
|
show: false,
|
||||||
),
|
),
|
||||||
belowBarData: BarAreaData(
|
belowBarData: BarAreaData(
|
||||||
|
@ -113,12 +113,14 @@ class NetworkChart extends StatelessWidget {
|
||||||
minY: 0,
|
minY: 0,
|
||||||
maxY: [
|
maxY: [
|
||||||
...listData[0].map((final e) => e.value),
|
...listData[0].map((final e) => e.value),
|
||||||
...listData[1].map((final e) => e.value)
|
...listData[1].map((final e) => e.value),
|
||||||
].reduce(max) *
|
].reduce(max) *
|
||||||
1.2,
|
1.2,
|
||||||
minX: 0,
|
minX: 0,
|
||||||
titlesData: FlTitlesData(
|
titlesData: FlTitlesData(
|
||||||
topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
topTitles: const AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
bottomTitles: AxisTitles(
|
bottomTitles: AxisTitles(
|
||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
interval: 40,
|
interval: 40,
|
||||||
|
@ -139,7 +141,9 @@ class NetworkChart extends StatelessWidget {
|
||||||
showTitles: true,
|
showTitles: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
leftTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)),
|
leftTitles: const AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
rightTitles: AxisTitles(
|
rightTitles: AxisTitles(
|
||||||
sideTitles: SideTitles(
|
sideTitles: SideTitles(
|
||||||
reservedSize: 50,
|
reservedSize: 50,
|
||||||
|
@ -154,7 +158,7 @@ class NetworkChart extends StatelessWidget {
|
||||||
),
|
),
|
||||||
interval: [
|
interval: [
|
||||||
...listData[0].map((final e) => e.value),
|
...listData[0].map((final e) => e.value),
|
||||||
...listData[1].map((final e) => e.value)
|
...listData[1].map((final e) => e.value),
|
||||||
].reduce(max) *
|
].reduce(max) *
|
||||||
2 /
|
2 /
|
||||||
6.5,
|
6.5,
|
||||||
|
@ -168,7 +172,7 @@ class NetworkChart extends StatelessWidget {
|
||||||
verticalInterval: 40,
|
verticalInterval: 40,
|
||||||
horizontalInterval: [
|
horizontalInterval: [
|
||||||
...listData[0].map((final e) => e.value),
|
...listData[0].map((final e) => e.value),
|
||||||
...listData[1].map((final e) => e.value)
|
...listData[1].map((final e) => e.value),
|
||||||
].reduce(max) *
|
].reduce(max) *
|
||||||
2 /
|
2 /
|
||||||
6.5,
|
6.5,
|
||||||
|
|
|
@ -134,7 +134,7 @@ class _ServicePageState extends State<ServicePage> {
|
||||||
.read<ApiServerVolumeCubit>()
|
.read<ApiServerVolumeCubit>()
|
||||||
.state
|
.state
|
||||||
.getVolume(service.storageUsage.volume ?? '')
|
.getVolume(service.storageUsage.volume ?? '')
|
||||||
.displayName
|
.displayName,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
|
|
@ -69,7 +69,7 @@ class _ServicesPageState extends State<ServicesPage> {
|
||||||
),
|
),
|
||||||
child: _Card(service: service),
|
child: _Card(service: service),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -179,7 +179,7 @@ class _Card extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -49,7 +49,7 @@ class InitializingPage extends StatelessWidget {
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
() => _stepCheck(cubit),
|
() => _stepCheck(cubit),
|
||||||
() => _stepCheck(cubit)
|
() => _stepCheck(cubit),
|
||||||
][cubit.state.progress.index]();
|
][cubit.state.progress.index]();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ class InitializingPage extends StatelessWidget {
|
||||||
.replace(const RecoveryRoute());
|
.replace(const RecoveryRoute());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -517,7 +517,7 @@ class InitializingPage extends StatelessWidget {
|
||||||
BrandTimer(
|
BrandTimer(
|
||||||
startDateTime: state.timerStart!,
|
startDateTime: state.timerStart!,
|
||||||
duration: state.duration!,
|
duration: state.duration!,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (state.isLoading)
|
if (state.isLoading)
|
||||||
|
|
|
@ -25,7 +25,7 @@ class RecoverByNewDeviceKeyInstruction extends StatelessWidget {
|
||||||
child: Text('recovering.method_device_button'.tr()),
|
child: Text('recovering.method_device_button'.tr()),
|
||||||
onPressed: () => Navigator.of(context)
|
onPressed: () => Navigator.of(context)
|
||||||
.push(materialRoute(const RecoverByNewDeviceKeyInput())),
|
.push(materialRoute(const RecoverByNewDeviceKeyInput())),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class RecoverByNewDeviceKeyInput extends StatelessWidget {
|
||||||
: () =>
|
: () =>
|
||||||
context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
||||||
child: Text('basis.continue'.tr()),
|
child: Text('basis.continue'.tr()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,7 +41,7 @@ class RecoverByOldTokenInstruction extends StatelessWidget {
|
||||||
onPressed: () => context
|
onPressed: () => context
|
||||||
.read<ServerInstallationCubit>()
|
.read<ServerInstallationCubit>()
|
||||||
.selectRecoveryMethod(ServerRecoveryMethods.oldToken),
|
.selectRecoveryMethod(ServerRecoveryMethods.oldToken),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -90,7 +90,7 @@ class RecoverByOldToken extends StatelessWidget {
|
||||||
? null
|
? null
|
||||||
: () => context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
: () => context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
||||||
child: Text('basis.continue'.tr()),
|
child: Text('basis.continue'.tr()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,7 +50,7 @@ class RecoverByRecoveryKey extends StatelessWidget {
|
||||||
? null
|
? null
|
||||||
: () => context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
: () => context.read<RecoveryDeviceFormCubit>().trySubmit(),
|
||||||
child: Text('basis.continue'.tr()),
|
child: Text('basis.continue'.tr()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -81,7 +81,7 @@ class _RecoveryConfirmServerState extends State<RecoveryConfirmServer> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class RecoveryMethodSelect extends StatelessWidget {
|
||||||
title: 'recovering.method_select_nothing'.tr(),
|
title: 'recovering.method_select_nothing'.tr(),
|
||||||
onPressed: () => Navigator.of(context)
|
onPressed: () => Navigator.of(context)
|
||||||
.push(materialRoute(const RecoveryFallbackMethodSelect())),
|
.push(materialRoute(const RecoveryFallbackMethodSelect())),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ class SelectDomainToRecover extends StatelessWidget {
|
||||||
: () =>
|
: () =>
|
||||||
context.read<RecoveryDomainFormCubit>().trySubmit(),
|
context.read<RecoveryDomainFormCubit>().trySubmit(),
|
||||||
child: Text('basis.continue'.tr()),
|
child: Text('basis.continue'.tr()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,7 +23,7 @@ class RecoveryServerProviderConnected extends StatelessWidget {
|
||||||
heroTitle: 'recovering.provider_connected'.tr(
|
heroTitle: 'recovering.provider_connected'.tr(
|
||||||
args: [
|
args: [
|
||||||
appConfig.state.serverDetails?.provider.displayName ??
|
appConfig.state.serverDetails?.provider.displayName ??
|
||||||
'Server Provider'
|
'Server Provider',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
heroSubtitle: 'recovering.provider_connected_description'.tr(
|
heroSubtitle: 'recovering.provider_connected_description'.tr(
|
||||||
|
@ -45,7 +45,7 @@ class RecoveryServerProviderConnected extends StatelessWidget {
|
||||||
labelText: 'recovering.provider_connected_placeholder'.tr(
|
labelText: 'recovering.provider_connected_placeholder'.tr(
|
||||||
args: [
|
args: [
|
||||||
appConfig.state.serverDetails?.provider.displayName ??
|
appConfig.state.serverDetails?.provider.displayName ??
|
||||||
'Server Provider'
|
'Server Provider',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -124,7 +124,7 @@ class _DeleteUserTile extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
leading: const Icon(Icons.person_remove_outlined),
|
leading: const Icon(Icons.person_remove_outlined),
|
||||||
title: Text(
|
title: Text(
|
||||||
|
|
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||||
const Set<TargetPlatform> _desktop = <TargetPlatform>{
|
const Set<TargetPlatform> _desktop = <TargetPlatform>{
|
||||||
TargetPlatform.linux,
|
TargetPlatform.linux,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.macOS,
|
||||||
TargetPlatform.windows
|
TargetPlatform.windows,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Set<TargetPlatform> _mobile = <TargetPlatform>{
|
const Set<TargetPlatform> _mobile = <TargetPlatform>{
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
extension TextExtension on Text {
|
|
||||||
Text withColor(final Color color) => Text(
|
|
||||||
data!,
|
|
||||||
key: key,
|
|
||||||
strutStyle: strutStyle,
|
|
||||||
textAlign: textAlign,
|
|
||||||
textDirection: textDirection,
|
|
||||||
locale: locale,
|
|
||||||
softWrap: softWrap,
|
|
||||||
overflow: overflow,
|
|
||||||
textScaleFactor: textScaleFactor,
|
|
||||||
maxLines: maxLines,
|
|
||||||
semanticsLabel: semanticsLabel,
|
|
||||||
textWidthBasis: textWidthBasis ?? textWidthBasis,
|
|
||||||
style: style != null
|
|
||||||
? style!.copyWith(color: color)
|
|
||||||
: TextStyle(color: color),
|
|
||||||
);
|
|
||||||
|
|
||||||
Text copyWith({
|
|
||||||
final Key? key,
|
|
||||||
final StrutStyle? strutStyle,
|
|
||||||
final TextAlign? textAlign,
|
|
||||||
final TextDirection? textDirection,
|
|
||||||
final Locale? locale,
|
|
||||||
final bool? softWrap,
|
|
||||||
final TextOverflow? overflow,
|
|
||||||
final double? textScaleFactor,
|
|
||||||
final int? maxLines,
|
|
||||||
final String? semanticsLabel,
|
|
||||||
final TextWidthBasis? textWidthBasis,
|
|
||||||
final TextStyle? style,
|
|
||||||
}) =>
|
|
||||||
Text(
|
|
||||||
data!,
|
|
||||||
key: key ?? this.key,
|
|
||||||
strutStyle: strutStyle ?? this.strutStyle,
|
|
||||||
textAlign: textAlign ?? this.textAlign,
|
|
||||||
textDirection: textDirection ?? this.textDirection,
|
|
||||||
locale: locale ?? this.locale,
|
|
||||||
softWrap: softWrap ?? this.softWrap,
|
|
||||||
overflow: overflow ?? this.overflow,
|
|
||||||
textScaleFactor: textScaleFactor ?? this.textScaleFactor,
|
|
||||||
maxLines: maxLines ?? this.maxLines,
|
|
||||||
semanticsLabel: semanticsLabel ?? this.semanticsLabel,
|
|
||||||
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
|
|
||||||
style: style != null ? this.style?.merge(style) ?? style : this.style,
|
|
||||||
);
|
|
||||||
}
|
|
54
pubspec.lock
54
pubspec.lock
|
@ -197,10 +197,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.1"
|
version: "1.18.0"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -697,10 +697,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: intl
|
name: intl
|
||||||
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
|
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.18.0"
|
version: "0.18.1"
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -817,26 +817,26 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.15"
|
version: "0.12.16"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.5.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.10.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1198,26 +1198,26 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.1"
|
version: "1.10.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.11.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
stream_transform:
|
stream_transform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1246,26 +1246,26 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test
|
name: test
|
||||||
sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4"
|
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.24.1"
|
version: "1.24.9"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.1"
|
version: "0.6.1"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93"
|
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.1"
|
version: "0.5.9"
|
||||||
timezone:
|
timezone:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1410,6 +1410,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.2"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.0"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1467,5 +1475,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "3.1.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.0.2 <4.0.0"
|
dart: ">=3.2.0-194.0.dev <4.0.0"
|
||||||
flutter: ">=3.10.2"
|
flutter: ">=3.10.2"
|
||||||
|
|
|
@ -39,7 +39,7 @@ dependencies:
|
||||||
ionicons: ^0.2.2
|
ionicons: ^0.2.2
|
||||||
json_annotation: ^4.8.1
|
json_annotation: ^4.8.1
|
||||||
local_auth: ^2.1.6
|
local_auth: ^2.1.6
|
||||||
material_color_utilities: ^0.2.0
|
material_color_utilities: ^0.5.0
|
||||||
modal_bottom_sheet: ^3.0.0-pre
|
modal_bottom_sheet: ^3.0.0-pre
|
||||||
nanoid: ^1.0.0
|
nanoid: ^1.0.0
|
||||||
package_info: ^2.0.2
|
package_info: ^2.0.2
|
||||||
|
|
Loading…
Reference in a new issue