mirror of
https://github.com/logto-io/logto.git
synced 2025-02-24 22:05:56 -05:00
Merge pull request #1072 from logto-io/charles-log-2881-improve-table-error-display
refactor(console): table error display
This commit is contained in:
commit
2db7e6af21
9 changed files with 18 additions and 15 deletions
|
@ -1,8 +1,10 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
|
||||
.tableEmpty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: _.unit(4) 0;
|
||||
text-align: center;
|
||||
|
||||
.title {
|
||||
font: var(--font-subhead-2);
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
|
||||
.tableError {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.image {
|
||||
text-align: center;
|
||||
> *:not(:first-child) {
|
||||
margin-top: _.unit(2);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font: var(--font-subhead-2);
|
||||
margin-bottom: _.unit(2);
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
font: var(--font-body-medium);
|
||||
color: var(--color-neutral-50);
|
||||
margin-bottom: _.unit(2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,9 +20,7 @@ const TableError = ({ title, content, onRetry, columns }: Props) => {
|
|||
<tr>
|
||||
<td colSpan={columns}>
|
||||
<div className={styles.tableError}>
|
||||
<div className={styles.image}>
|
||||
<img src={ErrorImage} />
|
||||
</div>
|
||||
<img src={ErrorImage} />
|
||||
<div className={styles.title}>
|
||||
{title ?? t('admin_console.errors.something_went_wrong')}
|
||||
</div>
|
||||
|
|
|
@ -73,7 +73,7 @@ const ApiResources = () => {
|
|||
</Modal>
|
||||
</div>
|
||||
<div className={classNames(styles.table, tableStyles.scrollable)}>
|
||||
<table>
|
||||
<table className={classNames(!data && tableStyles.empty)}>
|
||||
<colgroup>
|
||||
<col className={styles.apiResourceName} />
|
||||
<col />
|
||||
|
|
|
@ -70,7 +70,7 @@ const Applications = () => {
|
|||
</Modal>
|
||||
</div>
|
||||
<div className={classNames(styles.table, tableStyles.scrollable)}>
|
||||
<table>
|
||||
<table className={classNames(!data && tableStyles.empty)}>
|
||||
<colgroup>
|
||||
<col className={styles.applicationName} />
|
||||
<col />
|
||||
|
|
|
@ -64,7 +64,7 @@ const AuditLogs = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div className={classNames(styles.table, tableStyles.scrollable)}>
|
||||
<table>
|
||||
<table className={classNames(!data && tableStyles.empty)}>
|
||||
<colgroup>
|
||||
<col className={styles.eventName} />
|
||||
<col />
|
||||
|
|
|
@ -72,7 +72,7 @@ const Connectors = () => {
|
|||
<TabNavItem href="/connectors/social">{t('connectors.tab_social')}</TabNavItem>
|
||||
</TabNav>
|
||||
<div className={classNames(styles.table, tableStyles.scrollable)}>
|
||||
<table>
|
||||
<table className={classNames(!data && tableStyles.empty)}>
|
||||
<colgroup>
|
||||
<col className={styles.connectorName} />
|
||||
<col />
|
||||
|
|
|
@ -81,7 +81,7 @@ const Users = () => {
|
|||
/>
|
||||
</div>
|
||||
<div className={classNames(styles.table, tableStyles.scrollable)}>
|
||||
<table>
|
||||
<table className={classNames(!data && tableStyles.empty)}>
|
||||
<colgroup>
|
||||
<col className={styles.userName} />
|
||||
<col />
|
||||
|
|
|
@ -31,3 +31,7 @@ tr.clickable {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue