refactor(webui): use breakpoint conditionals

This commit is contained in:
Gauthier Roebroeck 2022-02-21 11:11:22 +08:00
parent 70a546f19c
commit 50ab60fc59
5 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
<template>
<div :style="$vuetify.breakpoint.name === 'xs' ? 'margin-bottom: 56px' : undefined">
<div :style="$vuetify.breakpoint.xs ? 'margin-bottom: 56px' : undefined">
<toolbar-sticky v-if="selectedCollections.length === 0">
<!-- Action menu -->
<library-actions-menu v-if="library"

View file

@ -1,5 +1,5 @@
<template>
<div :style="$vuetify.breakpoint.name === 'xs' ? 'margin-bottom: 56px' : undefined">
<div :style="$vuetify.breakpoint.xs ? 'margin-bottom: 56px' : undefined">
<toolbar-sticky v-if="selectedSeries.length === 0">
<!-- Action menu -->
<library-actions-menu v-if="library"

View file

@ -1,5 +1,5 @@
<template>
<div :style="$vuetify.breakpoint.name === 'xs' ? 'margin-bottom: 56px' : undefined">
<div :style="$vuetify.breakpoint.xs ? 'margin-bottom: 56px' : undefined">
<toolbar-sticky v-if="selectedReadLists.length === 0">
<!-- Action menu -->
<library-actions-menu v-if="library"

View file

@ -1,5 +1,5 @@
<template>
<div :style="$vuetify.breakpoint.name === 'xs' ? 'margin-bottom: 56px' : undefined">
<div :style="$vuetify.breakpoint.xs ? 'margin-bottom: 56px' : undefined">
<toolbar-sticky v-if="individualLibrary && selectedSeries.length === 0">
<!-- Action menu -->
<library-actions-menu v-if="library"
@ -311,7 +311,7 @@ export default Vue.extend({
return this.$store.getters.meAdmin
},
fixedCardWidth(): number {
return this.$vuetify.breakpoint.name === 'xs' ? 120 : 150
return this.$vuetify.breakpoint.xs ? 120 : 150
},
allEmpty(): boolean {
return this.loaderNewSeries?.items.length === 0 &&

View file

@ -249,7 +249,7 @@ export default Vue.extend({
return this.$store.getters.meAdmin
},
fixedCardWidth(): number {
return this.$vuetify.breakpoint.name === 'xs' ? 120 : 150
return this.$vuetify.breakpoint.xs ? 120 : 150
},
showToolbar(): boolean {
return this.selectedSeries.length === 0 && this.selectedBooks.length === 0 && this.selectedCollections.length === 0 && this.selectedReadLists.length === 0