feat: replace mail protocol with smolmail and rebuild the UI

This commit is contained in:
randogoth 2026-09-26 22:45:38 +03:00
parent cb24b68069
commit e94e4158cc
93 changed files with 6387 additions and 3479 deletions

View file

@ -0,0 +1,64 @@
import "package:flutter/material.dart";
import "package:smol_mail/shared/utils/format.dart";
/// Identity summary in the drawer: the address is what gets shared, the
/// fingerprint is what gets verified.
class IdentityHeader extends StatelessWidget {
final String address;
final String fingerprint;
const IdentityHeader({
super.key,
required this.address,
required this.fingerprint,
});
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
CircleAvatar(
backgroundColor: Theme.of(context).primaryColor,
radius: 35,
child: Text(
address.isEmpty ? "?" : address[0].toUpperCase(),
style:
Theme.of(context).textTheme.bodyLarge!.copyWith(fontSize: 30),
),
),
const SizedBox(height: 20),
InkWell(
onTap: () => copyText(context, address),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
address.isEmpty ? "(not registered)" : address,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w900,
),
),
),
),
const SizedBox(height: 5),
InkWell(
onTap: () => copyText(context, fingerprint),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
"fp: $fingerprint",
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant,
fontSize: 14,
fontWeight: FontWeight.w700,
),
),
),
),
],
);
}
}