✨ Key pairs
This commit is contained in:
@ -45,7 +45,8 @@ class AccountScreen extends StatelessWidget {
|
||||
? Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
AutoResizeUniversalImage(sn.getAttachmentUrl(ua.user!.banner), fit: BoxFit.cover),
|
||||
AutoResizeUniversalImage(sn.getAttachmentUrl(ua.user!.banner),
|
||||
fit: BoxFit.cover),
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
@ -79,7 +80,9 @@ class AccountScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: ua.isAuthorized ? _AuthorizedAccountScreen() : _UnauthorizedAccountScreen(),
|
||||
child: ua.isAuthorized
|
||||
? _AuthorizedAccountScreen()
|
||||
: _UnauthorizedAccountScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -115,9 +118,11 @@ class _AuthorizedAccountScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
Text(ua.user!.nick).textStyle(Theme.of(context).textTheme.titleLarge!),
|
||||
Text(ua.user!.nick)
|
||||
.textStyle(Theme.of(context).textTheme.titleLarge!),
|
||||
const Gap(4),
|
||||
Text('@${ua.user!.name}').textStyle(Theme.of(context).textTheme.bodySmall!),
|
||||
Text('@${ua.user!.name}')
|
||||
.textStyle(Theme.of(context).textTheme.bodySmall!),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
@ -183,6 +188,16 @@ class _AuthorizedAccountScreen extends StatelessWidget {
|
||||
GoRouter.of(context).pushNamed('accountBadges');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text('accountKeyPairs').tr(),
|
||||
subtitle: Text('accountKeyPairsDescription').tr(),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
leading: const Icon(Symbols.key),
|
||||
trailing: const Icon(Symbols.chevron_right),
|
||||
onTap: () {
|
||||
GoRouter.of(context).pushNamed('accountKeyPairs');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text('accountSettings').tr(),
|
||||
subtitle: Text('accountSettingsSubtitle').tr(),
|
||||
@ -236,7 +251,9 @@ class _UnauthorizedAccountScreen extends StatelessWidget {
|
||||
child: Icon(Symbols.waving_hand, size: 28),
|
||||
),
|
||||
const Gap(8),
|
||||
Text('accountIntroTitle').tr().textStyle(Theme.of(context).textTheme.titleLarge!),
|
||||
Text('accountIntroTitle')
|
||||
.tr()
|
||||
.textStyle(Theme.of(context).textTheme.titleLarge!),
|
||||
Text('accountIntroSubtitle').tr(),
|
||||
],
|
||||
).padding(all: 20),
|
||||
|
Reference in New Issue
Block a user