diff --git a/lib/ui/components/one_page/one_page.dart b/lib/ui/components/one_page/one_page.dart deleted file mode 100644 index d16dd5f3..00000000 --- a/lib/ui/components/one_page/one_page.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; -import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; -import 'package:easy_localization/easy_localization.dart'; -import 'package:selfprivacy/ui/components/pre_styled_buttons/pre_styled_buttons.dart'; - -class OnePage extends StatelessWidget { - const OnePage({ - required this.title, - required this.child, - final super.key, - }); - - final String title; - final Widget child; - - @override - Widget build(final BuildContext context) => Scaffold( - appBar: PreferredSize( - preferredSize: const Size.fromHeight(52), - child: Column( - children: [ - Container( - height: 51, - alignment: Alignment.center, - padding: const EdgeInsets.symmetric(horizontal: 15), - child: BrandText.h4('basis.details'.tr()), - ), - const BrandDivider(), - ], - ), - ), - body: child, - bottomNavigationBar: SafeArea( - child: Container( - decoration: BoxDecoration(boxShadow: kElevationToShadow[3]), - height: kBottomNavigationBarHeight, - child: Container( - color: Theme.of(context).scaffoldBackgroundColor, - alignment: Alignment.center, - child: PreStyledButtons.close( - onPress: () => Navigator.of(context).pop(), - ), - ), - ), - ), - ); -} diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index 862815c1..8c2cf506 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/cubit/app_settings/app_settings_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; @@ -38,15 +37,9 @@ class _AppSettingsPageState extends State { body: ListView( padding: paddingH15V0, children: [ - const BrandDivider(), + const Divider(height: 1), Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: - BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -68,14 +61,9 @@ class _AppSettingsPageState extends State { ], ), ), + const Divider(height: 0), Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: - BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -127,7 +115,8 @@ class _AppSettingsPageState extends State { ], ), ), - deleteServer(context) + const Divider(height: 0), + _DeleteServer(context) ], ), ), @@ -135,16 +124,11 @@ class _AppSettingsPageState extends State { ); } - Widget deleteServer(final BuildContext context) { + Widget _DeleteServer(final BuildContext context) { final bool isDisabled = context.watch().state.serverDetails == null; return Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, diff --git a/lib/ui/pages/more/console/console.dart b/lib/ui/pages/more/console/console.dart index 76703444..e3951013 100644 --- a/lib/ui/pages/more/console/console.dart +++ b/lib/ui/pages/more/console/console.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_colors.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/models/message.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; class Console extends StatefulWidget { @@ -37,8 +36,7 @@ class _ConsoleState extends State { preferredSize: const Size.fromHeight(53), child: Column( children: const [ - BrandHeader(title: 'Console', hasBackButton: true), - BrandDivider(), + BrandHeader(title: 'Console', hasBackButton: true) ], ), ), diff --git a/lib/ui/pages/more/info/info.dart b/lib/ui/pages/more/info/info.dart index ac0419fc..8d2526d6 100644 --- a/lib/ui/pages/more/info/info.dart +++ b/lib/ui/pages/more/info/info.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/api_maps/graphql_maps/server_api/server.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:package_info/package_info.dart'; @@ -21,7 +20,6 @@ class InfoPage extends StatelessWidget { body: ListView( padding: paddingH15V0, children: [ - const BrandDivider(), const SizedBox(height: 10), FutureBuilder( future: _packageVersion(), diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 1f442220..38edcc63 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -8,7 +8,6 @@ import 'package:selfprivacy/logic/cubit/hetzner_metrics/hetzner_metrics_cubit.da import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; @@ -78,7 +77,6 @@ class _ServerDetailsScreenState extends State padding: const EdgeInsets.symmetric(horizontal: 15), child: BrandText.h4('basis.details'.tr()), ), - const BrandDivider(), ], ), ), diff --git a/lib/ui/pages/server_details/server_settings.dart b/lib/ui/pages/server_details/server_settings.dart index 418014c2..a5c98ff3 100644 --- a/lib/ui/pages/server_details/server_settings.dart +++ b/lib/ui/pages/server_details/server_settings.dart @@ -34,7 +34,6 @@ class _ServerSettings extends StatelessWidget { ], ), ), - const BrandDivider(), SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.enable, @@ -43,6 +42,7 @@ class _ServerSettings extends StatelessWidget { value: 'providers.server.settings.allow_autoupgrade_hint'.tr(), ), ), + const Divider(height: 0), SwitcherBlock( onChange: (final _) {}, isActive: serverDetailsState.autoUpgradeSettings.allowReboot, @@ -51,6 +51,7 @@ class _ServerSettings extends StatelessWidget { value: 'providers.server.settings.reboot_after_upgrade_hint'.tr(), ), ), + const Divider(height: 0), _Button( onTap: () { Navigator.of(context).push(materialRoute(const SelectTimezone())); @@ -78,12 +79,7 @@ class _Button extends StatelessWidget { Widget build(final BuildContext context) => InkWell( onTap: onTap, child: Container( - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide(width: 1, color: BrandColors.dividerColor), - ), - ), + padding: const EdgeInsets.symmetric(vertical: 16), child: child, ), );