mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-02 22:24:18 +00:00
feat(ui): Make Snapshot List page show fab button
- Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/290
This commit is contained in:
commit
5a33bec6bd
|
@ -103,7 +103,7 @@ class BackblazeApi extends RestApiMap {
|
|||
} else {
|
||||
throw Exception('code: ${response.statusCode}');
|
||||
}
|
||||
} on DioException catch (e) {
|
||||
} on DioError catch (e) {
|
||||
print(e);
|
||||
return GenericResult(
|
||||
data: false,
|
||||
|
|
|
@ -144,7 +144,7 @@ class CloudflareApi extends RestApiMap {
|
|||
);
|
||||
}
|
||||
await Future.wait(allCreateFutures);
|
||||
} on DioException catch (e) {
|
||||
} on DioError catch (e) {
|
||||
print(e.message);
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
|
|
|
@ -133,7 +133,7 @@ class DigitalOceanDnsApi extends RestApiMap {
|
|||
);
|
||||
}
|
||||
await Future.wait(allCreateFutures);
|
||||
} on DioException catch (e) {
|
||||
} on DioError catch (e) {
|
||||
print(e.message);
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
|
|
|
@ -15,8 +15,8 @@ abstract class RestApiMap {
|
|||
dio.interceptors.add(PrettyDioLogger());
|
||||
}
|
||||
dio.interceptors.add(ConsoleInterceptor());
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).createHttpClient = () {
|
||||
final HttpClient client = HttpClient();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(final HttpClient client) {
|
||||
client.badCertificateCallback =
|
||||
(final X509Certificate cert, final String host, final int port) =>
|
||||
true;
|
||||
|
@ -25,7 +25,7 @@ abstract class RestApiMap {
|
|||
|
||||
dio.interceptors.add(
|
||||
InterceptorsWrapper(
|
||||
onError: (final DioException e, final ErrorInterceptorHandler handler) {
|
||||
onError: (final DioError e, final ErrorInterceptorHandler handler) {
|
||||
print(e.requestOptions.path);
|
||||
print(e.requestOptions.data);
|
||||
|
||||
|
@ -96,7 +96,7 @@ class ConsoleInterceptor extends InterceptorsWrapper {
|
|||
|
||||
@override
|
||||
Future<void> onError(
|
||||
final DioException err,
|
||||
final DioError err,
|
||||
final ErrorInterceptorHandler handler,
|
||||
) async {
|
||||
final Response? response = err.response;
|
||||
|
|
|
@ -87,7 +87,7 @@ class HetznerApi extends RestApiMap {
|
|||
final String stagingAcme = TlsOptions.stagingAcme ? 'true' : 'false';
|
||||
Response? serverCreateResponse;
|
||||
HetznerServerInfo? serverInfo;
|
||||
DioException? hetznerError;
|
||||
DioError? hetznerError;
|
||||
bool success = false;
|
||||
|
||||
final Dio client = await getClient();
|
||||
|
@ -117,7 +117,7 @@ class HetznerApi extends RestApiMap {
|
|||
serverCreateResponse.data['server'],
|
||||
);
|
||||
success = true;
|
||||
} on DioException catch (e) {
|
||||
} on DioError catch (e) {
|
||||
print(e);
|
||||
hetznerError = e;
|
||||
} catch (e) {
|
||||
|
|
|
@ -31,6 +31,7 @@ class BackupsListPage extends StatelessWidget {
|
|||
context.watch<BackupsCubit>().state.preventActions;
|
||||
return BrandHeroScreen(
|
||||
heroTitle: 'backup.snapshots_title'.tr(),
|
||||
hasFlashButton: true,
|
||||
children: [
|
||||
if (backups.isEmpty)
|
||||
Center(
|
||||
|
|
|
@ -65,7 +65,7 @@ class CpuChart extends StatelessWidget {
|
|||
isCurved: false,
|
||||
barWidth: 2,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
dotData: const FlDotData(
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
|
@ -86,7 +86,7 @@ class CpuChart extends StatelessWidget {
|
|||
maxY: 100,
|
||||
minX: 0,
|
||||
titlesData: FlTitlesData(
|
||||
topTitles: const AxisTitles(
|
||||
topTitles: AxisTitles(
|
||||
sideTitles: SideTitles(showTitles: false),
|
||||
),
|
||||
bottomTitles: AxisTitles(
|
||||
|
@ -109,12 +109,12 @@ class CpuChart extends StatelessWidget {
|
|||
showTitles: true,
|
||||
),
|
||||
),
|
||||
leftTitles: const AxisTitles(
|
||||
leftTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
showTitles: false,
|
||||
),
|
||||
),
|
||||
rightTitles: const AxisTitles(
|
||||
rightTitles: AxisTitles(
|
||||
sideTitles: SideTitles(
|
||||
showTitles: false,
|
||||
),
|
||||
|
|
|
@ -73,7 +73,7 @@ class NetworkChart extends StatelessWidget {
|
|||
isCurved: false,
|
||||
barWidth: 2,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
dotData: const FlDotData(
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
|
@ -94,7 +94,7 @@ class NetworkChart extends StatelessWidget {
|
|||
isCurved: false,
|
||||
barWidth: 2,
|
||||
color: Theme.of(context).colorScheme.tertiary,
|
||||
dotData: const FlDotData(
|
||||
dotData: FlDotData(
|
||||
show: false,
|
||||
),
|
||||
belowBarData: BarAreaData(
|
||||
|
@ -118,7 +118,7 @@ class NetworkChart extends StatelessWidget {
|
|||
1.2,
|
||||
minX: 0,
|
||||
titlesData: FlTitlesData(
|
||||
topTitles: const AxisTitles(
|
||||
topTitles: AxisTitles(
|
||||
sideTitles: SideTitles(showTitles: false),
|
||||
),
|
||||
bottomTitles: AxisTitles(
|
||||
|
@ -141,7 +141,7 @@ class NetworkChart extends StatelessWidget {
|
|||
showTitles: true,
|
||||
),
|
||||
),
|
||||
leftTitles: const AxisTitles(
|
||||
leftTitles: AxisTitles(
|
||||
sideTitles: SideTitles(showTitles: false),
|
||||
),
|
||||
rightTitles: AxisTitles(
|
||||
|
|
Loading…
Reference in a new issue