Show ShowTokenModal after account creation
This commit is contained in:
@@ -8,27 +8,30 @@ import 'package:simplecloudnotifier/utils/ui.dart';
|
||||
|
||||
class ShowTokenModal extends StatelessWidget {
|
||||
final AppAuth account;
|
||||
final bool isAfterRegister;
|
||||
|
||||
const ShowTokenModal({
|
||||
Key? key,
|
||||
required this.account,
|
||||
}) : super(key: key);
|
||||
const ShowTokenModal({Key? key, required this.account, required this.isAfterRegister}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var alertText = "Use your UserID and Send-Token to send messages to your account.\n\nThe Admin-Token should not be shared.";
|
||||
if (this.isAfterRegister) {
|
||||
alertText = "These are your UserID and tokens.\n\nBackup your Admin-Token safely.\n\nUse UserId & Send-Token to send yourself messages.";
|
||||
}
|
||||
|
||||
return AlertDialog(
|
||||
title: const Text('UserID + Token'),
|
||||
title: const Text('UserID & Token'),
|
||||
content: Container(
|
||||
width: 9000,
|
||||
height: 400,
|
||||
height: 450,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const BadgeDisplay(
|
||||
text: "Use your UserID and Send-Token to send messages to your account.\n\nThe Admin-Token should not be shared.",
|
||||
BadgeDisplay(
|
||||
text: alertText,
|
||||
icon: null,
|
||||
mode: BadgeMode.warn,
|
||||
mode: BadgeMode.info,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
if (this.account.userID != null)
|
||||
|
||||
Reference in New Issue
Block a user