perf: improve UI

This commit is contained in:
moonrailgun 2024-01-04 00:34:50 +08:00
parent 4f5e79157a
commit deceafad4f
3 changed files with 7 additions and 7 deletions

View File

@ -10,11 +10,11 @@ export const UpDownCounter: React.FC<Props> = React.memo((props) => {
<div> <div>
<div> <div>
<CaretUpOutlined className="text-orange-500" /> <CaretUpOutlined className="text-orange-500" />
<span className="ml-1">{props.up}</span> <span className="ml-1 text-xs">{props.up}</span>
</div> </div>
<div> <div>
<CaretDownOutlined className="text-green-500" /> <CaretDownOutlined className="text-green-500" />
<span className="ml-1">{props.down}</span> <span className="ml-1 text-xs">{props.down}</span>
</div> </div>
</div> </div>
); );

View File

@ -62,7 +62,7 @@ export const WebsiteList: React.FC = React.memo(() => {
<WebsiteListTable workspaceId={workspaceId} /> <WebsiteListTable workspaceId={workspaceId} />
<Modal <Modal
title="Add Server" title="Add Website"
open={isModalOpen} open={isModalOpen}
okButtonProps={{ okButtonProps={{
loading: addWebsiteMutation.isLoading, loading: addWebsiteMutation.isLoading,
@ -72,9 +72,9 @@ export const WebsiteList: React.FC = React.memo(() => {
> >
<Form layout="vertical" form={form}> <Form layout="vertical" form={form}>
<Form.Item <Form.Item
label="Server Name" label="Website Name"
name="name" name="name"
tooltip="Server Name to Display" tooltip="Website Name to Display"
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<Input /> <Input />

View File

@ -239,7 +239,7 @@ export const ServerList: React.FC<{
width: 120, width: 120,
render: (_, record) => { render: (_, record) => {
return ( return (
<div> <div className="text-xs">
<div>{filesize(record.payload.memory_used * 1000)} / </div> <div>{filesize(record.payload.memory_used * 1000)} / </div>
<div>{filesize(record.payload.memory_total * 1000)}</div> <div>{filesize(record.payload.memory_total * 1000)}</div>
</div> </div>
@ -252,7 +252,7 @@ export const ServerList: React.FC<{
width: 120, width: 120,
render: (_, record) => { render: (_, record) => {
return ( return (
<div> <div className="text-xs">
<div>{filesize(record.payload.hdd_used * 1000 * 1000)} / </div> <div>{filesize(record.payload.hdd_used * 1000 * 1000)} / </div>
<div>{filesize(record.payload.hdd_total * 1000 * 1000)}</div> <div>{filesize(record.payload.hdd_total * 1000 * 1000)}</div>
</div> </div>