Skip to content

Commit 4e2b6c4

Browse files
Copilotadameat
andcommitted
Implement tablet page layout improvement: move tablet type below title
Co-authored-by: adameat <[email protected]>
1 parent 6401b22 commit 4e2b6c4

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

src/containers/Tablet/Tablet.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,11 @@
1616
&__loader {
1717
margin-left: var(--g-spacing-2);
1818
}
19+
20+
&__tablet-type {
21+
font-weight: 400;
22+
23+
color: var(--g-color-text-secondary);
24+
@include mixins.text-body-2();
25+
}
1926
}

src/containers/Tablet/Tablet.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,11 @@ export function Tablet() {
9393
);
9494
}, [dispatch, queryDatabase, id, tabletType]);
9595

96-
const {Leader, Type} = tablet;
96+
const {Leader} = tablet;
9797
const metaItems: string[] = [];
9898
if (database) {
9999
metaItems.push(`${i18n('tablet.meta-database')}: ${database}`);
100100
}
101-
if (Type) {
102-
metaItems.push(Type);
103-
}
104101
if (Leader === false) {
105102
metaItems.push(i18n('tablet.meta-follower').toUpperCase());
106103
}
@@ -135,7 +132,7 @@ function TabletContent({
135132
database?: string;
136133
}) {
137134
const isEmpty = !Object.keys(tablet).length;
138-
const {Overall, HiveId, FollowerId} = tablet;
135+
const {Overall, HiveId, FollowerId, Type} = tablet;
139136

140137
const tabletName = `${id}${FollowerId ? `.${FollowerId}` : ''}`;
141138

@@ -146,11 +143,14 @@ function TabletContent({
146143
isEmpty={isEmpty}
147144
>
148145
<Flex gap={5} direction="column">
149-
<EntityPageTitle
150-
entityName={i18n('tablet.header')}
151-
status={Overall ?? EFlag.Grey}
152-
id={tabletName}
153-
/>
146+
<Flex gap={2} direction="column">
147+
<EntityPageTitle
148+
entityName={i18n('tablet.header')}
149+
status={Overall ?? EFlag.Grey}
150+
id={tabletName}
151+
/>
152+
{Type && <div className={b('tablet-type')}>{Type}</div>}
153+
</Flex>
154154
<TabletControls tablet={tablet} />
155155
<TabletInfo tablet={tablet} />
156156
</Flex>

0 commit comments

Comments
 (0)