update wallpapers ui

This commit is contained in:
Gamebrary 2021-02-03 15:57:07 -07:00
parent e9465e0b72
commit 2169602092

View file

@ -15,6 +15,19 @@
{{ $t('wallpapers.title') }}
</h3>
<div class="space-used ml-auto mr-3 pt-3">
<small class="d-block text-center" :class="{ 'text-danger': outOfSpace }">
{{ formattedSpaceUsed }} of {{ bytesToSize(maxSpace) }} used
</small>
<b-progress
:value="spaceUsed"
:max="maxSpace"
:variant="outOfSpace ? 'danger' : 'success'"
class="mb-3"
/>
</div>
<b-button
variant="primary"
:disabled="outOfSpace"
@ -38,24 +51,16 @@
{{ $t('wallpapers.form.duplicateMessage', { fileName: file.name }) }}
</b-alert>
<small class="d-block text-center" :class="{ 'text-danger': outOfSpace }">
{{ formattedSpaceUsed }} of {{ bytesToSize(maxSpace) }} used
</small>
<b-progress
:value="spaceUsed"
:max="maxSpace"
:variant="outOfSpace ? 'danger' : 'success'"
class="mb-3"
/>
<b-card
<div
v-if="wallpapers.length"
class="wallpapers"
>
<b-card
v-for="wallpaper in wallpapers"
:key="wallpaper.name"
:img-src="wallpaper.url"
:img-alt="wallpaper.name"
img-left
img-top
bg-variant="transparent"
img-width="180"
class="mb-3 overflow-hidden word-wrap"
@ -76,6 +81,7 @@
<i class="fas fa-trash-alt fa-fw" aria-hidden />
</b-button>
</b-card>
</div>
<b-alert show v-else>You don't have any wallpapers.</b-alert>
</template>
@ -219,4 +225,22 @@ export default {
bottom: .5rem;
right: .5rem;
}
.space-used {
width: 120px;
}
.wallpapers {
display: grid;
grid-column-gap: 1rem;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
@media(max-width: 1024px) {
grid-template-columns: 1fr 1fr 1fr;
}
@media(max-width: 720px) {
grid-template-columns: 1fr 1fr;
}
}
</style>