fix(history): align mobile toolbar icon size

This commit is contained in:
jxxghp
2026-09-03 07:44:51 +08:00
parent 849a43bed7
commit 880ac5c20d
2 changed files with 26 additions and 9 deletions
+8 -8
View File
@@ -1939,19 +1939,18 @@ onUnmounted(() => {
style="margin-block: 0"
/>
<div class="transfer-history-mobile-titlebar__actions">
<VBtn
icon="mdi-filter-multiple-outline"
<IconBtn
:color="statusFilterButtonColor"
:aria-label="t('transferHistory.statusFilter.label')"
:title="t('transferHistory.statusFilter.label')"
variant="text"
class="settings-icon-button"
data-menu-activator="history-status-filter-btn"
@click="mobileStatusFilterMenu = true"
/>
<VBtn
>
<VIcon icon="mdi-filter-multiple-outline" />
</IconBtn>
<IconBtn
v-if="canManage"
icon="mdi-checkbox-multiple-marked-outline"
:color="mobileBatchMode ? 'primary' : 'gray'"
:aria-label="
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
@@ -1960,9 +1959,10 @@ onUnmounted(() => {
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
"
variant="text"
class="settings-icon-button"
@click="toggleMobileBatchMode"
/>
>
<VIcon icon="mdi-checkbox-multiple-marked-outline" />
</IconBtn>
</div>
</div>
@@ -229,6 +229,14 @@ const PassthroughStub = defineComponent({
},
})
const IconButtonStub = defineComponent({
name: 'IconBtn',
inheritAttrs: false,
setup(_props, { attrs, slots }) {
return () => h('button', { ...attrs, type: 'button' }, slots.default?.())
},
})
const EmptyStub = defineComponent({
inheritAttrs: false,
setup() {
@@ -338,7 +346,7 @@ async function renderHistory(initialRoute = '/history') {
VDataTableVirtual: HistoryTableStub,
VImg: ImageStub,
VInfiniteScroll: InfiniteScrollStub,
IconBtn: PassthroughStub,
IconBtn: IconButtonStub,
VList: PassthroughStub,
VListItem: ListItemStub,
VListItemTitle: ListItemTitleStub,
@@ -439,6 +447,11 @@ describe('TransferHistoryView', () => {
})
it('joins the desktop status filter to search and moves the mobile filter into the titlebar menu', () => {
const mobileTitlebarSource = transferHistorySource.slice(
transferHistorySource.indexOf('<div class="transfer-history-mobile-titlebar__actions">'),
transferHistorySource.indexOf('<VCombobox\n key="search_mobile"'),
)
expect(transferHistorySource).toContain('class="transfer-history-desktop-filter-group"')
expect(transferHistorySource).toContain('class="text-disabled transfer-history-desktop-search"')
expect(transferHistorySource).toContain('class="transfer-history-desktop-status"')
@@ -446,6 +459,10 @@ describe('TransferHistoryView', () => {
expect(transferHistorySource).toContain('border-start-start-radius: 0;')
expect(transferHistorySource).toContain('data-menu-activator="history-status-filter-btn"')
expect(transferHistorySource).not.toContain('class="transfer-history-mobile-status"')
expect(mobileTitlebarSource.match(/<IconBtn/g)).toHaveLength(2)
expect(mobileTitlebarSource).toContain('<VIcon icon="mdi-filter-multiple-outline" />')
expect(mobileTitlebarSource).toContain('<VIcon icon="mdi-checkbox-multiple-marked-outline" />')
expect(mobileTitlebarSource).not.toContain('settings-icon-button')
})
it('selects a mobile status from the titlebar dropdown and refreshes with the explicit status query', async () => {