Skip to content

Commit

Permalink
Fix: UI issues (#1846)
Browse files Browse the repository at this point in the history
* fix: loading spinner alignment corrected

* fix: auth app deletion link is shown while deletion is not allowed
  • Loading branch information
bjoern-m authored Oct 22, 2024
1 parent c7bfd92 commit 9e10bdd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Props {
onDelete: (event: Event) => Promise<void>;
onConnect: (event: Event) => Promise<void>;
authAppSetUp: boolean;
allowDeletion: boolean;
}

const ManageAuthAppDropdown = ({
Expand All @@ -23,6 +24,7 @@ const ManageAuthAppDropdown = ({
onDelete,
onConnect,
authAppSetUp,
allowDeletion,
}: Props) => {
const { t } = useContext(TranslateContext);

Expand Down Expand Up @@ -65,6 +67,7 @@ const ManageAuthAppDropdown = ({
<br />
{authAppSetUp ? (
<Link
hidden={!allowDeletion}
uiAction={"auth-app-remove"}
onClick={(event: Event) => onDelete(event)}
loadingSpinnerPosition={"right"}
Expand Down
2 changes: 1 addition & 1 deletion frontend/elements/src/pages/CreateSecurityKeyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const CreateSecurityKeyPage = (props: Props) => {
<Link
uiAction={"back"}
onClick={onBackClick}
loadingSpinnerPosition={"left"}
loadingSpinnerPosition={"right"}
hidden={!flowState.actions.back?.(null)}
>
{t("labels.back")}
Expand Down
1 change: 0 additions & 1 deletion frontend/elements/src/pages/LoginMethodChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ const LoginMethodChooserPage = (props: Props) => {
>
{t("labels.back")}
</Link>
<span hidden />
</Footer>
</Fragment>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/elements/src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ const ProfilePage = (props: Props) => {
<ManageAuthAppDropdown
onConnect={onAuthAppSetUp}
onDelete={onAuthAppRemove}
allowDeletion={!!flowState.actions.otp_secret_delete?.(null)}
authAppSetUp={flowState.payload.user.mfa_config?.auth_app_set_up}
checkedItemID={checkedItemID}
setCheckedItemID={setCheckedItemID}
Expand Down
4 changes: 2 additions & 2 deletions frontend/elements/src/pages/RegisterPasskeyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ const RegisterPasskeyPage = (props: Props) => {
<Link
uiAction={"back"}
onClick={onBackClick}
loadingSpinnerPosition={"left"}
loadingSpinnerPosition={"right"}
hidden={!flowState.actions.back?.(null)}
>
{t("labels.back")}
</Link>
<Link
uiAction={"skip"}
onClick={onSkipClick}
loadingSpinnerPosition={"right"}
loadingSpinnerPosition={"left"}
hidden={!flowState.actions.skip?.(null)}
>
{t("labels.skip")}
Expand Down

0 comments on commit 9e10bdd

Please sign in to comment.