chore: make buttons tiny

This commit is contained in:
JustSong
2025-02-02 13:14:52 +08:00
parent d0965050a9
commit a01d769a83
4 changed files with 43 additions and 36 deletions

View File

@@ -325,7 +325,9 @@ const ChannelsTable = () => {
newChannels[realIdx].response_time = time * 1000;
newChannels[realIdx].test_time = Date.now() / 1000;
setChannels(newChannels);
showSuccess(t('channel.messages.test_success', { name, model, time, message }));
showSuccess(
t('channel.messages.test_success', { name, model, time, message })
);
} else {
showError(message);
}
@@ -350,7 +352,9 @@ const ChannelsTable = () => {
const res = await API.delete(`/api/channel/disabled`);
const { success, message, data } = res.data;
if (success) {
showSuccess(t('channel.messages.delete_disabled_success', { count: data }));
showSuccess(
t('channel.messages.delete_disabled_success', { count: data })
);
await refresh();
} else {
showError(message);
@@ -591,7 +595,7 @@ const ChannelsTable = () => {
<Table.Cell>
<div>
<Button
size={'small'}
size={'tiny'}
positive
onClick={() => {
testChannel(
@@ -606,7 +610,7 @@ const ChannelsTable = () => {
</Button>
<Popup
trigger={
<Button size='small' negative>
<Button size='tiny' negative>
{t('channel.buttons.delete')}
</Button>
}
@@ -615,6 +619,7 @@ const ChannelsTable = () => {
hoverable
>
<Button
size={'tiny'}
negative
onClick={() => {
manageChannel(channel.id, 'delete', idx);
@@ -624,7 +629,7 @@ const ChannelsTable = () => {
</Button>
</Popup>
<Button
size={'small'}
size={'tiny'}
onClick={() => {
manageChannel(
channel.id,
@@ -638,7 +643,7 @@ const ChannelsTable = () => {
: t('channel.buttons.enable')}
</Button>
<Button
size={'small'}
size={'tiny'}
as={Link}
to={'/channel/edit/' + channel.id}
>
@@ -654,16 +659,11 @@ const ChannelsTable = () => {
<Table.Footer>
<Table.Row>
<Table.HeaderCell colSpan={showDetail ? '10' : '8'}>
<Button
size='small'
as={Link}
to='/channel/add'
loading={loading}
>
<Button size='tiny' as={Link} to='/channel/add' loading={loading}>
{t('channel.buttons.add')}
</Button>
<Button
size='small'
size='tiny'
loading={loading}
onClick={() => {
testChannels('all');
@@ -672,7 +672,7 @@ const ChannelsTable = () => {
{t('channel.buttons.test_all')}
</Button>
<Button
size='small'
size='tiny'
loading={loading}
onClick={() => {
testChannels('disabled');
@@ -682,7 +682,7 @@ const ChannelsTable = () => {
</Button>
<Popup
trigger={
<Button size='small' loading={loading}>
<Button size='tiny' loading={loading}>
{t('channel.buttons.delete_disabled')}
</Button>
}
@@ -691,7 +691,7 @@ const ChannelsTable = () => {
hoverable
>
<Button
size='small'
size='tiny'
loading={loading}
negative
onClick={deleteAllDisabledChannels}
@@ -703,17 +703,17 @@ const ChannelsTable = () => {
floated='right'
activePage={activePage}
onPageChange={onPaginationChange}
size='small'
size='tiny'
siblingRange={1}
totalPages={
Math.ceil(channels.length / ITEMS_PER_PAGE) +
(channels.length % ITEMS_PER_PAGE === 0 ? 1 : 0)
}
/>
<Button size='small' onClick={refresh} loading={loading}>
<Button size='tiny' onClick={refresh} loading={loading}>
{t('channel.buttons.refresh')}
</Button>
<Button size='small' onClick={toggleShowDetail}>
<Button size='tiny' onClick={toggleShowDetail}>
{showDetail
? t('channel.buttons.hide_detail')
: t('channel.buttons.show_detail')}