mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
## Summary - add a permission-gated mobile community invite page - create, copy, and natively share configurable invite links - invite a validated npub directly with member/admin role selection - reuse Buzz profile actions, search styling, settings rows, and modal sheets ## Validation - `just mobile-check` - `flutter test` (1,275 tests) - Pixel and iPhone review builds installed and launched --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com> Signed-off-by: Fast Fizz <2df81cb51f05a9d5387ef24d7b9ecb8fcdfcd1c70ffabc67061c9596e1b5b1c4@buzz.block.builderlab.xyz> Co-authored-by: Carl <3c4caeafb646d23867f1c4832e68211d77e2561946171625f75c3ce1a3f2670f@buzz.block.builderlab.xyz> Co-authored-by: Fast Fizz <2df81cb51f05a9d5387ef24d7b9ecb8fcdfcd1c70ffabc67061c9596e1b5b1c4@buzz.block.builderlab.xyz>
30 lines
809 B
Dart
30 lines
809 B
Dart
part of '../settings_page.dart';
|
|
|
|
class _CommunitySection extends ConsumerWidget {
|
|
const _CommunitySection({required this.invitePageBuilder});
|
|
|
|
final WidgetBuilder invitePageBuilder;
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final roleAsync = ref.watch(currentCommunityRoleProvider);
|
|
if (!roleAsync.hasError && !canManageCommunityInvites(roleAsync.value)) {
|
|
return const SizedBox.shrink();
|
|
}
|
|
|
|
return AppListCard(
|
|
label: 'Community',
|
|
children: [
|
|
AppListRow(
|
|
icon: LucideIcons.userPlus,
|
|
title: 'Invite to community',
|
|
trailing: const _RowChevron(),
|
|
onTap: () => Navigator.of(
|
|
context,
|
|
).push(MaterialPageRoute<void>(builder: invitePageBuilder)),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|