fix(app/account): create access token button (#7014)

* fix(api): remove unused leftover imports

* fix(app/account): create access token button

* fix(app/formcontrol): error message overlapping input on smaller screens
pull/7089/head^2
LP B 2022-06-16 21:25:37 +02:00 committed by GitHub
parent 97a880e6c1
commit 8ed41de815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 16 deletions

View File

@ -29,6 +29,7 @@ export function FormControl({
required,
}: PropsWithChildren<Props>) {
return (
<>
<div className={clsx('form-group', styles.container)}>
<label
htmlFor={inputId}
@ -42,13 +43,15 @@ export function FormControl({
</label>
<div className={sizeClassChildren(size)}>{children}</div>
</div>
{errors && (
<div className="form-group">
<div className="col-md-12">
<FormError>{errors}</FormError>
</div>
)}
</div>
)}
</>
);
}

View File

@ -61,7 +61,7 @@ export function CreateAccessToken({
return (
<Widget>
<WidgetBody>
<div>
<div className="form-horizontal">
<FormControl
inputId="input"
label={t('Description')}

View File

@ -48,7 +48,7 @@ angular.module('portainer.app').controller('AccountController', [
};
this.uiCanExit = (newTransition) => {
if ($scope.userRole === 1 && newTransition.to().name === 'portainer.settings.authentication') {
if ($scope.userRole === 1 && newTransition && newTransition.to().name === 'portainer.settings.authentication') {
return true;
}
if (newTransition.to().name === 'portainer.logout') {