From 78b2101390f0b3dcf0c05ae548ebb851870797ff Mon Sep 17 00:00:00 2001 From: Greg Lorenzen Date: Sat, 3 Aug 2024 18:53:36 +0000 Subject: [PATCH 1/2] Add options for title field visibility --- .../components/content/LibraryItemDetails.vue | 19 +++--- .../modals/ItemFieldVisibilityModal.vue | 62 +++++++++++++++++++ client/pages/item/_id/index.vue | 18 ++++++ client/store/user.js | 11 ++++ client/strings/en-us.json | 3 +- 5 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 client/components/modals/ItemFieldVisibilityModal.vue diff --git a/client/components/content/LibraryItemDetails.vue b/client/components/content/LibraryItemDetails.vue index 7c6ac2222..d9d010576 100644 --- a/client/components/content/LibraryItemDetails.vue +++ b/client/components/content/LibraryItemDetails.vue @@ -1,6 +1,6 @@ -
+
{{ $strings.LabelPublishYear }}
@@ -19,7 +19,7 @@ {{ publishedYear }}
-
+
{{ $strings.LabelPublisher }}
@@ -67,7 +67,7 @@ {{ podcastType }}
-
+
{{ $strings.LabelGenres }}
@@ -78,7 +78,7 @@
-
+
{{ $strings.LabelTags }}
@@ -89,7 +89,7 @@
-
+
{{ $strings.LabelLanguage }}
@@ -97,7 +97,7 @@ {{ language }}
-
+
{{ $strings.LabelDuration }}
@@ -105,7 +105,7 @@ {{ durationPretty }}
-
+
{{ $strings.LabelSize }}
@@ -215,6 +215,9 @@ export default { }, podcastType() { return this.mediaMetadata.type + }, + fieldVisibility() { + return this.$store.getters['user/getUserSetting']('fieldVisibility') } }, methods: {}, diff --git a/client/components/modals/ItemFieldVisibilityModal.vue b/client/components/modals/ItemFieldVisibilityModal.vue new file mode 100644 index 000000000..b6410053f --- /dev/null +++ b/client/components/modals/ItemFieldVisibilityModal.vue @@ -0,0 +1,62 @@ + + + \ No newline at end of file diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 416b0e08b..ac6cca0a4 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -1,5 +1,10 @@ @@ -187,6 +193,7 @@ export default { episodesDownloading: [], episodeDownloadsQueued: [], showBookmarksModal: false, + showFieldVisibilityModal: false, isDescriptionClamped: false, showFullDescription: false } @@ -455,6 +462,12 @@ export default { }) } + return items + }, + globalItemSettingsContextMenuItems() { + const items = [] + items.push({ text: this.$strings.LabelFieldVisibility, action: 'fieldVisibility' }) + return items } }, @@ -786,6 +799,11 @@ export default { this.$store.commit('setSelectedLibraryItem', this.libraryItem) this.$store.commit('globals/setShareModal', this.mediaItemShare) } + }, + globalItemSettingsContextMenuAction({ action, data }) { + if (action === 'fieldVisibility') { + this.showFieldVisibilityModal = true + } } }, mounted() { diff --git a/client/store/user.js b/client/store/user.js index 7571f9163..9af36596d 100644 --- a/client/store/user.js +++ b/client/store/user.js @@ -17,6 +17,17 @@ export const state = () => ({ authorSortDesc: false, jumpForwardAmount: 10, jumpBackwardAmount: 10, + fieldVisibility: { + narrators: true, + publishYear: true, + publisher: true, + genres: true, + tags: true, + language: true, + duration: true, + releaseDate: true, + size: true + } } }) diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 111f9ef95..e035b86af 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -127,6 +127,7 @@ "HeaderEpisodes": "Episodes", "HeaderEreaderDevices": "Ereader Devices", "HeaderEreaderSettings": "Ereader Settings", + "HeaderFields": "Fields", "HeaderFiles": "Files", "HeaderFindChapters": "Find Chapters", "HeaderIgnoredFiles": "Ignored Files", @@ -304,6 +305,7 @@ "LabelExportOPML": "Export OPML", "LabelFeedURL": "Feed URL", "LabelFetchingMetadata": "Fetching Metadata", + "LabelFieldVisibility": "Field Visibility", "LabelFile": "File", "LabelFileBirthtime": "File Birthtime", "LabelFileModified": "File Modified", @@ -391,7 +393,6 @@ "LabelMore": "More", "LabelMoreInfo": "More Info", "LabelName": "Name", - "LabelNarrator": "Narrator", "LabelNarrators": "Narrators", "LabelNew": "New", "LabelNewPassword": "New Password", From 1ebcbe8e487f165ed236a44663431d3832d1881d Mon Sep 17 00:00:00 2001 From: Greg Lorenzen Date: Sat, 3 Aug 2024 18:53:36 +0000 Subject: [PATCH 2/2] Add options for title field visibility --- .../components/content/LibraryItemDetails.vue | 19 +++--- .../modals/ItemFieldVisibilityModal.vue | 62 +++++++++++++++++++ client/pages/item/_id/index.vue | 18 ++++++ client/store/user.js | 13 +++- client/strings/en-us.json | 3 +- 5 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 client/components/modals/ItemFieldVisibilityModal.vue diff --git a/client/components/content/LibraryItemDetails.vue b/client/components/content/LibraryItemDetails.vue index 78abc2d98..45ec81cbc 100644 --- a/client/components/content/LibraryItemDetails.vue +++ b/client/components/content/LibraryItemDetails.vue @@ -1,6 +1,6 @@
-
+
{{ $strings.LabelPublishYear }}
@@ -19,7 +19,7 @@ {{ publishedYear }}
-
+
{{ $strings.LabelPublisher }}
@@ -35,7 +35,7 @@ {{ podcastType }}
-
+
{{ $strings.LabelGenres }}
@@ -46,7 +46,7 @@
-
+
{{ $strings.LabelTags }}
@@ -57,7 +57,7 @@
-
+
{{ $strings.LabelLanguage }}
@@ -65,7 +65,7 @@ {{ language }}
-
+
{{ $strings.LabelDuration }}
@@ -73,7 +73,7 @@ {{ durationPretty }}
-
+
{{ $strings.LabelSize }}
@@ -160,6 +160,9 @@ export default { }, podcastType() { return this.mediaMetadata.type + }, + fieldVisibility() { + return this.$store.getters['user/getUserSetting']('fieldVisibility') } }, methods: {}, diff --git a/client/components/modals/ItemFieldVisibilityModal.vue b/client/components/modals/ItemFieldVisibilityModal.vue new file mode 100644 index 000000000..b6410053f --- /dev/null +++ b/client/components/modals/ItemFieldVisibilityModal.vue @@ -0,0 +1,62 @@ + + + \ No newline at end of file diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 57a1ae743..5a41032d8 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -1,5 +1,10 @@ @@ -180,6 +186,7 @@ export default { episodesDownloading: [], episodeDownloadsQueued: [], showBookmarksModal: false, + showFieldVisibilityModal: false, isDescriptionClamped: false, showFullDescription: false } @@ -429,6 +436,12 @@ export default { }) } + return items + }, + globalItemSettingsContextMenuItems() { + const items = [] + items.push({ text: this.$strings.LabelFieldVisibility, action: 'fieldVisibility' }) + return items } }, @@ -759,6 +772,11 @@ export default { this.$store.commit('setSelectedLibraryItem', this.libraryItem) this.$store.commit('globals/setShareModal', this.mediaItemShare) } + }, + globalItemSettingsContextMenuAction({ action, data }) { + if (action === 'fieldVisibility') { + this.showFieldVisibilityModal = true + } } }, mounted() { diff --git a/client/store/user.js b/client/store/user.js index 10dc8ef66..dab86bc19 100644 --- a/client/store/user.js +++ b/client/store/user.js @@ -16,7 +16,18 @@ export const state = () => ({ authorSortBy: 'name', authorSortDesc: false, jumpForwardAmount: 10, - jumpBackwardAmount: 10 + jumpBackwardAmount: 10, + fieldVisibility: { + narrators: true, + publishYear: true, + publisher: true, + genres: true, + tags: true, + language: true, + duration: true, + releaseDate: true, + size: true + } } }) diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 6da92f6f6..d00e4bbc7 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -136,6 +136,7 @@ "HeaderEpisodes": "Episodes", "HeaderEreaderDevices": "Ereader Devices", "HeaderEreaderSettings": "Ereader Settings", + "HeaderFields": "Fields", "HeaderFiles": "Files", "HeaderFindChapters": "Find Chapters", "HeaderIgnoredFiles": "Ignored Files", @@ -318,6 +319,7 @@ "LabelExportOPML": "Export OPML", "LabelFeedURL": "Feed URL", "LabelFetchingMetadata": "Fetching Metadata", + "LabelFieldVisibility": "Field Visibility", "LabelFile": "File", "LabelFileBirthtime": "File Birthtime", "LabelFileBornDate": "Born {0}", @@ -407,7 +409,6 @@ "LabelMore": "More", "LabelMoreInfo": "More Info", "LabelName": "Name", - "LabelNarrator": "Narrator", "LabelNarrators": "Narrators", "LabelNew": "New", "LabelNewPassword": "New Password",