mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-02 04:47:01 +08:00
GitSetup SSH Keys: Show an explicit loading page
When the SSH Key is being generated, nothing can really be done. The text can be read, but it cannot really be acted upon, and it's not super clear that one is just supposed to wait.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'githostsetup_button.dart';
|
||||
import 'githostsetup_loading.dart';
|
||||
|
||||
class GitHostSetupSshKey extends StatelessWidget {
|
||||
final Function doneFunction;
|
||||
@ -20,6 +21,10 @@ class GitHostSetupSshKey extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (this.publicKey == null || this.publicKey.isEmpty) {
|
||||
return GitHostSetupLoadingPage("Generating SSH Key ...");
|
||||
}
|
||||
|
||||
Widget copyAndDepoyWidget;
|
||||
Widget cloneButton;
|
||||
if (this.publicKey.isEmpty) {
|
||||
@ -68,13 +73,6 @@ class GitHostSetupSshKey extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
String publicKeyStr = "";
|
||||
if (this.publicKey == null || this.publicKey.isEmpty) {
|
||||
publicKeyStr = "Generating ...";
|
||||
} else {
|
||||
publicKeyStr = this.publicKey;
|
||||
}
|
||||
|
||||
var publicKeyWidget = SizedBox(
|
||||
width: double.infinity,
|
||||
height: 160.0,
|
||||
@ -84,7 +82,7 @@ class GitHostSetupSshKey extends StatelessWidget {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
publicKeyStr,
|
||||
publicKey,
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: null,
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
|
Reference in New Issue
Block a user