mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
fix: Black bars on top of pages
This commit is contained in:
parent
da073b7454
commit
39babdeeaa
|
@ -44,30 +44,28 @@ class _ConsolePageState extends State<ConsolePage> {
|
||||||
Widget build(final BuildContext context) {
|
Widget build(final BuildContext context) {
|
||||||
final List<ConsoleLog> logs = console.logs;
|
final List<ConsoleLog> logs = console.logs;
|
||||||
|
|
||||||
return SafeArea(
|
return Scaffold(
|
||||||
child: Scaffold(
|
appBar: AppBar(
|
||||||
appBar: AppBar(
|
title: Text('console_page.title'.tr()),
|
||||||
title: Text('console_page.title'.tr()),
|
leading: IconButton(
|
||||||
leading: IconButton(
|
icon: const Icon(Icons.arrow_back),
|
||||||
icon: const Icon(Icons.arrow_back),
|
onPressed: () => Navigator.of(context).maybePop(),
|
||||||
onPressed: () => Navigator.of(context).maybePop(),
|
),
|
||||||
),
|
actions: [
|
||||||
actions: [
|
IconButton(
|
||||||
IconButton(
|
icon: Icon(
|
||||||
icon: Icon(
|
console.paused
|
||||||
console.paused
|
? Icons.play_arrow_outlined
|
||||||
? Icons.play_arrow_outlined
|
: Icons.pause_outlined,
|
||||||
: Icons.pause_outlined,
|
|
||||||
),
|
|
||||||
onPressed: console.paused ? console.play : console.pause,
|
|
||||||
),
|
),
|
||||||
],
|
onPressed: console.paused ? console.play : console.pause,
|
||||||
),
|
),
|
||||||
body: Scrollbar(
|
],
|
||||||
child: logs.isEmpty
|
),
|
||||||
? const _ConsoleViewEmpty()
|
body: Scrollbar(
|
||||||
: _ConsoleViewLoaded(logs: logs),
|
child: logs.isEmpty
|
||||||
),
|
? const _ConsoleViewEmpty()
|
||||||
|
: _ConsoleViewLoaded(logs: logs),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,10 +105,10 @@ class _ServicesMigrationPageState extends State<ServicesMigrationPage> {
|
||||||
listItemHeight * widget.diskStatus.diskVolumes.length +
|
listItemHeight * widget.diskStatus.diskVolumes.length +
|
||||||
headerVerticalPadding * widget.diskStatus.diskVolumes.length,
|
headerVerticalPadding * widget.diskStatus.diskVolumes.length,
|
||||||
);
|
);
|
||||||
return SafeArea(
|
return Scaffold(
|
||||||
child: Scaffold(
|
appBar: PreferredSize(
|
||||||
appBar: PreferredSize(
|
preferredSize: appBarHeight,
|
||||||
preferredSize: appBarHeight,
|
child: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
BrandHeader(
|
BrandHeader(
|
||||||
|
@ -143,74 +143,74 @@ class _ServicesMigrationPageState extends State<ServicesMigrationPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: ListView(
|
),
|
||||||
padding: const EdgeInsets.all(16.0),
|
body: ListView(
|
||||||
children: <Widget>[
|
padding: const EdgeInsets.all(16.0),
|
||||||
if (widget.services.isEmpty)
|
children: <Widget>[
|
||||||
const Center(child: CircularProgressIndicator.adaptive()),
|
if (widget.services.isEmpty)
|
||||||
...widget.services.map(
|
const Center(child: CircularProgressIndicator.adaptive()),
|
||||||
(final service) => Column(
|
...widget.services.map(
|
||||||
children: [
|
(final service) => Column(
|
||||||
const SizedBox(height: 8),
|
children: [
|
||||||
ServiceMigrationListItem(
|
const SizedBox(height: 8),
|
||||||
service: service,
|
ServiceMigrationListItem(
|
||||||
diskStatus: widget.diskStatus,
|
service: service,
|
||||||
selectedVolume: serviceToDisk[service.id]!,
|
diskStatus: widget.diskStatus,
|
||||||
onChange: onChange,
|
selectedVolume: serviceToDisk[service.id]!,
|
||||||
),
|
onChange: onChange,
|
||||||
const SizedBox(height: 4),
|
),
|
||||||
const Divider(),
|
const SizedBox(height: 4),
|
||||||
],
|
const Divider(),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.all(8.0),
|
Padding(
|
||||||
child: InfoBox(
|
padding: const EdgeInsets.all(8.0),
|
||||||
text: 'storage.data_migration_notice'.tr(),
|
child: InfoBox(
|
||||||
isWarning: true,
|
text: 'storage.data_migration_notice'.tr(),
|
||||||
),
|
isWarning: true,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
),
|
||||||
if (widget.isMigration || (!widget.isMigration && isVolumePicked))
|
const SizedBox(height: 16),
|
||||||
BrandButton.filled(
|
if (widget.isMigration || (!widget.isMigration && isVolumePicked))
|
||||||
child: Text('storage.start_migration_button'.tr()),
|
BrandButton.filled(
|
||||||
onPressed: () {
|
child: Text('storage.start_migration_button'.tr()),
|
||||||
if (widget.isMigration) {
|
onPressed: () {
|
||||||
context.read<ServerJobsBloc>().migrateToBinds(
|
if (widget.isMigration) {
|
||||||
serviceToDisk,
|
context.read<ServerJobsBloc>().migrateToBinds(
|
||||||
);
|
serviceToDisk,
|
||||||
} else {
|
);
|
||||||
for (final service in widget.services) {
|
} else {
|
||||||
if (serviceToDisk[service.id] != null) {
|
for (final service in widget.services) {
|
||||||
context.read<ServicesBloc>().add(
|
if (serviceToDisk[service.id] != null) {
|
||||||
ServiceMove(
|
context.read<ServicesBloc>().add(
|
||||||
service,
|
ServiceMove(
|
||||||
serviceToDisk[service.id]!,
|
service,
|
||||||
),
|
serviceToDisk[service.id]!,
|
||||||
);
|
),
|
||||||
}
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
context.router.popUntilRoot();
|
}
|
||||||
showModalBottomSheet(
|
context.router.popUntilRoot();
|
||||||
context: context,
|
showModalBottomSheet(
|
||||||
useRootNavigator: true,
|
context: context,
|
||||||
isScrollControlled: true,
|
useRootNavigator: true,
|
||||||
builder: (final BuildContext context) =>
|
isScrollControlled: true,
|
||||||
DraggableScrollableSheet(
|
builder: (final BuildContext context) =>
|
||||||
expand: false,
|
DraggableScrollableSheet(
|
||||||
maxChildSize: 0.9,
|
expand: false,
|
||||||
minChildSize: 0.4,
|
maxChildSize: 0.9,
|
||||||
initialChildSize: 0.6,
|
minChildSize: 0.4,
|
||||||
builder: (final context, final scrollController) =>
|
initialChildSize: 0.6,
|
||||||
JobsContent(controller: scrollController),
|
builder: (final context, final scrollController) =>
|
||||||
),
|
JobsContent(controller: scrollController),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
const SizedBox(height: 32),
|
),
|
||||||
],
|
const SizedBox(height: 32),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue