0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

feat(console): add suspended label (#2435)

This commit is contained in:
wangsijie 2022-11-15 11:51:46 +08:00 committed by GitHub
parent 91ab2370fa
commit 9740b9d392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 20 additions and 0 deletions

View file

@ -39,6 +39,14 @@
color: var(--color-text);
}
.suspended {
background: var(--color-error-container);
color: var(--color-text);
font: var(--font-label-medium);
padding: _.unit(0.5) _.unit(1.5);
border-radius: 10px;
}
.username {
color: var(--color-text-secondary);
font: var(--font-subhead-2);

View file

@ -105,6 +105,9 @@ const UserDetails = () => {
<div className={styles.metadata}>
<div className={styles.name}>{data.name ?? '-'}</div>
<div>
{data.isSuspended && (
<div className={styles.suspended}>{t('user_details.suspended')}</div>
)}
{data.username && (
<>
<div className={styles.username}>{data.username}</div>

View file

@ -347,6 +347,7 @@ describe('adminUserRoutes', () => {
expect(response.status).toEqual(200);
expect(response.body).toEqual({
...mockUserResponse,
isSuspended: true,
});
});

View file

@ -36,6 +36,7 @@ const user_details = {
deletion_confirmation:
'Du entfernst die bestehende <name/> Identität. Bist du sicher, dass du das tun willst?',
},
suspended: 'Suspended', // UNTRANSLATED
};
export default user_details;

View file

@ -34,6 +34,7 @@ const user_details = {
deletion_confirmation:
'You are removing the existing <name/> identity. Are you sure you want to do that?',
},
suspended: 'Suspended',
};
export default user_details;

View file

@ -36,6 +36,7 @@ const user_details = {
deletion_confirmation:
"Vous supprimez l'identité existante <nom/>. Etes-vous sûr de vouloir faire ça ?",
},
suspended: 'Suspended', // UNTRANSLATED
};
export default user_details;

View file

@ -33,6 +33,7 @@ const user_details = {
not_connected: '이 사용자는 아직 소셜에 연동되지 않았아요.',
deletion_confirmation: '<name/> 신원을 삭제하려고 해요. 정말로 진행할까요?',
},
suspended: 'Suspended', // UNTRANSLATED
};
export default user_details;

View file

@ -36,6 +36,7 @@ const user_details = {
deletion_confirmation:
'Está removendo a identidade <name/> existente. Tem a certeza que deseja fazer isso?',
},
suspended: 'Suspended', // UNTRANSLATED
};
export default user_details;

View file

@ -34,6 +34,7 @@ const user_details = {
deletion_confirmation:
'Mevcut <name/> kimliğini kaldırıyorsunuz. Bunu yapmak istediğinizden emin misiniz?',
},
suspended: 'Suspended', // UNTRANSLATED
};
export default user_details;

View file

@ -32,6 +32,7 @@ const user_details = {
not_connected: '该用户还没有绑定社交帐号',
deletion_confirmation: '你在正要删除现有的 <name /> 身份,是否确认?',
},
suspended: '已禁用',
};
export default user_details;

View file

@ -13,6 +13,7 @@ export const userInfoSelectFields = Object.freeze([
'lastSignInAt',
'createdAt',
'applicationId',
'isSuspended',
] as const);
export type UserInfo<Keys extends keyof CreateUser = typeof userInfoSelectFields[number]> = Pick<