mirror of
https://github.com/block/buzz.git
synced 2026-10-31 06:21:34 +00:00
Replace the mobile Agents sheet with a full-page directory of verified owned agents. Add dedicated creation and avatar pages with catalog-backed model selection, reuse the profile emoji/photo/camera controls, and expose Builderbot model settings while labeling desktop agents “Manage on desktop.” Share one account-scoped model catalog across editable cards and retries. Choose Bestie from the agent profile using the shared encrypted main-agent record (text-only action, filled star once selected), and move confirmed deletion to a top-left trash control with native iOS glass. Include uploaded avatars in owner registrations so desktop can display them. Validation: mobile analysis and all 3,958 hosted-enabled app tests passed; default-build tests run by the push hook. Earlier iPhone build installed and iterated with the user; the current iOS build succeeds, but final changes still need a device pass. Independent review found no new blockers. Actual camera capture and live Bestie sync remain unconfirmed; the existing shared `main-agent` wire format and Bestie terminology are retained. ### Snapshots Widget-harness captures with test data (not native iOS chrome). | Agents directory | Image avatar editor | | --- | --- | |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
86 lines
2.2 KiB
Dart
86 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../theme/theme.dart';
|
|
import '../theme/buzz_icons.dart';
|
|
import 'ios_glass_navigation_button.dart';
|
|
import 'avatar_editor_option_button.dart';
|
|
|
|
/// Camera and photo-library actions shared by avatar editors.
|
|
class AvatarImageSourceControls extends StatelessWidget {
|
|
const AvatarImageSourceControls({
|
|
super.key,
|
|
required this.height,
|
|
required this.isPicking,
|
|
required this.onCamera,
|
|
required this.onLibrary,
|
|
});
|
|
|
|
final double height;
|
|
final bool isPicking;
|
|
final VoidCallback onCamera;
|
|
final VoidCallback onLibrary;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => SizedBox(
|
|
height: height,
|
|
child: Column(
|
|
children: [
|
|
const Spacer(),
|
|
Row(
|
|
children: [
|
|
const Spacer(),
|
|
Expanded(
|
|
child: _ImageSourceOption(
|
|
key: const ValueKey('image-source-camera'),
|
|
icon: BuzzIcons.camera,
|
|
iosIcon: IosGlassNavigationIcon.camera,
|
|
label: 'Camera',
|
|
onTap: isPicking ? null : onCamera,
|
|
labelMaxWidth: 96,
|
|
),
|
|
),
|
|
const SizedBox(width: Grid.half),
|
|
Expanded(
|
|
child: _ImageSourceOption(
|
|
key: const ValueKey('image-source-library'),
|
|
icon: BuzzIcons.images,
|
|
iosIcon: IosGlassNavigationIcon.photoLibrary,
|
|
label: 'Photo Library',
|
|
onTap: isPicking ? null : onLibrary,
|
|
labelMaxWidth: 104,
|
|
),
|
|
),
|
|
const Spacer(),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
class _ImageSourceOption extends StatelessWidget {
|
|
const _ImageSourceOption({
|
|
super.key,
|
|
required this.icon,
|
|
required this.iosIcon,
|
|
required this.label,
|
|
required this.onTap,
|
|
required this.labelMaxWidth,
|
|
});
|
|
|
|
final IconData icon;
|
|
final IosGlassNavigationIcon iosIcon;
|
|
final String label;
|
|
final VoidCallback? onTap;
|
|
final double labelMaxWidth;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => AvatarEditorOptionButton(
|
|
icon: icon,
|
|
iosIcon: iosIcon,
|
|
label: label,
|
|
selected: false,
|
|
onTap: onTap,
|
|
labelMaxWidth: labelMaxWidth,
|
|
);
|
|
}
|