From 1aba7ce88bcf364033165608009d9f4ad0bab588 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 6 Nov 2024 03:22:30 +0300 Subject: [PATCH] refactor(ui): Reorganize UI components with Atomic Design pattern --- lib/logic/models/provider.dart | 2 +- .../buttons/brand_button.dart | 0 .../buttons/dialog_action_button.dart | 0 .../buttons/outlined_button.dart | 0 .../buttons/segmented_buttons.dart | 0 .../cards/filled_card.dart | 0 .../cards/outlined_card.dart | 0 .../icons}/brand_icons.dart | 0 .../icons}/job_icon.dart | 0 .../list_tile_on_surface_variant.dart | 0 .../list_tiles/section_title.dart | 0 .../brand_md => atoms/markdown}/brand_md.dart | 0 .../masks}/icon_status_mask.dart | 0 .../brand_linear_indicator.dart | 0 .../progress_indicators}/brand_loader.dart | 0 .../progress_indicators}/progress_bar.dart | 6 ++--- .../timer}/brand_timer.dart | 0 lib/ui/helpers/empty_page_placeholder.dart | 2 +- lib/ui/helpers/modals.dart | 2 +- lib/ui/layouts/brand_hero_screen.dart | 2 +- .../root_scaffold_with_subroute_selector.dart | 4 ++-- .../buttons}/flash_fab.dart | 0 .../cards}/not_ready_card.dart | 4 ++-- .../cards}/server_job_card.dart | 4 ++-- .../cards}/server_outdated_card.dart | 4 ++-- .../info_box/info_box.dart | 0 .../drawers/progress_drawer.dart | 0 .../drawers/support_drawer.dart | 2 +- .../headers}/brand_header.dart | 0 .../jobs}/jobs_content.dart | 6 ++--- .../server_storage_list_item.dart | 14 ++++++----- .../service_migration_list_item.dart | 0 lib/ui/pages/backups/backup_details.dart | 6 ++--- .../backups/copy_encryption_key_modal.dart | 2 +- lib/ui/pages/backups/snapshot_modal.dart | 6 ++--- lib/ui/pages/devices/devices.dart | 2 +- lib/ui/pages/devices/new_device.dart | 2 +- lib/ui/pages/dns_details/dns_details.dart | 4 ++-- lib/ui/pages/more/about_application.dart | 2 +- .../pages/more/app_settings/app_settings.dart | 4 ++-- .../more/app_settings/developer_settings.dart | 2 +- lib/ui/pages/more/more.dart | 6 ++--- .../tokens/add_server_provider_token.dart | 2 +- lib/ui/pages/more/tokens/tokens_page.dart | 4 ++-- .../onboarding/views/onboarding_view.dart | 2 +- lib/ui/pages/providers/providers.dart | 10 ++++---- lib/ui/pages/recovery_key/recovery_key.dart | 4 ++-- .../recovery_key/recovery_key_receiving.dart | 4 ++-- .../memory_usage_by_service_screen.dart | 4 ++-- .../server_details/server_details_screen.dart | 8 +++---- .../server_settings_screen.dart | 2 +- .../binds_migration/services_migration.dart | 10 ++++---- .../server_storage/extending_volume.dart | 4 ++-- .../pages/server_storage/server_storage.dart | 4 ++-- lib/ui/pages/server_storage/storage_card.dart | 4 ++-- lib/ui/pages/services/service_page.dart | 2 +- lib/ui/pages/services/services.dart | 8 +++---- .../broken_domain_outlined_card.dart | 2 +- .../initializing/dns_provider_picker.dart | 6 ++--- .../setup/initializing/domain_picker.dart | 4 ++-- .../setup/initializing/initializing.dart | 23 ++++++------------- .../initializing/server_provider_picker.dart | 8 +++---- .../initializing/server_type_picker.dart | 4 ++-- .../recovering/recover_by_new_device_key.dart | 2 +- .../recovering/recover_by_old_token.dart | 4 ++-- .../recovering/recover_by_recovery_key.dart | 2 +- .../recovery_confirm_backblaze.dart | 2 +- .../recovering/recovery_confirm_dns.dart | 2 +- .../recovering/recovery_confirm_server.dart | 4 ++-- .../recovering/recovery_method_select.dart | 4 ++-- .../setup/recovering/recovery_routing.dart | 2 +- .../recovery_server_provider_connected.dart | 2 +- lib/ui/pages/users/users.dart | 16 ++++++------- lib/ui/router/root_destinations.dart | 2 +- lib/utils/show_jobs_modal.dart | 2 +- 75 files changed, 121 insertions(+), 130 deletions(-) rename lib/ui/{components => atoms}/buttons/brand_button.dart (100%) rename lib/ui/{components => atoms}/buttons/dialog_action_button.dart (100%) rename lib/ui/{components => atoms}/buttons/outlined_button.dart (100%) rename lib/ui/{components => atoms}/buttons/segmented_buttons.dart (100%) rename lib/ui/{components => atoms}/cards/filled_card.dart (100%) rename lib/ui/{components => atoms}/cards/outlined_card.dart (100%) rename lib/ui/{components/brand_icons => atoms/icons}/brand_icons.dart (100%) rename lib/ui/{components/jobs_content => atoms/icons}/job_icon.dart (100%) rename lib/ui/{components => atoms}/list_tiles/list_tile_on_surface_variant.dart (100%) rename lib/ui/{components => atoms}/list_tiles/section_title.dart (100%) rename lib/ui/{components/brand_md => atoms/markdown}/brand_md.dart (100%) rename lib/ui/{components/icon_status_mask => atoms/masks}/icon_status_mask.dart (100%) rename lib/ui/{components/brand_linear_indicator => atoms/progress_indicators}/brand_linear_indicator.dart (100%) rename lib/ui/{components/brand_loader => atoms/progress_indicators}/brand_loader.dart (100%) rename lib/ui/{components/progress_bar => atoms/progress_indicators}/progress_bar.dart (92%) rename lib/ui/{components/brand_timer => atoms/timer}/brand_timer.dart (100%) rename lib/ui/{components/pre_styled_buttons => molecules/buttons}/flash_fab.dart (100%) rename lib/ui/{components/not_ready_card => molecules/cards}/not_ready_card.dart (91%) rename lib/ui/{components/jobs_content => molecules/cards}/server_job_card.dart (93%) rename lib/ui/{components/server_outdated_card => molecules/cards}/server_outdated_card.dart (92%) rename lib/ui/{components => molecules}/info_box/info_box.dart (100%) rename lib/ui/{components => organisms}/drawers/progress_drawer.dart (100%) rename lib/ui/{components => organisms}/drawers/support_drawer.dart (95%) rename lib/ui/{components/brand_header => organisms/headers}/brand_header.dart (100%) rename lib/ui/{components/jobs_content => organisms/jobs}/jobs_content.dart (98%) rename lib/ui/{components => organisms}/storage_list_items/server_storage_list_item.dart (92%) rename lib/ui/{components => organisms}/storage_list_items/service_migration_list_item.dart (100%) diff --git a/lib/logic/models/provider.dart b/lib/logic/models/provider.dart index 6feb175b..68bb2dac 100644 --- a/lib/logic/models/provider.dart +++ b/lib/logic/models/provider.dart @@ -1,7 +1,7 @@ import 'package:equatable/equatable.dart'; import 'package:flutter/widgets.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; enum ProviderType { server, diff --git a/lib/ui/components/buttons/brand_button.dart b/lib/ui/atoms/buttons/brand_button.dart similarity index 100% rename from lib/ui/components/buttons/brand_button.dart rename to lib/ui/atoms/buttons/brand_button.dart diff --git a/lib/ui/components/buttons/dialog_action_button.dart b/lib/ui/atoms/buttons/dialog_action_button.dart similarity index 100% rename from lib/ui/components/buttons/dialog_action_button.dart rename to lib/ui/atoms/buttons/dialog_action_button.dart diff --git a/lib/ui/components/buttons/outlined_button.dart b/lib/ui/atoms/buttons/outlined_button.dart similarity index 100% rename from lib/ui/components/buttons/outlined_button.dart rename to lib/ui/atoms/buttons/outlined_button.dart diff --git a/lib/ui/components/buttons/segmented_buttons.dart b/lib/ui/atoms/buttons/segmented_buttons.dart similarity index 100% rename from lib/ui/components/buttons/segmented_buttons.dart rename to lib/ui/atoms/buttons/segmented_buttons.dart diff --git a/lib/ui/components/cards/filled_card.dart b/lib/ui/atoms/cards/filled_card.dart similarity index 100% rename from lib/ui/components/cards/filled_card.dart rename to lib/ui/atoms/cards/filled_card.dart diff --git a/lib/ui/components/cards/outlined_card.dart b/lib/ui/atoms/cards/outlined_card.dart similarity index 100% rename from lib/ui/components/cards/outlined_card.dart rename to lib/ui/atoms/cards/outlined_card.dart diff --git a/lib/ui/components/brand_icons/brand_icons.dart b/lib/ui/atoms/icons/brand_icons.dart similarity index 100% rename from lib/ui/components/brand_icons/brand_icons.dart rename to lib/ui/atoms/icons/brand_icons.dart diff --git a/lib/ui/components/jobs_content/job_icon.dart b/lib/ui/atoms/icons/job_icon.dart similarity index 100% rename from lib/ui/components/jobs_content/job_icon.dart rename to lib/ui/atoms/icons/job_icon.dart diff --git a/lib/ui/components/list_tiles/list_tile_on_surface_variant.dart b/lib/ui/atoms/list_tiles/list_tile_on_surface_variant.dart similarity index 100% rename from lib/ui/components/list_tiles/list_tile_on_surface_variant.dart rename to lib/ui/atoms/list_tiles/list_tile_on_surface_variant.dart diff --git a/lib/ui/components/list_tiles/section_title.dart b/lib/ui/atoms/list_tiles/section_title.dart similarity index 100% rename from lib/ui/components/list_tiles/section_title.dart rename to lib/ui/atoms/list_tiles/section_title.dart diff --git a/lib/ui/components/brand_md/brand_md.dart b/lib/ui/atoms/markdown/brand_md.dart similarity index 100% rename from lib/ui/components/brand_md/brand_md.dart rename to lib/ui/atoms/markdown/brand_md.dart diff --git a/lib/ui/components/icon_status_mask/icon_status_mask.dart b/lib/ui/atoms/masks/icon_status_mask.dart similarity index 100% rename from lib/ui/components/icon_status_mask/icon_status_mask.dart rename to lib/ui/atoms/masks/icon_status_mask.dart diff --git a/lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart b/lib/ui/atoms/progress_indicators/brand_linear_indicator.dart similarity index 100% rename from lib/ui/components/brand_linear_indicator/brand_linear_indicator.dart rename to lib/ui/atoms/progress_indicators/brand_linear_indicator.dart diff --git a/lib/ui/components/brand_loader/brand_loader.dart b/lib/ui/atoms/progress_indicators/brand_loader.dart similarity index 100% rename from lib/ui/components/brand_loader/brand_loader.dart rename to lib/ui/atoms/progress_indicators/brand_loader.dart diff --git a/lib/ui/components/progress_bar/progress_bar.dart b/lib/ui/atoms/progress_indicators/progress_bar.dart similarity index 92% rename from lib/ui/components/progress_bar/progress_bar.dart rename to lib/ui/atoms/progress_indicators/progress_bar.dart index 2254ee02..a6dbd7b6 100644 --- a/lib/ui/components/progress_bar/progress_bar.dart +++ b/lib/ui/atoms/progress_indicators/progress_bar.dart @@ -8,8 +8,7 @@ class ProgressBar extends StatefulWidget { }); final int activeIndex; - - final List steps; + final int steps; @override State createState() => _ProgressBarState(); @@ -18,8 +17,7 @@ class ProgressBar extends StatefulWidget { class _ProgressBarState extends State { @override Widget build(final BuildContext context) { - final double progress = - 1 / widget.steps.length * (widget.activeIndex + 0.3); + final double progress = 1 / widget.steps * (widget.activeIndex + 0.3); return Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/components/brand_timer/brand_timer.dart b/lib/ui/atoms/timer/brand_timer.dart similarity index 100% rename from lib/ui/components/brand_timer/brand_timer.dart rename to lib/ui/atoms/timer/brand_timer.dart diff --git a/lib/ui/helpers/empty_page_placeholder.dart b/lib/ui/helpers/empty_page_placeholder.dart index 725192e1..621ad65c 100644 --- a/lib/ui/helpers/empty_page_placeholder.dart +++ b/lib/ui/helpers/empty_page_placeholder.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; -import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; +import 'package:selfprivacy/ui/molecules/cards/not_ready_card.dart'; class EmptyPagePlaceholder extends StatelessWidget { const EmptyPagePlaceholder({ diff --git a/lib/ui/helpers/modals.dart b/lib/ui/helpers/modals.dart index b744e323..88363143 100644 --- a/lib/ui/helpers/modals.dart +++ b/lib/ui/helpers/modals.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/ui/components/buttons/dialog_action_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/dialog_action_button.dart'; void showPopUpAlert({ required final String description, diff --git a/lib/ui/layouts/brand_hero_screen.dart b/lib/ui/layouts/brand_hero_screen.dart index 78490e52..56acf597 100644 --- a/lib/ui/layouts/brand_hero_screen.dart +++ b/lib/ui/layouts/brand_hero_screen.dart @@ -3,8 +3,8 @@ import 'package:easy_localization/easy_localization.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/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/helpers/widget_size.dart'; +import 'package:selfprivacy/ui/organisms/drawers/support_drawer.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/show_jobs_modal.dart'; diff --git a/lib/ui/layouts/root_scaffold_with_subroute_selector/root_scaffold_with_subroute_selector.dart b/lib/ui/layouts/root_scaffold_with_subroute_selector/root_scaffold_with_subroute_selector.dart index 2c5ea6d2..006ca79b 100644 --- a/lib/ui/layouts/root_scaffold_with_subroute_selector/root_scaffold_with_subroute_selector.dart +++ b/lib/ui/layouts/root_scaffold_with_subroute_selector/root_scaffold_with_subroute_selector.dart @@ -4,8 +4,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; -import 'package:selfprivacy/ui/components/pre_styled_buttons/flash_fab.dart'; +import 'package:selfprivacy/ui/molecules/buttons/flash_fab.dart'; +import 'package:selfprivacy/ui/organisms/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/router/root_destinations.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; diff --git a/lib/ui/components/pre_styled_buttons/flash_fab.dart b/lib/ui/molecules/buttons/flash_fab.dart similarity index 100% rename from lib/ui/components/pre_styled_buttons/flash_fab.dart rename to lib/ui/molecules/buttons/flash_fab.dart diff --git a/lib/ui/components/not_ready_card/not_ready_card.dart b/lib/ui/molecules/cards/not_ready_card.dart similarity index 91% rename from lib/ui/components/not_ready_card/not_ready_card.dart rename to lib/ui/molecules/cards/not_ready_card.dart index 758bbfc0..49bcfe4b 100644 --- a/lib/ui/components/not_ready_card/not_ready_card.dart +++ b/lib/ui/molecules/cards/not_ready_card.dart @@ -1,7 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; import 'package:selfprivacy/ui/router/router.dart'; class NotReadyCard extends StatelessWidget { @@ -22,7 +22,7 @@ class NotReadyCard extends StatelessWidget { ), trailing: Icon( Icons.arrow_forward_ios_outlined, - size: 16, + size: 24, color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), diff --git a/lib/ui/components/jobs_content/server_job_card.dart b/lib/ui/molecules/cards/server_job_card.dart similarity index 93% rename from lib/ui/components/jobs_content/server_job_card.dart rename to lib/ui/molecules/cards/server_job_card.dart index c4853b25..70281366 100644 --- a/lib/ui/components/jobs_content/server_job_card.dart +++ b/lib/ui/molecules/cards/server_job_card.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; -import 'package:selfprivacy/ui/components/jobs_content/job_icon.dart'; +import 'package:selfprivacy/ui/atoms/icons/job_icon.dart'; +import 'package:selfprivacy/ui/atoms/progress_indicators/brand_linear_indicator.dart'; class ServerJobCard extends StatelessWidget { const ServerJobCard({ diff --git a/lib/ui/components/server_outdated_card/server_outdated_card.dart b/lib/ui/molecules/cards/server_outdated_card.dart similarity index 92% rename from lib/ui/components/server_outdated_card/server_outdated_card.dart rename to lib/ui/molecules/cards/server_outdated_card.dart index e6fbc21b..c3d7bdd9 100644 --- a/lib/ui/components/server_outdated_card/server_outdated_card.dart +++ b/lib/ui/molecules/cards/server_outdated_card.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; class ServerOutdatedCard extends StatelessWidget { const ServerOutdatedCard({ @@ -31,7 +31,7 @@ class ServerOutdatedCard extends StatelessWidget { ), trailing: Icon( Icons.error_outline, - size: 16, + size: 24, color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/molecules/info_box/info_box.dart similarity index 100% rename from lib/ui/components/info_box/info_box.dart rename to lib/ui/molecules/info_box/info_box.dart diff --git a/lib/ui/components/drawers/progress_drawer.dart b/lib/ui/organisms/drawers/progress_drawer.dart similarity index 100% rename from lib/ui/components/drawers/progress_drawer.dart rename to lib/ui/organisms/drawers/progress_drawer.dart diff --git a/lib/ui/components/drawers/support_drawer.dart b/lib/ui/organisms/drawers/support_drawer.dart similarity index 95% rename from lib/ui/components/drawers/support_drawer.dart rename to lib/ui/organisms/drawers/support_drawer.dart index 01fc292d..41eba79a 100644 --- a/lib/ui/components/drawers/support_drawer.dart +++ b/lib/ui/organisms/drawers/support_drawer.dart @@ -2,7 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; +import 'package:selfprivacy/ui/atoms/markdown/brand_md.dart'; class SupportDrawer extends StatelessWidget { const SupportDrawer({ diff --git a/lib/ui/components/brand_header/brand_header.dart b/lib/ui/organisms/headers/brand_header.dart similarity index 100% rename from lib/ui/components/brand_header/brand_header.dart rename to lib/ui/organisms/headers/brand_header.dart diff --git a/lib/ui/components/jobs_content/jobs_content.dart b/lib/ui/organisms/jobs/jobs_content.dart similarity index 98% rename from lib/ui/components/jobs_content/jobs_content.dart rename to lib/ui/organisms/jobs/jobs_content.dart index 24465cb4..7435241d 100644 --- a/lib/ui/components/jobs_content/jobs_content.dart +++ b/lib/ui/organisms/jobs/jobs_content.dart @@ -9,10 +9,10 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/jobs_content/job_icon.dart'; -import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/icons/job_icon.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; +import 'package:selfprivacy/ui/molecules/cards/server_job_card.dart'; class JobsContent extends StatelessWidget { const JobsContent({ diff --git a/lib/ui/components/storage_list_items/server_storage_list_item.dart b/lib/ui/organisms/storage_list_items/server_storage_list_item.dart similarity index 92% rename from lib/ui/components/storage_list_items/server_storage_list_item.dart rename to lib/ui/organisms/storage_list_items/server_storage_list_item.dart index 0f299db2..4fd1bce0 100644 --- a/lib/ui/components/storage_list_items/server_storage_list_item.dart +++ b/lib/ui/organisms/storage_list_items/server_storage_list_item.dart @@ -1,7 +1,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; -import 'package:selfprivacy/ui/components/brand_linear_indicator/brand_linear_indicator.dart'; +import 'package:selfprivacy/ui/atoms/progress_indicators/brand_linear_indicator.dart'; class ServerStorageListItem extends StatelessWidget { const ServerStorageListItem({ @@ -34,11 +34,13 @@ class ServerStorageListItem extends StatelessWidget { : Theme.of(context).colorScheme.secondary, backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest, percentage: volume.percentage, - icon: Icon( - Icons.storage_outlined, - size: 24, - color: Theme.of(context).colorScheme.onSurface, - ), + icon: showIcon + ? Icon( + Icons.storage_outlined, + size: 24, + color: Theme.of(context).colorScheme.onSurface, + ) + : null, ); } diff --git a/lib/ui/components/storage_list_items/service_migration_list_item.dart b/lib/ui/organisms/storage_list_items/service_migration_list_item.dart similarity index 100% rename from lib/ui/components/storage_list_items/service_migration_list_item.dart rename to lib/ui/organisms/storage_list_items/service_migration_list_item.dart diff --git a/lib/ui/pages/backups/backup_details.dart b/lib/ui/pages/backups/backup_details.dart index 1235a286..660aa91a 100644 --- a/lib/ui/pages/backups/backup_details.dart +++ b/lib/ui/pages/backups/backup_details.dart @@ -11,11 +11,11 @@ import 'package:selfprivacy/logic/models/backup.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/jobs_content/server_job_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/molecules/cards/server_job_card.dart'; import 'package:selfprivacy/ui/pages/backups/change_period_modal.dart'; import 'package:selfprivacy/ui/pages/backups/change_rotation_quotas_modal.dart'; import 'package:selfprivacy/ui/pages/backups/copy_encryption_key_modal.dart'; diff --git a/lib/ui/pages/backups/copy_encryption_key_modal.dart b/lib/ui/pages/backups/copy_encryption_key_modal.dart index 8a3a7076..7ea9a679 100644 --- a/lib/ui/pages/backups/copy_encryption_key_modal.dart +++ b/lib/ui/pages/backups/copy_encryption_key_modal.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/bloc/backups/backups_bloc.dart'; import 'package:selfprivacy/logic/bloc/server_jobs/server_jobs_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; import 'package:selfprivacy/utils/platform_adapter.dart'; class CopyEncryptionKeyModal extends StatefulWidget { diff --git a/lib/ui/pages/backups/snapshot_modal.dart b/lib/ui/pages/backups/snapshot_modal.dart index 5eadc752..d97f825c 100644 --- a/lib/ui/pages/backups/snapshot_modal.dart +++ b/lib/ui/pages/backups/snapshot_modal.dart @@ -8,9 +8,9 @@ import 'package:selfprivacy/logic/bloc/services/services_bloc.dart'; import 'package:selfprivacy/logic/models/backup.dart'; import 'package:selfprivacy/logic/models/json/server_job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/backups/snapshot_id_list_tile.dart'; class SnapshotModal extends StatefulWidget { diff --git a/lib/ui/pages/devices/devices.dart b/lib/ui/pages/devices/devices.dart index 0051fc62..1adb8472 100644 --- a/lib/ui/pages/devices/devices.dart +++ b/lib/ui/pages/devices/devices.dart @@ -6,8 +6,8 @@ import 'package:selfprivacy/logic/bloc/devices/devices_bloc.dart'; import 'package:selfprivacy/logic/bloc/tokens/tokens_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/json/api_token.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; import 'package:selfprivacy/ui/pages/devices/new_device.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/devices/new_device.dart b/lib/ui/pages/devices/new_device.dart index 282851ac..d5b875af 100644 --- a/lib/ui/pages/devices/new_device.dart +++ b/lib/ui/pages/devices/new_device.dart @@ -3,7 +3,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/bloc/devices/devices_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class NewDeviceScreen extends StatelessWidget { diff --git a/lib/ui/pages/dns_details/dns_details.dart b/lib/ui/pages/dns_details/dns_details.dart index 02ac48ae..c0a70fef 100644 --- a/lib/ui/pages/dns_details/dns_details.dart +++ b/lib/ui/pages/dns_details/dns_details.dart @@ -6,8 +6,8 @@ import 'package:selfprivacy/logic/api_maps/rest_maps/dns_providers/desired_dns_r import 'package:selfprivacy/logic/cubit/dns_records/dns_records_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/get_it/resources_model.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; @RoutePage() diff --git a/lib/ui/pages/more/about_application.dart b/lib/ui/pages/more/about_application.dart index b2fd41fc..8c62bbe4 100644 --- a/lib/ui/pages/more/about_application.dart +++ b/lib/ui/pages/more/about_application.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:selfprivacy/config/get_it_config.dart'; -import 'package:selfprivacy/ui/components/list_tiles/section_title.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/section_title.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/platform_adapter.dart'; diff --git a/lib/ui/pages/more/app_settings/app_settings.dart b/lib/ui/pages/more/app_settings/app_settings.dart index df798470..d2efc5b9 100644 --- a/lib/ui/pages/more/app_settings/app_settings.dart +++ b/lib/ui/pages/more/app_settings/app_settings.dart @@ -4,8 +4,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/config/app_controller/inherited_app_controller.dart'; import 'package:selfprivacy/config/localization.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/list_tiles/section_title.dart'; +import 'package:selfprivacy/ui/atoms/buttons/dialog_action_button.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/section_title.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; diff --git a/lib/ui/pages/more/app_settings/developer_settings.dart b/lib/ui/pages/more/app_settings/developer_settings.dart index 33025a99..4430773a 100644 --- a/lib/ui/pages/more/app_settings/developer_settings.dart +++ b/lib/ui/pages/more/app_settings/developer_settings.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/api_maps/tls_options.dart'; import 'package:selfprivacy/logic/bloc/services/services_bloc.dart'; import 'package:selfprivacy/logic/bloc/volumes/volumes_bloc.dart'; import 'package:selfprivacy/logic/get_it/resources_model.dart'; -import 'package:selfprivacy/ui/components/list_tiles/section_title.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/section_title.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; diff --git a/lib/ui/pages/more/more.dart b/lib/ui/pages/more/more.dart index 797acb42..83703ef2 100644 --- a/lib/ui/pages/more/more.dart +++ b/lib/ui/pages/more/more.dart @@ -4,9 +4,9 @@ import 'package:flutter/material.dart'; import 'package:ionicons/ionicons.dart'; import 'package:selfprivacy/config/brand_theme.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.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/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; +import 'package:selfprivacy/ui/organisms/headers/brand_header.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; diff --git a/lib/ui/pages/more/tokens/add_server_provider_token.dart b/lib/ui/pages/more/tokens/add_server_provider_token.dart index 0f197bfb..3cda98bd 100644 --- a/lib/ui/pages/more/tokens/add_server_provider_token.dart +++ b/lib/ui/pages/more/tokens/add_server_provider_token.dart @@ -10,7 +10,7 @@ import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart import 'package:selfprivacy/logic/models/hive/server.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; import 'package:selfprivacy/logic/models/hive/server_provider_credential.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recovery_confirm_server.dart'; diff --git a/lib/ui/pages/more/tokens/tokens_page.dart b/lib/ui/pages/more/tokens/tokens_page.dart index a715dd5c..d043f04b 100644 --- a/lib/ui/pages/more/tokens/tokens_page.dart +++ b/lib/ui/pages/more/tokens/tokens_page.dart @@ -7,8 +7,8 @@ import 'package:selfprivacy/logic/bloc/tokens/tokens_bloc.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:selfprivacy/logic/models/hive/dns_provider_credential.dart'; import 'package:selfprivacy/logic/models/hive/server_provider_credential.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; diff --git a/lib/ui/pages/onboarding/views/onboarding_view.dart b/lib/ui/pages/onboarding/views/onboarding_view.dart index 4e661f30..197ab1d8 100644 --- a/lib/ui/pages/onboarding/views/onboarding_view.dart +++ b/lib/ui/pages/onboarding/views/onboarding_view.dart @@ -1,6 +1,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; // base widget for onboarding view class OnboardingView extends StatelessWidget { diff --git a/lib/ui/pages/providers/providers.dart b/lib/ui/pages/providers/providers.dart index c576b1e0..b3792f56 100644 --- a/lib/ui/pages/providers/providers.dart +++ b/lib/ui/pages/providers/providers.dart @@ -9,11 +9,11 @@ import 'package:selfprivacy/logic/bloc/volumes/volumes_bloc.dart'; import 'package:selfprivacy/logic/cubit/dns_records/dns_records_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_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; -import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; -import 'package:selfprivacy/ui/components/server_outdated_card/server_outdated_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/masks/icon_status_mask.dart'; +import 'package:selfprivacy/ui/molecules/cards/not_ready_card.dart'; +import 'package:selfprivacy/ui/molecules/cards/server_outdated_card.dart'; +import 'package:selfprivacy/ui/organisms/headers/brand_header.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key.dart b/lib/ui/pages/recovery_key/recovery_key.dart index e04c0f38..0516c141 100644 --- a/lib/ui/pages/recovery_key/recovery_key.dart +++ b/lib/ui/pages/recovery_key/recovery_key.dart @@ -5,8 +5,8 @@ import 'package:flutter/services.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/bloc/recovery_key/recovery_key_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/recovery_key/recovery_key_receiving.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/recovery_key/recovery_key_receiving.dart b/lib/ui/pages/recovery_key/recovery_key_receiving.dart index e7983bb3..3f7279c3 100644 --- a/lib/ui/pages/recovery_key/recovery_key_receiving.dart +++ b/lib/ui/pages/recovery_key/recovery_key_receiving.dart @@ -1,8 +1,8 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; class RecoveryKeyReceiving extends StatelessWidget { const RecoveryKeyReceiving({required this.recoveryKey, super.key}); diff --git a/lib/ui/pages/server_details/memory_usage_by_service_screen.dart b/lib/ui/pages/server_details/memory_usage_by_service_screen.dart index 963194ee..bf077a9f 100644 --- a/lib/ui/pages/server_details/memory_usage_by_service_screen.dart +++ b/lib/ui/pages/server_details/memory_usage_by_service_screen.dart @@ -8,8 +8,8 @@ import 'package:selfprivacy/logic/bloc/services/services_bloc.dart'; import 'package:selfprivacy/logic/common_enum/common_enum.dart'; import 'package:selfprivacy/logic/cubit/metrics/metrics_cubit.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/buttons/segmented_buttons.dart'; +import 'package:selfprivacy/ui/atoms/buttons/segmented_buttons.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; import 'package:selfprivacy/ui/helpers/empty_page_placeholder.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; diff --git a/lib/ui/pages/server_details/server_details_screen.dart b/lib/ui/pages/server_details/server_details_screen.dart index 183f12e0..d521b4af 100644 --- a/lib/ui/pages/server_details/server_details_screen.dart +++ b/lib/ui/pages/server_details/server_details_screen.dart @@ -10,10 +10,10 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/metrics.dart'; import 'package:selfprivacy/theming/harmonized_basic_colors.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; -import 'package:selfprivacy/ui/components/buttons/segmented_buttons.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; +import 'package:selfprivacy/ui/atoms/buttons/segmented_buttons.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/cpu_chart.dart'; import 'package:selfprivacy/ui/pages/server_details/charts/disk_charts.dart'; diff --git a/lib/ui/pages/server_details/server_settings_screen.dart b/lib/ui/pages/server_details/server_settings_screen.dart index 87926db8..0ffde783 100644 --- a/lib/ui/pages/server_details/server_settings_screen.dart +++ b/lib/ui/pages/server_details/server_settings_screen.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_info_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; -import 'package:selfprivacy/ui/components/brand_loader/brand_loader.dart'; +import 'package:selfprivacy/ui/atoms/progress_indicators/brand_loader.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/extensions/duration.dart'; diff --git a/lib/ui/pages/server_storage/binds_migration/services_migration.dart b/lib/ui/pages/server_storage/binds_migration/services_migration.dart index c62a9d4f..9220b10a 100644 --- a/lib/ui/pages/server_storage/binds_migration/services_migration.dart +++ b/lib/ui/pages/server_storage/binds_migration/services_migration.dart @@ -6,11 +6,11 @@ import 'package:selfprivacy/logic/bloc/services/services_bloc.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.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/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; +import 'package:selfprivacy/ui/organisms/headers/brand_header.dart'; +import 'package:selfprivacy/ui/organisms/storage_list_items/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/organisms/storage_list_items/service_migration_list_item.dart'; import 'package:selfprivacy/utils/show_jobs_modal.dart'; @RoutePage() diff --git a/lib/ui/pages/server_storage/extending_volume.dart b/lib/ui/pages/server_storage/extending_volume.dart index fce33a6c..61665f9f 100644 --- a/lib/ui/pages/server_storage/extending_volume.dart +++ b/lib/ui/pages/server_storage/extending_volume.dart @@ -6,10 +6,10 @@ import 'package:selfprivacy/logic/bloc/volumes/volumes_bloc.dart'; import 'package:selfprivacy/logic/models/disk_size.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/price.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/helpers/modals.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; @RoutePage() class ExtendingVolumePage extends StatefulWidget { diff --git a/lib/ui/pages/server_storage/server_storage.dart b/lib/ui/pages/server_storage/server_storage.dart index 8e6fec80..6fbca3c9 100644 --- a/lib/ui/pages/server_storage/server_storage.dart +++ b/lib/ui/pages/server_storage/server_storage.dart @@ -8,9 +8,9 @@ import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/atoms/buttons/outlined_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/organisms/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/show_jobs_modal.dart'; diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index ac603d3b..683fa6a3 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -4,8 +4,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/disk_status.dart'; import 'package:selfprivacy/logic/models/state_types.dart'; -import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; -import 'package:selfprivacy/ui/components/storage_list_items/server_storage_list_item.dart'; +import 'package:selfprivacy/ui/atoms/masks/icon_status_mask.dart'; +import 'package:selfprivacy/ui/organisms/storage_list_items/server_storage_list_item.dart'; import 'package:selfprivacy/ui/router/router.dart'; class StorageCard extends StatelessWidget { diff --git a/lib/ui/pages/services/service_page.dart b/lib/ui/pages/services/service_page.dart index 3eb7955f..28fe321a 100644 --- a/lib/ui/pages/services/service_page.dart +++ b/lib/ui/pages/services/service_page.dart @@ -8,7 +8,7 @@ import 'package:selfprivacy/logic/bloc/volumes/volumes_bloc.dart'; import 'package:selfprivacy/logic/cubit/client_jobs/client_jobs_cubit.dart'; import 'package:selfprivacy/logic/models/job.dart'; import 'package:selfprivacy/logic/models/service.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/launch_url.dart'; diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 0ac5696b..33c21c1b 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -9,11 +9,11 @@ import 'package:selfprivacy/logic/bloc/services/services_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/service.dart'; import 'package:selfprivacy/logic/models/state_types.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/icon_status_mask/icon_status_mask.dart'; -import 'package:selfprivacy/ui/components/server_outdated_card/server_outdated_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/masks/icon_status_mask.dart'; import 'package:selfprivacy/ui/helpers/empty_page_placeholder.dart'; +import 'package:selfprivacy/ui/molecules/cards/server_outdated_card.dart'; +import 'package:selfprivacy/ui/organisms/headers/brand_header.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/launch_url.dart'; diff --git a/lib/ui/pages/setup/initializing/broken_domain_outlined_card.dart b/lib/ui/pages/setup/initializing/broken_domain_outlined_card.dart index 0fa8da5f..b54b542a 100644 --- a/lib/ui/pages/setup/initializing/broken_domain_outlined_card.dart +++ b/lib/ui/pages/setup/initializing/broken_domain_outlined_card.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/providers/dns_providers/dns_provider.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; class BrokenDomainOutlinedCard extends StatelessWidget { const BrokenDomainOutlinedCard({ diff --git a/lib/ui/pages/setup/initializing/dns_provider_picker.dart b/lib/ui/pages/setup/initializing/dns_provider_picker.dart index 9385eab3..b57243fe 100644 --- a/lib/ui/pages/setup/initializing/dns_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/dns_provider_picker.dart @@ -6,9 +6,9 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/dns_provider_fo import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_domain.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/outlined_card.dart'; import 'package:url_launcher/url_launcher_string.dart'; class DnsProviderPicker extends StatefulWidget { diff --git a/lib/ui/pages/setup/initializing/domain_picker.dart b/lib/ui/pages/setup/initializing/domain_picker.dart index fd304236..98ad651a 100644 --- a/lib/ui/pages/setup/initializing/domain_picker.dart +++ b/lib/ui/pages/setup/initializing/domain_picker.dart @@ -3,8 +3,8 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/initializing/domain_setup_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; class DomainPicker extends StatefulWidget { diff --git a/lib/ui/pages/setup/initializing/initializing.dart b/lib/ui/pages/setup/initializing/initializing.dart index dc26606f..5b9dfd70 100644 --- a/lib/ui/pages/setup/initializing/initializing.dart +++ b/lib/ui/pages/setup/initializing/initializing.dart @@ -13,13 +13,13 @@ import 'package:selfprivacy/logic/cubit/forms/user/ssh_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/providers/providers_controller.dart'; -import 'package:selfprivacy/ui/components/brand_timer/brand_timer.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/drawers/progress_drawer.dart'; -import 'package:selfprivacy/ui/components/drawers/support_drawer.dart'; -import 'package:selfprivacy/ui/components/progress_bar/progress_bar.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/atoms/progress_indicators/progress_bar.dart'; +import 'package:selfprivacy/ui/atoms/timer/brand_timer.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; +import 'package:selfprivacy/ui/organisms/drawers/progress_drawer.dart'; +import 'package:selfprivacy/ui/organisms/drawers/support_drawer.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/broken_domain_outlined_card.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/dns_provider_picker.dart'; import 'package:selfprivacy/ui/pages/setup/initializing/domain_picker.dart'; @@ -102,16 +102,7 @@ class InitializingPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), child: ProgressBar( - steps: const [ - 'Hosting', - 'Server Type', - 'DNS Provider', - 'Backblaze', - 'Domain', - 'User', - 'Server', - 'Installation', - ], + steps: 8, activeIndex: cubit.state.progressBar, ), ), diff --git a/lib/ui/pages/setup/initializing/server_provider_picker.dart b/lib/ui/pages/setup/initializing/server_provider_picker.dart index 8a3095b0..c639cad9 100644 --- a/lib/ui/pages/setup/initializing/server_provider_picker.dart +++ b/lib/ui/pages/setup/initializing/server_provider_picker.dart @@ -6,11 +6,11 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; import 'package:selfprivacy/utils/launch_url.dart'; class ServerProviderPicker extends StatefulWidget { diff --git a/lib/ui/pages/setup/initializing/server_type_picker.dart b/lib/ui/pages/setup/initializing/server_type_picker.dart index 7d30caf5..cc8e8932 100644 --- a/lib/ui/pages/setup/initializing/server_type_picker.dart +++ b/lib/ui/pages/setup/initializing/server_type_picker.dart @@ -6,9 +6,9 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/models/price.dart'; import 'package:selfprivacy/logic/models/server_provider_location.dart'; import 'package:selfprivacy/logic/models/server_type.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/responsive_layout_with_infobox.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; import 'package:selfprivacy/utils/ui_helpers.dart'; class ServerTypePicker extends StatefulWidget { diff --git a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart index 1825ef18..8545f7c3 100644 --- a/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_new_device_key.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/setup/recovering/recover_by_old_token.dart b/lib/ui/pages/setup/recovering/recover_by_old_token.dart index a2747295..44f4601b 100644 --- a/lib/ui/pages/setup/recovering/recover_by_old_token.dart +++ b/lib/ui/pages/setup/recovering/recover_by_old_token.dart @@ -4,8 +4,8 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/brand_md/brand_md.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/markdown/brand_md.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoverByOldTokenInstruction extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart index 8633ad59..90da0ed9 100644 --- a/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart +++ b/lib/ui/pages/setup/recovering/recover_by_recovery_key.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_device_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoverByRecoveryKey extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart index 90bff9bd..e94e07be 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_backblaze.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.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/logic/cubit/support_system/support_system_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryConfirmBackblaze extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart index a3dca1c7..93b66918 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_dns.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.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/logic/cubit/support_system/support_system_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryConfirmDns extends StatelessWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart index 3b3ac4b8..476e776e 100644 --- a/lib/ui/pages/setup/recovering/recovery_confirm_server.dart +++ b/lib/ui/pages/setup/recovering/recovery_confirm_server.dart @@ -5,8 +5,8 @@ import 'package:selfprivacy/logic/cubit/server_installation/server_installation_ import 'package:selfprivacy/logic/models/hive/server.dart'; import 'package:selfprivacy/logic/models/hive/server_provider_credential.dart'; import 'package:selfprivacy/logic/models/server_basic_info.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryConfirmServer extends StatefulWidget { diff --git a/lib/ui/pages/setup/recovering/recovery_method_select.dart b/lib/ui/pages/setup/recovering/recovery_method_select.dart index dd5d77bd..9930db80 100644 --- a/lib/ui/pages/setup/recovering/recovery_method_select.dart +++ b/lib/ui/pages/setup/recovering/recovery_method_select.dart @@ -2,8 +2,8 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/cards/outlined_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/outlined_card.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_old_token.dart'; import 'package:selfprivacy/utils/route_transitions/basic.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_routing.dart b/lib/ui/pages/setup/recovering/recovery_routing.dart index 761cd4d5..89087594 100644 --- a/lib/ui/pages/setup/recovering/recovery_routing.dart +++ b/lib/ui/pages/setup/recovering/recovery_routing.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:selfprivacy/logic/cubit/forms/factories/field_cubit_factory.dart'; import 'package:selfprivacy/logic/cubit/forms/setup/recovering/recovery_domain_form_cubit.dart'; import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; import 'package:selfprivacy/ui/pages/root_route.dart'; import 'package:selfprivacy/ui/pages/setup/recovering/recover_by_new_device_key.dart'; diff --git a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart index a460670c..be48aea3 100644 --- a/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart +++ b/lib/ui/pages/setup/recovering/recovery_server_provider_connected.dart @@ -6,7 +6,7 @@ import 'package:selfprivacy/logic/cubit/forms/setup/initializing/server_provider import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/cubit/support_system/support_system_cubit.dart'; import 'package:selfprivacy/logic/models/hive/server_details.dart'; -import 'package:selfprivacy/ui/components/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; class RecoveryServerProviderConnected extends StatelessWidget { diff --git a/lib/ui/pages/users/users.dart b/lib/ui/pages/users/users.dart index edaf2974..c420c58f 100644 --- a/lib/ui/pages/users/users.dart +++ b/lib/ui/pages/users/users.dart @@ -14,16 +14,16 @@ import 'package:selfprivacy/logic/cubit/server_detailed_info/server_detailed_inf import 'package:selfprivacy/logic/cubit/server_installation/server_installation_cubit.dart'; import 'package:selfprivacy/logic/models/hive/user.dart'; import 'package:selfprivacy/logic/models/job.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/buttons/brand_button.dart'; -import 'package:selfprivacy/ui/components/buttons/outlined_button.dart'; -import 'package:selfprivacy/ui/components/cards/filled_card.dart'; -import 'package:selfprivacy/ui/components/info_box/info_box.dart'; -import 'package:selfprivacy/ui/components/list_tiles/list_tile_on_surface_variant.dart'; -import 'package:selfprivacy/ui/components/server_outdated_card/server_outdated_card.dart'; +import 'package:selfprivacy/ui/atoms/buttons/brand_button.dart'; +import 'package:selfprivacy/ui/atoms/buttons/outlined_button.dart'; +import 'package:selfprivacy/ui/atoms/cards/filled_card.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/list_tiles/list_tile_on_surface_variant.dart'; import 'package:selfprivacy/ui/helpers/empty_page_placeholder.dart'; import 'package:selfprivacy/ui/layouts/brand_hero_screen.dart'; +import 'package:selfprivacy/ui/molecules/cards/server_outdated_card.dart'; +import 'package:selfprivacy/ui/molecules/info_box/info_box.dart'; +import 'package:selfprivacy/ui/organisms/headers/brand_header.dart'; import 'package:selfprivacy/ui/router/router.dart'; import 'package:selfprivacy/utils/breakpoints.dart'; import 'package:selfprivacy/utils/platform_adapter.dart'; diff --git a/lib/ui/router/root_destinations.dart b/lib/ui/router/root_destinations.dart index 3bd749ba..4e7170d7 100644 --- a/lib/ui/router/root_destinations.dart +++ b/lib/ui/router/root_destinations.dart @@ -1,6 +1,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; +import 'package:selfprivacy/ui/atoms/icons/brand_icons.dart'; import 'package:selfprivacy/ui/router/router.dart'; class RouteDestination { diff --git a/lib/utils/show_jobs_modal.dart b/lib/utils/show_jobs_modal.dart index 81e7d92f..5f94d881 100644 --- a/lib/utils/show_jobs_modal.dart +++ b/lib/utils/show_jobs_modal.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart'; +import 'package:selfprivacy/ui/organisms/jobs/jobs_content.dart'; Future showModalJobsSheet({ required final BuildContext context,