From eabfa90121edf39ca20ad9870b1423d3379ab91b Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 13 Jul 2024 15:26:07 -0500 Subject: [PATCH] Update:Move library stats page to SideRail #3134 --- client/components/app/ConfigSideNav.vue | 6 +- client/components/app/SideRail.vue | 13 +- client/pages/config.vue | 3 +- client/pages/config/library-stats.vue | 175 ----------------------- client/pages/library/_library/stats.vue | 181 ++++++++++++++++++++++++ client/strings/en-us.json | 1 + server/Server.js | 1 + 7 files changed, 199 insertions(+), 181 deletions(-) delete mode 100644 client/pages/config/library-stats.vue create mode 100644 client/pages/library/_library/stats.vue diff --git a/client/components/app/ConfigSideNav.vue b/client/components/app/ConfigSideNav.vue index b4835255..2b46eb7c 100644 --- a/client/components/app/ConfigSideNav.vue +++ b/client/components/app/ConfigSideNav.vue @@ -114,9 +114,9 @@ export default { if (this.currentLibraryId) { configRoutes.push({ - id: 'config-library-stats', + id: 'library-stats', title: this.$strings.HeaderLibraryStats, - path: '/config/library-stats' + path: `/library/${this.currentLibraryId}/stats` }) configRoutes.push({ id: 'config-stats', @@ -182,4 +182,4 @@ export default { } } } - \ No newline at end of file + diff --git a/client/components/app/SideRail.vue b/client/components/app/SideRail.vue index 7475f7ed..2c1538ec 100644 --- a/client/components/app/SideRail.vue +++ b/client/components/app/SideRail.vue @@ -79,6 +79,14 @@
+ + monitoring + +

{{ $strings.ButtonStats }}

+ +
+ + @@ -103,7 +111,7 @@
- + warning

{{ $strings.ButtonIssues }}

@@ -194,6 +202,9 @@ export default { isPlaylistsPage() { return this.paramId === 'playlists' }, + isStatsPage() { + return this.$route.name === 'library-library-stats' + }, libraryBookshelfPage() { return this.$route.name === 'library-library-bookshelf-id' }, diff --git a/client/pages/config.vue b/client/pages/config.vue index 957cef52..4492bbfd 100644 --- a/client/pages/config.vue +++ b/client/pages/config.vue @@ -52,7 +52,6 @@ export default { else if (pageName === 'notifications') return this.$strings.HeaderNotifications else if (pageName === 'sessions') return this.$strings.HeaderListeningSessions else if (pageName === 'stats') return this.$strings.HeaderYourStats - else if (pageName === 'library-stats') return this.$strings.HeaderLibraryStats else if (pageName === 'users') return this.$strings.HeaderUsers else if (pageName === 'item-metadata-utils') return this.$strings.HeaderItemMetadataUtils else if (pageName === 'rss-feeds') return this.$strings.HeaderRSSFeeds @@ -94,4 +93,4 @@ export default { max-width: 100%; } } - \ No newline at end of file + diff --git a/client/pages/config/library-stats.vue b/client/pages/config/library-stats.vue deleted file mode 100644 index 1a95c630..00000000 --- a/client/pages/config/library-stats.vue +++ /dev/null @@ -1,175 +0,0 @@ - - - diff --git a/client/pages/library/_library/stats.vue b/client/pages/library/_library/stats.vue new file mode 100644 index 00000000..7cd97248 --- /dev/null +++ b/client/pages/library/_library/stats.vue @@ -0,0 +1,181 @@ + + + diff --git a/client/strings/en-us.json b/client/strings/en-us.json index f39901b6..eaaa5d7c 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -89,6 +89,7 @@ "ButtonShow": "Show", "ButtonStartM4BEncode": "Start M4B Encode", "ButtonStartMetadataEmbed": "Start Metadata Embed", + "ButtonStats": "Stats", "ButtonSubmit": "Submit", "ButtonTest": "Test", "ButtonUpload": "Upload", diff --git a/server/Server.js b/server/Server.js index 76d8466d..8649c5ad 100644 --- a/server/Server.js +++ b/server/Server.js @@ -285,6 +285,7 @@ class Server { '/library/:library/bookshelf/:id?', '/library/:library/authors', '/library/:library/narrators', + '/library/:library/stats', '/library/:library/series/:id?', '/library/:library/podcast/search', '/library/:library/podcast/latest',