mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
GitSetup: Add instructions on SSH Key page
This commit is contained in:
@ -25,7 +25,84 @@ class GitHostSetupSshKey extends StatelessWidget {
|
|||||||
return GitHostSetupLoadingPage("Generating SSH Key ...");
|
return GitHostSetupLoadingPage("Generating SSH Key ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget copyAndDepoyWidget;
|
var publicKeyWidget = SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 160.0,
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context).buttonColor,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
publicKey,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
maxLines: null,
|
||||||
|
style: Theme.of(context).textTheme.body1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
var columns = Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
'In order to access this repository, this public key must be copied as a deploy key',
|
||||||
|
style: Theme.of(context).textTheme.title,
|
||||||
|
),
|
||||||
|
SizedBox(height: 32.0),
|
||||||
|
|
||||||
|
// Step 1
|
||||||
|
Text(
|
||||||
|
'1. Copy the key',
|
||||||
|
style: Theme.of(context).textTheme.subtitle,
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.0),
|
||||||
|
publicKeyWidget,
|
||||||
|
SizedBox(height: 8.0),
|
||||||
|
GitHostSetupButton(
|
||||||
|
text: "Copy Key",
|
||||||
|
onPressed: copyKeyFunction,
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0),
|
||||||
|
|
||||||
|
// Step 2
|
||||||
|
Text(
|
||||||
|
'2. Open webpage, and paste the deploy key. Make sure it is given Write Access. ',
|
||||||
|
style: Theme.of(context).textTheme.subtitle,
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.0),
|
||||||
|
GitHostSetupButton(
|
||||||
|
text: "Open Deploy Key Webpage",
|
||||||
|
onPressed: openDeployKeyPage,
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0),
|
||||||
|
|
||||||
|
// Step 3
|
||||||
|
Text(
|
||||||
|
'3. Try Cloning ..',
|
||||||
|
style: Theme.of(context).textTheme.subtitle,
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.0),
|
||||||
|
GitHostSetupButton(
|
||||||
|
text: "Clone Repo",
|
||||||
|
onPressed: this.doneFunction,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
return Center(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: columns,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Widget copyAndDepoyWidget;
|
||||||
Widget cloneButton;
|
Widget cloneButton;
|
||||||
if (this.publicKey.isEmpty) {
|
if (this.publicKey.isEmpty) {
|
||||||
copyAndDepoyWidget = Container();
|
copyAndDepoyWidget = Container();
|
||||||
@ -72,40 +149,4 @@ class GitHostSetupSshKey extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
var publicKeyWidget = SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 160.0,
|
|
||||||
child: Container(
|
|
||||||
color: Theme.of(context).buttonColor,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Container(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Text(
|
|
||||||
publicKey,
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
maxLines: null,
|
|
||||||
style: Theme.of(context).textTheme.body1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
'Deploy Public Key',
|
|
||||||
style: Theme.of(context).textTheme.headline,
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.0),
|
|
||||||
publicKeyWidget,
|
|
||||||
SizedBox(height: 8.0),
|
|
||||||
copyAndDepoyWidget,
|
|
||||||
cloneButton,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user