{icon &&
{icon}
}
-
+
{to && (
div.loading {
display: flex;
background: none;
- height: 50px;
+ height: 40px;
border-radius: unset;
.avatar {
- width: 50px;
- height: 50px;
+ width: 40px;
+ height: 40px;
border-radius: _.unit(2);
margin-right: _.unit(4);
background: var(--color-neutral-95);
@@ -20,14 +20,15 @@ td > div.loading {
.title {
background: var(--color-neutral-95);
border-radius: _.unit(2);
- height: 16px;
- margin: _.unit(2) 0;
+ height: 14px;
+ margin: _.unit(1) 0;
}
.subTitle {
background: var(--color-neutral-95);
border-radius: _.unit(2);
height: 12px;
+ margin-top: _.unit(2);
}
}
}
diff --git a/packages/console/src/pages/ApiResources/index.module.scss b/packages/console/src/pages/ApiResources/index.module.scss
index 4ce7f6326..1122ae523 100644
--- a/packages/console/src/pages/ApiResources/index.module.scss
+++ b/packages/console/src/pages/ApiResources/index.module.scss
@@ -1,5 +1,9 @@
@use '@/scss/underscore' as _;
+.card {
+ @include _.flex-column;
+}
+
.headline {
display: flex;
justify-content: space-between;
@@ -7,18 +11,7 @@
.table {
margin-top: _.unit(4);
-
- tbody {
- max-height: calc(100vh - _.unit(64));
-
- tr.clickable {
- cursor: pointer;
-
- &:hover {
- background: var(--color-table-row-selected);
- }
- }
- }
+ flex: 1;
}
.apiResourceName {
diff --git a/packages/console/src/pages/ApiResources/index.tsx b/packages/console/src/pages/ApiResources/index.tsx
index 2b99a6132..c5c5e5e28 100644
--- a/packages/console/src/pages/ApiResources/index.tsx
+++ b/packages/console/src/pages/ApiResources/index.tsx
@@ -1,5 +1,6 @@
import { Resource } from '@logto/schemas';
import { conditional } from '@silverhand/essentials/lib/utilities/conditional.js';
+import classNames from 'classnames';
import React, { useState } from 'react';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
@@ -18,6 +19,7 @@ import TableError from '@/components/Table/TableError';
import TableLoading from '@/components/Table/TableLoading';
import { RequestError } from '@/hooks/use-api';
import * as modalStyles from '@/scss/modal.module.scss';
+import * as tableStyles from '@/scss/table.module.scss';
import CreateForm from './components/CreateForm';
import * as styles from './index.module.scss';
@@ -32,7 +34,7 @@ const ApiResources = () => {
const navigate = useNavigate();
return (
-
+
-
-
-
-
-
-
-
- {t('api_resources.api_name')} |
- {t('api_resources.api_identifier')} |
-
-
-
- {error && (
- mutate(undefined, true)}
- />
- )}
- {isLoading && }
- {data?.length === 0 && (
-
-
- )}
- {data?.map(({ id, name, indicator }) => (
- {
- navigate(buildDetailsLink(id));
- }}
- >
-
- } to={buildDetailsLink(id)} />
- |
-
-
- |
+
+
+
+
+
+
+
+
+ {t('api_resources.api_name')} |
+ {t('api_resources.api_identifier')} |
- ))}
-
-
+
+
+ {error && (
+ mutate(undefined, true)}
+ />
+ )}
+ {isLoading && }
+ {data?.length === 0 && (
+
+
+ )}
+ {data?.map(({ id, name, indicator }) => (
+ {
+ navigate(buildDetailsLink(id));
+ }}
+ >
+
+ } to={buildDetailsLink(id)} />
+ |
+
+
+ |
+
+ ))}
+
+
+
);
};
diff --git a/packages/console/src/pages/Applications/index.module.scss b/packages/console/src/pages/Applications/index.module.scss
index 97ea6d9e4..e1e6c4560 100644
--- a/packages/console/src/pages/Applications/index.module.scss
+++ b/packages/console/src/pages/Applications/index.module.scss
@@ -1,5 +1,9 @@
@use '@/scss/underscore' as _;
+.card {
+ @include _.flex-column;
+}
+
.headline {
display: flex;
justify-content: space-between;
@@ -7,18 +11,7 @@
.table {
margin-top: _.unit(4);
-
- tbody {
- max-height: calc(100vh - _.unit(64));
-
- tr.clickable {
- cursor: pointer;
-
- &:hover {
- background: var(--color-table-row-selected);
- }
- }
- }
+ flex: 1;
}
.applicationName {
diff --git a/packages/console/src/pages/Applications/index.tsx b/packages/console/src/pages/Applications/index.tsx
index f359a57ba..47a0c9938 100644
--- a/packages/console/src/pages/Applications/index.tsx
+++ b/packages/console/src/pages/Applications/index.tsx
@@ -1,5 +1,6 @@
import { Application } from '@logto/schemas';
import { conditional } from '@silverhand/essentials/lib/utilities/conditional.js';
+import classNames from 'classnames';
import React, { useState } from 'react';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
@@ -18,6 +19,7 @@ import TableError from '@/components/Table/TableError';
import TableLoading from '@/components/Table/TableLoading';
import { RequestError } from '@/hooks/use-api';
import * as modalStyles from '@/scss/modal.module.scss';
+import * as tableStyles from '@/scss/table.module.scss';
import { applicationTypeI18nKey } from '@/types/applications';
import CreateForm from './components/CreateForm';
@@ -31,7 +33,7 @@ const Applications = () => {
const navigate = useNavigate();
return (
-
+
-
-
-
-
-
-
-
- {t('applications.application_name')} |
- {t('applications.client_id')} |
-
-
-
- {error && (
- mutate(undefined, true)}
- />
- )}
- {isLoading && }
- {data?.length === 0 && (
-
-
- )}
- {data?.map(({ id, name, type }) => (
- {
- navigate(`/applications/${id}`);
- }}
- >
-
- }
- to={`/applications/${id}`}
- />
- |
-
-
- |
+
+
+
+
+
+
+
+
+ {t('applications.application_name')} |
+ {t('applications.client_id')} |
- ))}
-
-
+
+
+ {error && (
+ mutate(undefined, true)}
+ />
+ )}
+ {isLoading && }
+ {data?.length === 0 && (
+
+
+ )}
+ {data?.map(({ id, name, type }) => (
+ {
+ navigate(`/applications/${id}`);
+ }}
+ >
+
+ }
+ to={`/applications/${id}`}
+ />
+ |
+
+
+ |
+
+ ))}
+
+
+
);
};
diff --git a/packages/console/src/pages/Connectors/index.module.scss b/packages/console/src/pages/Connectors/index.module.scss
index 784d4443b..29af73133 100644
--- a/packages/console/src/pages/Connectors/index.module.scss
+++ b/packages/console/src/pages/Connectors/index.module.scss
@@ -1,5 +1,9 @@
@use '@/scss/underscore' as _;
+.card {
+ @include _.flex-column;
+}
+
.headline {
display: flex;
justify-content: space-between;
@@ -11,18 +15,7 @@
.table {
margin-top: _.unit(4);
-
- tbody {
- max-height: calc(100vh - _.unit(74));
-
- tr.clickable {
- cursor: pointer;
-
- &:hover {
- background: var(--color-table-row-selected);
- }
- }
- }
+ flex: 1;
}
.connectorName {
diff --git a/packages/console/src/pages/Connectors/index.tsx b/packages/console/src/pages/Connectors/index.tsx
index 2c8fcdc68..d2efd4f1a 100644
--- a/packages/console/src/pages/Connectors/index.tsx
+++ b/packages/console/src/pages/Connectors/index.tsx
@@ -1,4 +1,5 @@
import { ConnectorDTO, ConnectorType } from '@logto/schemas';
+import classNames from 'classnames';
import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation } from 'react-router-dom';
@@ -12,6 +13,7 @@ import TableEmpty from '@/components/Table/TableEmpty';
import TableError from '@/components/Table/TableError';
import TableLoading from '@/components/Table/TableLoading';
import { RequestError } from '@/hooks/use-api';
+import * as tableStyles from '@/scss/table.module.scss';
import ConnectorRow from './components/ConnectorRow';
import SetupModal from './components/SetupModal';
@@ -49,7 +51,7 @@ const Connectors = () => {
return (
<>
-
+
{isSocial && (
@@ -66,54 +68,60 @@ const Connectors = () => {
{t('connectors.tab_email_sms')}
{t('connectors.tab_social')}
-
-
-
-
-
-
-
-
- {t('connectors.connector_name')} |
- {t('connectors.connector_type')} |
- {t('connectors.connector_status')} |
-
-
-
- {error && (
- mutate(undefined, true)}
- />
- )}
- {isLoading && }
- {socialConnectors?.length === 0 && (
-
-
-
- )}
- {!isLoading && !isSocial && (
- {
- setCreateType(ConnectorType.Email);
- }}
- />
- )}
- {!isLoading && !isSocial && (
-
- )}
- {socialConnectors?.map((connector) => (
-
- ))}
-
-
+
+
+
+
+
+
+
+
+
+ {t('connectors.connector_name')} |
+ {t('connectors.connector_type')} |
+ {t('connectors.connector_status')} |
+
+
+
+ {error && (
+ mutate(undefined, true)}
+ />
+ )}
+ {isLoading && }
+ {socialConnectors?.length === 0 && (
+
+
+
+ )}
+ {!isLoading && !isSocial && (
+ {
+ setCreateType(ConnectorType.Email);
+ }}
+ />
+ )}
+ {!isLoading && !isSocial && (
+
+ )}
+ {socialConnectors?.map((connector) => (
+
+ ))}
+
+
+
{data && (
{
{users?.map(({ id, name, username }) => (
{
navigate(`/users/${id}`);
}}
@@ -116,8 +116,9 @@ const Users = () => {
}
+ icon={}
to={`/users/${id}`}
+ size="compact"
/>
Application |
diff --git a/packages/console/src/scss/_colors.scss b/packages/console/src/scss/_colors.scss
index dad4541b3..42d47111a 100644
--- a/packages/console/src/scss/_colors.scss
+++ b/packages/console/src/scss/_colors.scss
@@ -83,6 +83,7 @@
--color-code-comment: #66bb6a;
--color-surface-3: #e3dff5;
--color-surface-5: #dfd9f5;
+ --shadow-light-s1: 0 2px 8px rgba(0, 0, 0, 8%);
--shadow-light-s2: 0 4px 12px rgba(0, 0, 0, 12%);
}
diff --git a/packages/console/src/scss/_underscore.scss b/packages/console/src/scss/_underscore.scss
index 56476b8df..514929398 100644
--- a/packages/console/src/scss/_underscore.scss
+++ b/packages/console/src/scss/_underscore.scss
@@ -7,8 +7,8 @@
@mixin flex-column {
display: flex;
flex-direction: column;
- align-items: center;
justify-content: center;
+ height: 100%;
}
@mixin text-ellipsis {
diff --git a/packages/console/src/scss/normalized.scss b/packages/console/src/scss/normalized.scss
index eca34e64e..a7daac33f 100644
--- a/packages/console/src/scss/normalized.scss
+++ b/packages/console/src/scss/normalized.scss
@@ -30,30 +30,27 @@ table {
th {
font: var(--font-subhead-2);
color: var(--color-component-caption);
- padding: _.unit(3) _.unit(4);
+ padding: _.unit(2);
border-bottom: 1px solid var(--color-neutral-90);
text-align: left;
+ &:first-child,
+ &:last-child {
+ padding: _.unit(2) _.unit(8);
+ }
+ }
+ }
+
+ tbody {
+ td {
+ font: var(--font-body-medium);
+ border-bottom: 1px solid var(--color-neutral-90);
+ padding: _.unit(3) _.unit(2);
+
&:first-child,
&:last-child {
padding: _.unit(3) _.unit(8);
}
}
}
-
- tbody {
- td {
- border-bottom: 1px solid var(--color-neutral-90);
- padding: _.unit(5) _.unit(4);
-
- &:first-child,
- &:last-child {
- padding: _.unit(5) _.unit(8);
- }
- }
- }
-
- tr:last-child td {
- border-bottom: none;
- }
}
diff --git a/packages/console/src/scss/table.module.scss b/packages/console/src/scss/table.module.scss
index 5f0975641..cf9dd2e32 100644
--- a/packages/console/src/scss/table.module.scss
+++ b/packages/console/src/scss/table.module.scss
@@ -1,13 +1,26 @@
@use '@/scss/underscore' as _;
+.base {
+ box-shadow: var(--shadow-light-s1);
+}
+
+tr.clickable {
+ cursor: pointer;
+
+ &:hover {
+ background: var(--color-table-row-selected);
+ }
+}
+
.scrollable {
- margin-top: _.unit(4);
overflow-y: auto;
border: 1px solid var(--color-neutral-90);
border-radius: _.unit(2);
+ box-shadow: var(--shadow-light-s1);
table {
border: none;
+ box-shadow: none;
thead tr {
position: sticky;