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:
parent
91ab2370fa
commit
9740b9d392
11 changed files with 20 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -347,6 +347,7 @@ describe('adminUserRoutes', () => {
|
|||
expect(response.status).toEqual(200);
|
||||
expect(response.body).toEqual({
|
||||
...mockUserResponse,
|
||||
isSuspended: true,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -33,6 +33,7 @@ const user_details = {
|
|||
not_connected: '이 사용자는 아직 소셜에 연동되지 않았아요.',
|
||||
deletion_confirmation: '<name/> 신원을 삭제하려고 해요. 정말로 진행할까요?',
|
||||
},
|
||||
suspended: 'Suspended', // UNTRANSLATED
|
||||
};
|
||||
|
||||
export default user_details;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -32,6 +32,7 @@ const user_details = {
|
|||
not_connected: '该用户还没有绑定社交帐号',
|
||||
deletion_confirmation: '你在正要删除现有的 <name /> 身份,是否确认?',
|
||||
},
|
||||
suspended: '已禁用',
|
||||
};
|
||||
|
||||
export default user_details;
|
||||
|
|
|
@ -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<
|
||||
|
|
Loading…
Reference in a new issue