mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-09 01:36:45 +08:00
fix(history): align mobile toolbar icon size
This commit is contained in:
@@ -1939,19 +1939,18 @@ onUnmounted(() => {
|
|||||||
style="margin-block: 0"
|
style="margin-block: 0"
|
||||||
/>
|
/>
|
||||||
<div class="transfer-history-mobile-titlebar__actions">
|
<div class="transfer-history-mobile-titlebar__actions">
|
||||||
<VBtn
|
<IconBtn
|
||||||
icon="mdi-filter-multiple-outline"
|
|
||||||
:color="statusFilterButtonColor"
|
:color="statusFilterButtonColor"
|
||||||
:aria-label="t('transferHistory.statusFilter.label')"
|
:aria-label="t('transferHistory.statusFilter.label')"
|
||||||
:title="t('transferHistory.statusFilter.label')"
|
:title="t('transferHistory.statusFilter.label')"
|
||||||
variant="text"
|
variant="text"
|
||||||
class="settings-icon-button"
|
|
||||||
data-menu-activator="history-status-filter-btn"
|
data-menu-activator="history-status-filter-btn"
|
||||||
@click="mobileStatusFilterMenu = true"
|
@click="mobileStatusFilterMenu = true"
|
||||||
/>
|
>
|
||||||
<VBtn
|
<VIcon icon="mdi-filter-multiple-outline" />
|
||||||
|
</IconBtn>
|
||||||
|
<IconBtn
|
||||||
v-if="canManage"
|
v-if="canManage"
|
||||||
icon="mdi-checkbox-multiple-marked-outline"
|
|
||||||
:color="mobileBatchMode ? 'primary' : 'gray'"
|
:color="mobileBatchMode ? 'primary' : 'gray'"
|
||||||
:aria-label="
|
:aria-label="
|
||||||
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
||||||
@@ -1960,9 +1959,10 @@ onUnmounted(() => {
|
|||||||
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
mobileBatchMode ? t('transferHistory.actions.exitBatchSelect') : t('transferHistory.actions.batchSelect')
|
||||||
"
|
"
|
||||||
variant="text"
|
variant="text"
|
||||||
class="settings-icon-button"
|
|
||||||
@click="toggleMobileBatchMode"
|
@click="toggleMobileBatchMode"
|
||||||
/>
|
>
|
||||||
|
<VIcon icon="mdi-checkbox-multiple-marked-outline" />
|
||||||
|
</IconBtn>
|
||||||
</div>
|
</div>
|
||||||
</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({
|
const EmptyStub = defineComponent({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
setup() {
|
setup() {
|
||||||
@@ -338,7 +346,7 @@ async function renderHistory(initialRoute = '/history') {
|
|||||||
VDataTableVirtual: HistoryTableStub,
|
VDataTableVirtual: HistoryTableStub,
|
||||||
VImg: ImageStub,
|
VImg: ImageStub,
|
||||||
VInfiniteScroll: InfiniteScrollStub,
|
VInfiniteScroll: InfiniteScrollStub,
|
||||||
IconBtn: PassthroughStub,
|
IconBtn: IconButtonStub,
|
||||||
VList: PassthroughStub,
|
VList: PassthroughStub,
|
||||||
VListItem: ListItemStub,
|
VListItem: ListItemStub,
|
||||||
VListItemTitle: ListItemTitleStub,
|
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', () => {
|
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="transfer-history-desktop-filter-group"')
|
||||||
expect(transferHistorySource).toContain('class="text-disabled transfer-history-desktop-search"')
|
expect(transferHistorySource).toContain('class="text-disabled transfer-history-desktop-search"')
|
||||||
expect(transferHistorySource).toContain('class="transfer-history-desktop-status"')
|
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('border-start-start-radius: 0;')
|
||||||
expect(transferHistorySource).toContain('data-menu-activator="history-status-filter-btn"')
|
expect(transferHistorySource).toContain('data-menu-activator="history-status-filter-btn"')
|
||||||
expect(transferHistorySource).not.toContain('class="transfer-history-mobile-status"')
|
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 () => {
|
it('selects a mobile status from the titlebar dropdown and refreshes with the explicit status query', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user