chore: hide unfinished gitlab login entry
This commit is contained in:
parent
36c9eda9ac
commit
c15c7096e9
|
@ -140,57 +140,57 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
}
|
||||
},
|
||||
),
|
||||
_buildAddItem(
|
||||
text: 'GitLab Account by Token',
|
||||
onTap: () async {
|
||||
var result =
|
||||
await Provider.of<ThemeModel>(context).showConfirm(
|
||||
context,
|
||||
Column(
|
||||
children: <Widget>[
|
||||
CupertinoTextField(
|
||||
placeholder: 'Domain',
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
_gitlabDomain = v;
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
CupertinoTextField(
|
||||
placeholder: 'Access token',
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
_gitlabToken = v;
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'GitTouch needs these permissions',
|
||||
style: TextStyle(
|
||||
fontSize: 14, fontWeight: FontWeight.w400),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'api, read_user, read_repository',
|
||||
style: TextStyle(
|
||||
fontSize: 16, color: theme.palette.primary),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
if (result == true) {
|
||||
try {
|
||||
await auth.loginToGitlab(_gitlabDomain, _gitlabToken);
|
||||
// TODO: Custom domain
|
||||
} catch (err) {
|
||||
Provider.of<ThemeModel>(context).showConfirm(
|
||||
context, Text('Token invalid: $err'));
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
// _buildAddItem(
|
||||
// text: 'GitLab Account by Token',
|
||||
// onTap: () async {
|
||||
// var result =
|
||||
// await Provider.of<ThemeModel>(context).showConfirm(
|
||||
// context,
|
||||
// Column(
|
||||
// children: <Widget>[
|
||||
// CupertinoTextField(
|
||||
// placeholder: 'Domain',
|
||||
// onChanged: (v) {
|
||||
// setState(() {
|
||||
// _gitlabDomain = v;
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// CupertinoTextField(
|
||||
// placeholder: 'Access token',
|
||||
// onChanged: (v) {
|
||||
// setState(() {
|
||||
// _gitlabToken = v;
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// Text(
|
||||
// 'GitTouch needs these permissions',
|
||||
// style: TextStyle(
|
||||
// fontSize: 14, fontWeight: FontWeight.w400),
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// Text(
|
||||
// 'api, read_user, read_repository',
|
||||
// style: TextStyle(
|
||||
// fontSize: 16, color: theme.palette.primary),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// if (result == true) {
|
||||
// try {
|
||||
// await auth.loginToGitlab(_gitlabDomain, _gitlabToken);
|
||||
// // TODO: Custom domain
|
||||
// } catch (err) {
|
||||
// Provider.of<ThemeModel>(context).showConfirm(
|
||||
// context, Text('Token invalid: $err'));
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// )
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue