Skip to content

Commit

Permalink
feat: align the published page name with header
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Nov 4, 2024
1 parent 9ab2962 commit 0e0f6dd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:flutter/material.dart';

class SettingsPageSitesConstants {
static const threeDotsButtonWidth = 26.0;
static const alignPadding = 6.0;

static final dateFormat = DateFormat('MMM d, yyyy');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:appflowy/plugins/shared/share/constants.dart';
import 'package:appflowy/shared/af_role_pb_extension.dart';
import 'package:appflowy/shared/colors.dart';
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/constants.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/domain/domain_more_action.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/domain/home_page_menu.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/publish_info_view_item.dart';
Expand Down Expand Up @@ -41,7 +42,11 @@ class DomainItem extends StatelessWidget {
),
// Homepage
Expanded(
child: _buildHomepage(context),
child: Padding(
padding: const EdgeInsets.only(
left: SettingsPageSitesConstants.alignPadding),
child: _buildHomepage(context),
),
),
// ... button
DomainMoreAction(namespace: namespace),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ class PublishedViewItem extends StatelessWidget {
// Published at
Expanded(
flex: flexes[2],
child: _buildPublishedAt(context),
child: Padding(
padding: const EdgeInsets.only(
left: SettingsPageSitesConstants.alignPadding,
),
child: _buildPublishedAt(context),
),
),

// More actions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/constants.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/domain/domain_header.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/domain/domain_item.dart';
import 'package:appflowy/workspace/presentation/settings/pages/sites/published_page/published_view_item.dart';
Expand Down Expand Up @@ -82,9 +83,15 @@ class _SettingsSitesPageView extends StatelessWidget {
const DomainHeader(),
ConstrainedBox(
constraints: const BoxConstraints(minHeight: 36.0),
child: DomainItem(
namespace: state.namespace,
homepage: '',
child: Transform.translate(
offset: const Offset(
-SettingsPageSitesConstants.alignPadding,
0,
),
child: DomainItem(
namespace: state.namespace,
homepage: '',
),
),
),
],
Expand Down Expand Up @@ -137,7 +144,13 @@ class _SettingsSitesPageView extends StatelessWidget {
} else {
children.addAll(
publishedViews.map(
(view) => PublishedViewItem(publishInfoView: view),
(view) => Transform.translate(
offset: const Offset(
-SettingsPageSitesConstants.alignPadding,
0,
),
child: PublishedViewItem(publishInfoView: view),
),
),
);
}
Expand Down

0 comments on commit 0e0f6dd

Please sign in to comment.