Skip to content

Commit 609aa9b

Browse files
EstrellaXDclaude
andcommitted
fix(ui): unify action bar button sizes in downloader page
Add size="small" to Resume, Pause, and Delete buttons in the torrent action bar for consistent button heights. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5064d42 commit 609aa9b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

webui/src/pages/index/downloader.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="tsx" setup>
2-
import { NDataTable, NProgress, type DataTableColumns } from 'naive-ui';
2+
import { type DataTableColumns, NDataTable, NProgress } from 'naive-ui';
33
import type { QbTorrentInfo, TorrentGroup } from '#/downloader';
44
55
definePage({
@@ -43,12 +43,12 @@ function formatSize(bytes: number): string {
4343
if (bytes === 0) return '0 B';
4444
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
4545
const i = Math.floor(Math.log(bytes) / Math.log(1024));
46-
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + units[i];
46+
return `${(bytes / 1024**i).toFixed(1) } ${ units[i]}`;
4747
}
4848
4949
function formatSpeed(bytesPerSec: number): string {
5050
if (bytesPerSec === 0) return '-';
51-
return formatSize(bytesPerSec) + '/s';
51+
return `${formatSize(bytesPerSec) }/s`;
5252
}
5353
5454
function formatEta(seconds: number): string {
@@ -255,9 +255,9 @@ function groupCheckedKeys(group: TorrentGroup): string[] {
255255
{{ selectedHashes.length }} {{ $t('downloader.selected') }}
256256
</span>
257257
<div class="action-bar-buttons">
258-
<ab-button @click="resumeSelected">{{ $t('downloader.action.resume') }}</ab-button>
259-
<ab-button @click="pauseSelected">{{ $t('downloader.action.pause') }}</ab-button>
260-
<ab-button type="warn" @click="deleteSelected(false)">{{ $t('downloader.action.delete') }}</ab-button>
258+
<ab-button size="small" @click="resumeSelected">{{ $t('downloader.action.resume') }}</ab-button>
259+
<ab-button size="small" @click="pauseSelected">{{ $t('downloader.action.pause') }}</ab-button>
260+
<ab-button size="small" type="warn" @click="deleteSelected(false)">{{ $t('downloader.action.delete') }}</ab-button>
261261
</div>
262262
</div>
263263
</Transition>

0 commit comments

Comments
 (0)