mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-27 11:16:45 +00:00
refactor(ui): Remove brand alert dialogs and bottom sheet
This commit is contained in:
parent
f5313a8148
commit
d242f5141e
|
@ -1,13 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class BrandAlert extends AlertDialog {
|
||||
BrandAlert({
|
||||
super.key,
|
||||
final String? title,
|
||||
final String? contentText,
|
||||
super.actions,
|
||||
}) : super(
|
||||
title: title != null ? Text(title) : null,
|
||||
content: title != null ? Text(contentText!) : null,
|
||||
);
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class BrandBottomSheet extends StatelessWidget {
|
||||
const BrandBottomSheet({
|
||||
required this.child,
|
||||
super.key,
|
||||
this.isExpended = false,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final bool isExpended;
|
||||
|
||||
@override
|
||||
Widget build(final BuildContext context) {
|
||||
final double mainHeight = MediaQuery.of(context).size.height -
|
||||
MediaQuery.of(context).padding.top -
|
||||
300;
|
||||
late Widget innerWidget;
|
||||
if (isExpended) {
|
||||
innerWidget = Scaffold(
|
||||
body: child,
|
||||
);
|
||||
} else {
|
||||
final ThemeData themeData = Theme.of(context);
|
||||
|
||||
innerWidget = Material(
|
||||
color: themeData.scaffoldBackgroundColor,
|
||||
child: IntrinsicHeight(child: child),
|
||||
);
|
||||
}
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
height: 4,
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
color: const Color(0xFFDDDDDD),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(20)),
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxHeight: mainHeight),
|
||||
child: innerWidget,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -3,9 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:ionicons/ionicons.dart';
|
||||
import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart';
|
||||
import 'package:selfprivacy/ui/helpers/modals.dart';
|
||||
|
||||
class BrandFab extends StatefulWidget {
|
||||
const BrandFab({
|
||||
|
@ -62,12 +60,9 @@ class _BrandFabState extends State<BrandFab>
|
|||
child: FloatingActionButton(
|
||||
onPressed: () {
|
||||
// TODO: Make a hero animation to the screen
|
||||
showBrandBottomSheet(
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (final BuildContext context) => const BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: JobsContent(),
|
||||
),
|
||||
builder: (final BuildContext context) => const JobsContent(),
|
||||
);
|
||||
},
|
||||
isExtended: widget.extended,
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/config/get_it_config.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart';
|
||||
|
||||
Future<T?> showBrandBottomSheet<T>({
|
||||
required final BuildContext context,
|
||||
required final WidgetBuilder builder,
|
||||
}) =>
|
||||
showCupertinoModalBottomSheet<T>(
|
||||
builder: builder,
|
||||
barrierColor: Colors.black45,
|
||||
context: context,
|
||||
shadow: const BoxShadow(color: Colors.transparent),
|
||||
backgroundColor: Colors.transparent,
|
||||
);
|
||||
|
||||
void showPopUpAlert({
|
||||
required final String description,
|
||||
|
@ -26,9 +12,9 @@ void showPopUpAlert({
|
|||
final String? cancelButtonTitle,
|
||||
}) {
|
||||
getIt.get<NavigationService>().showPopUpDialog(
|
||||
BrandAlert(
|
||||
title: alertTitle ?? 'basis.alert'.tr(),
|
||||
contentText: description,
|
||||
AlertDialog(
|
||||
title: Text(alertTitle ?? 'basis.alert'.tr()),
|
||||
content: Text(description),
|
||||
actions: [
|
||||
DialogActionButton(
|
||||
text: actionButtonTitle,
|
||||
|
|
|
@ -2,9 +2,7 @@ import 'package:auto_route/auto_route.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:ionicons/ionicons.dart';
|
||||
import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart';
|
||||
import 'package:selfprivacy/ui/helpers/modals.dart';
|
||||
import 'package:selfprivacy/ui/helpers/widget_size.dart';
|
||||
import 'package:selfprivacy/utils/breakpoints.dart';
|
||||
|
||||
|
@ -127,13 +125,10 @@ class _HeroSliverAppBarState extends State<HeroSliverAppBar> {
|
|||
duration: const Duration(milliseconds: 300),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
showBrandBottomSheet(
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (final BuildContext context) =>
|
||||
const BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: JobsContent(),
|
||||
),
|
||||
const JobsContent(),
|
||||
);
|
||||
},
|
||||
icon: Icon(
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
|
|||
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/buttons/dialog_action_button.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart';
|
||||
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
|
@ -82,9 +81,9 @@ class _AppSettingsPageState extends State<AppSettingsPage> {
|
|||
: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (final _) => BrandAlert(
|
||||
title: 'modals.are_you_sure'.tr(),
|
||||
contentText: 'modals.delete_server_volume'.tr(),
|
||||
builder: (final _) => AlertDialog(
|
||||
title: Text('modals.are_you_sure'.tr()),
|
||||
content: Text('modals.delete_server_volume'.tr()),
|
||||
actions: [
|
||||
DialogActionButton(
|
||||
text: 'modals.yes'.tr(),
|
||||
|
@ -129,9 +128,9 @@ class _ResetAppTile extends StatelessWidget {
|
|||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (final _) => BrandAlert(
|
||||
title: 'modals.are_you_sure'.tr(),
|
||||
contentText: 'modals.purge_all_keys'.tr(),
|
||||
builder: (final _) => AlertDialog(
|
||||
title: Text('modals.are_you_sure'.tr()),
|
||||
content: Text('modals.purge_all_keys'.tr()),
|
||||
actions: [
|
||||
DialogActionButton(
|
||||
text: 'modals.purge_all_keys_confirm'.tr(),
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'package:selfprivacy/logic/cubit/server_jobs/server_jobs_cubit.dart';
|
|||
import 'package:selfprivacy/logic/cubit/services/services_cubit.dart';
|
||||
import 'package:selfprivacy/logic/models/disk_size.dart';
|
||||
import 'package:selfprivacy/logic/models/service.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_header/brand_header.dart';
|
||||
import 'package:selfprivacy/ui/components/info_box/info_box.dart';
|
||||
|
@ -13,7 +12,6 @@ import 'package:selfprivacy/logic/models/disk_status.dart';
|
|||
import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart';
|
||||
import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart';
|
||||
import 'package:selfprivacy/ui/components/storage_list_items/service_migration_list_item.dart';
|
||||
import 'package:selfprivacy/ui/helpers/modals.dart';
|
||||
import 'package:selfprivacy/ui/pages/root_route.dart';
|
||||
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||
|
||||
|
@ -182,13 +180,10 @@ class _ServicesMigrationPageState extends State<ServicesMigrationPage> {
|
|||
materialRoute(const RootPage()),
|
||||
(final predicate) => false,
|
||||
);
|
||||
showBrandBottomSheet(
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (final BuildContext context) =>
|
||||
const BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: JobsContent(),
|
||||
),
|
||||
const JobsContent(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:selfprivacy/config/brand_theme.dart';
|
||||
import 'package:selfprivacy/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart';
|
||||
import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_md/brand_md.dart';
|
||||
|
@ -62,9 +61,7 @@ class RecoveryConfirmBackblaze extends StatelessWidget {
|
|||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (final BuildContext context) => BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: Padding(
|
||||
builder: (final BuildContext context) => Padding(
|
||||
padding: paddingH15V0,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
|
@ -73,7 +70,6 @@ class RecoveryConfirmBackblaze extends StatelessWidget {
|
|||
fileName: 'how_backblaze',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:selfprivacy/config/brand_theme.dart';
|
||||
import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_form_cubit.dart';
|
||||
import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_md/brand_md.dart';
|
||||
|
@ -54,18 +53,15 @@ class RecoveryConfirmCloudflare extends StatelessWidget {
|
|||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (final BuildContext context) => BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: Padding(
|
||||
padding: paddingH15V0,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
children: const [
|
||||
BrandMarkdown(
|
||||
fileName: 'how_cloudflare',
|
||||
),
|
||||
],
|
||||
),
|
||||
builder: (final BuildContext context) => Padding(
|
||||
padding: paddingH15V0,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
children: const [
|
||||
BrandMarkdown(
|
||||
fileName: 'how_cloudflare',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:selfprivacy/config/brand_theme.dart';
|
||||
import 'package:selfprivacy/logic/cubit/forms/setup/initializing/provider_form_cubit.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||
import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart';
|
||||
import 'package:cubit_form/cubit_form.dart';
|
||||
|
@ -57,18 +56,15 @@ class RecoveryServerProviderConnected extends StatelessWidget {
|
|||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (final BuildContext context) => BrandBottomSheet(
|
||||
isExpended: true,
|
||||
child: Padding(
|
||||
padding: paddingH15V0,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
children: const [
|
||||
BrandMarkdown(
|
||||
fileName: 'how_hetzner',
|
||||
),
|
||||
],
|
||||
),
|
||||
builder: (final BuildContext context) => Padding(
|
||||
padding: paddingH15V0,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
children: const [
|
||||
BrandMarkdown(
|
||||
fileName: 'how_hetzner',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -9,76 +9,74 @@ class ResetPassword extends StatelessWidget {
|
|||
final User user;
|
||||
|
||||
@override
|
||||
Widget build(final BuildContext context) => BrandBottomSheet(
|
||||
child: BlocProvider(
|
||||
create: (final BuildContext context) => UserFormCubit(
|
||||
jobsCubit: context.read<JobsCubit>(),
|
||||
fieldFactory: FieldCubitFactory(context),
|
||||
initialUser: user,
|
||||
),
|
||||
child: Builder(
|
||||
builder: (final BuildContext context) {
|
||||
final FormCubitState formCubitState =
|
||||
context.watch<UserFormCubit>().state;
|
||||
Widget build(final BuildContext context) => BlocProvider(
|
||||
create: (final BuildContext context) => UserFormCubit(
|
||||
jobsCubit: context.read<JobsCubit>(),
|
||||
fieldFactory: FieldCubitFactory(context),
|
||||
initialUser: user,
|
||||
),
|
||||
child: Builder(
|
||||
builder: (final BuildContext context) {
|
||||
final FormCubitState formCubitState =
|
||||
context.watch<UserFormCubit>().state;
|
||||
|
||||
return BlocListener<UserFormCubit, FormCubitState>(
|
||||
listener:
|
||||
(final BuildContext context, final FormCubitState state) {
|
||||
if (state.isSubmitted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
return BlocListener<UserFormCubit, FormCubitState>(
|
||||
listener:
|
||||
(final BuildContext context, final FormCubitState state) {
|
||||
if (state.isSubmitted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BrandHeader(
|
||||
title: 'users.reset_password'.tr(),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Padding(
|
||||
padding: paddingH15V0,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BrandHeader(
|
||||
title: 'users.reset_password'.tr(),
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Padding(
|
||||
padding: paddingH15V0,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CubitFormTextField(
|
||||
formFieldCubit:
|
||||
context.read<UserFormCubit>().password,
|
||||
decoration: InputDecoration(
|
||||
alignLabelWithHint: false,
|
||||
labelText: 'basis.password'.tr(),
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
BrandIcons.refresh,
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
onPressed: context
|
||||
.read<UserFormCubit>()
|
||||
.genNewPassword,
|
||||
),
|
||||
),
|
||||
CubitFormTextField(
|
||||
formFieldCubit:
|
||||
context.read<UserFormCubit>().password,
|
||||
decoration: InputDecoration(
|
||||
alignLabelWithHint: false,
|
||||
labelText: 'basis.password'.tr(),
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
BrandIcons.refresh,
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
onPressed: context
|
||||
.read<UserFormCubit>()
|
||||
.genNewPassword,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
BrandButton.rised(
|
||||
onPressed: formCubitState.isSubmitting
|
||||
? null
|
||||
: () =>
|
||||
context.read<UserFormCubit>().trySubmit(),
|
||||
text: 'basis.apply'.tr(),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
BrandButton.rised(
|
||||
onPressed: formCubitState.isSubmitting
|
||||
? null
|
||||
: () =>
|
||||
context.read<UserFormCubit>().trySubmit(),
|
||||
text: 'basis.apply'.tr(),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -254,72 +254,70 @@ class NewSshKey extends StatelessWidget {
|
|||
final User user;
|
||||
|
||||
@override
|
||||
Widget build(final BuildContext context) => BrandBottomSheet(
|
||||
child: BlocProvider(
|
||||
create: (final context) {
|
||||
final jobCubit = context.read<JobsCubit>();
|
||||
final jobState = jobCubit.state;
|
||||
if (jobState is JobsStateWithJobs) {
|
||||
final jobs = jobState.clientJobList;
|
||||
for (final job in jobs) {
|
||||
if (job is CreateSSHKeyJob && job.user.login == user.login) {
|
||||
user.sshKeys.add(job.publicKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SshFormCubit(
|
||||
jobsCubit: jobCubit,
|
||||
user: user,
|
||||
);
|
||||
},
|
||||
child: Builder(
|
||||
builder: (final context) {
|
||||
final formCubitState = context.watch<SshFormCubit>().state;
|
||||
Widget build(final BuildContext context) => BlocProvider(
|
||||
create: (final context) {
|
||||
final jobCubit = context.read<JobsCubit>();
|
||||
final jobState = jobCubit.state;
|
||||
if (jobState is JobsStateWithJobs) {
|
||||
final jobs = jobState.clientJobList;
|
||||
for (final job in jobs) {
|
||||
if (job is CreateSSHKeyJob && job.user.login == user.login) {
|
||||
user.sshKeys.add(job.publicKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SshFormCubit(
|
||||
jobsCubit: jobCubit,
|
||||
user: user,
|
||||
);
|
||||
},
|
||||
child: Builder(
|
||||
builder: (final context) {
|
||||
final formCubitState = context.watch<SshFormCubit>().state;
|
||||
|
||||
return BlocListener<SshFormCubit, FormCubitState>(
|
||||
listener: (final context, final state) {
|
||||
if (state.isSubmitted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
return BlocListener<SshFormCubit, FormCubitState>(
|
||||
listener: (final context, final state) {
|
||||
if (state.isSubmitted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BrandHeader(
|
||||
title: user.login,
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Padding(
|
||||
padding: paddingH15V0,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BrandHeader(
|
||||
title: user.login,
|
||||
),
|
||||
const SizedBox(width: 14),
|
||||
Padding(
|
||||
padding: paddingH15V0,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IntrinsicHeight(
|
||||
child: CubitFormTextField(
|
||||
formFieldCubit: context.read<SshFormCubit>().key,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'ssh.input_label'.tr(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
BrandButton.rised(
|
||||
onPressed: formCubitState.isSubmitting
|
||||
? null
|
||||
: () =>
|
||||
context.read<SshFormCubit>().trySubmit(),
|
||||
text: 'ssh.create'.tr(),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
IntrinsicHeight(
|
||||
child: CubitFormTextField(
|
||||
formFieldCubit: context.read<SshFormCubit>().key,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'ssh.input_label'.tr(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
BrandButton.rised(
|
||||
onPressed: formCubitState.isSubmitting
|
||||
? null
|
||||
: () =>
|
||||
context.read<SshFormCubit>().trySubmit(),
|
||||
text: 'ssh.create'.tr(),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart';
|
|||
import 'package:selfprivacy/logic/cubit/users/users_cubit.dart';
|
||||
import 'package:selfprivacy/logic/models/job.dart';
|
||||
import 'package:selfprivacy/logic/models/hive/user.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_bottom_sheet/brand_bottom_sheet.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/brand_button.dart';
|
||||
import 'package:selfprivacy/ui/components/buttons/outlined_button.dart';
|
||||
import 'package:selfprivacy/ui/components/brand_cards/filled_card.dart';
|
||||
|
|
Loading…
Reference in a new issue