Merge pull request #759 from jmt-gh/update_stats_uis

Update Library Stats and Your Stats UIs to match other Settings UIs
This commit is contained in:
advplyr 2022-06-22 17:50:05 -05:00 committed by GitHub
commit ce961f90ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -1,10 +1,9 @@
<template> <template>
<div> <div class="bg-bg rounded-md shadow-lg border border-white border-opacity-5 p-4 mb-8">
<p class="text-xl">Stats for library {{ currentLibraryName }}</p> <h1 class="text-xl">Stats for library {{ currentLibraryName }}</h1>
<stats-preview-icons v-if="totalItems" :library-stats="libraryStats" /> <stats-preview-icons v-if="totalItems" :library-stats="libraryStats" />
<div class="flex md:flex-row flex-wrap justify-between flex-col mt-12"> <div class="flex md:flex-row flex-wrap justify-between flex-col mt-8">
<div class="w-80 my-6 mx-auto"> <div class="w-80 my-6 mx-auto">
<h1 class="text-2xl mb-4 font-book">Top 5 Genres</h1> <h1 class="text-2xl mb-4 font-book">Top 5 Genres</h1>
<p v-if="!top5Genres.length">No Genres</p> <p v-if="!top5Genres.length">No Genres</p>

View File

@ -1,5 +1,7 @@
<template> <template>
<div> <div class="bg-bg rounded-md shadow-lg border border-white border-opacity-5 p-4 mb-8">
<h1 class="text-xl">Stats for {{ username }}</h1>
<div class="flex justify-center"> <div class="flex justify-center">
<div class="flex p-2"> <div class="flex p-2">
<svg class="hidden sm:block h-14 w-14 lg:h-18 lg:w-18" viewBox="0 0 24 24"> <svg class="hidden sm:block h-14 w-14 lg:h-18 lg:w-18" viewBox="0 0 24 24">
@ -84,6 +86,9 @@ export default {
user() { user() {
return this.$store.state.user.user return this.$store.state.user.user
}, },
username() {
return this.user.username
},
currentLibraryId() { currentLibraryId() {
return this.$store.state.libraries.currentLibraryId return this.$store.state.libraries.currentLibraryId
}, },