mirror of
https://github.com/block/buzz.git
synced 2026-11-04 08:21:48 +00:00
Balance spacing around remote agent profile actions
Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
@@ -66,11 +66,19 @@ class UserProfileSheet extends HookConsumerWidget {
|
||||
/// Optional actions supplied by the opening surface, below the profile tiles.
|
||||
final WidgetBuilder? contextualActions;
|
||||
|
||||
/// Space before the primary profile actions.
|
||||
final double primaryActionsSpacing;
|
||||
|
||||
/// Space between primary actions and caller-supplied actions.
|
||||
final double contextualActionsSpacing;
|
||||
|
||||
const UserProfileSheet({
|
||||
super.key,
|
||||
required this.pubkey,
|
||||
this.names,
|
||||
this.contextualActions,
|
||||
this.primaryActionsSpacing = Grid.xs + Grid.half,
|
||||
this.contextualActionsSpacing = Grid.xs,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -264,7 +272,7 @@ class UserProfileSheet extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
|
||||
const SizedBox(height: Grid.xs + Grid.half),
|
||||
SizedBox(height: primaryActionsSpacing),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
@@ -296,7 +304,7 @@ class UserProfileSheet extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: Grid.xs),
|
||||
SizedBox(height: contextualActionsSpacing),
|
||||
if (contextualActions != null)
|
||||
Builder(builder: contextualActions!),
|
||||
],
|
||||
|
||||
@@ -84,6 +84,8 @@ class _AgentsNavigation extends HookConsumerWidget {
|
||||
),
|
||||
child: UserProfileSheet(
|
||||
pubkey: pubkey,
|
||||
primaryActionsSpacing: Grid.md,
|
||||
contextualActionsSpacing: Grid.xxs,
|
||||
contextualActions: (_) => DeleteAgentAction(
|
||||
controller: controller,
|
||||
pubkey: pubkey,
|
||||
|
||||
@@ -82,7 +82,7 @@ class DeleteAgentAction extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: Grid.xs),
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user