From 85be80d712725dc85c1d4adbc687aadaa2b40983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 10:41:21 +0100 Subject: [PATCH 1/8] Removed unused code for poster image. --- src/components/Movie.vue | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/components/Movie.vue b/src/components/Movie.vue index 892198e..498b2aa 100644 --- a/src/components/Movie.vue +++ b/src/components/Movie.vue @@ -7,27 +7,10 @@ - - - - -

{{ movie.title }}

- +

{{ movie.title }}

+ From 6ac6a9b039c8f2e16d07a4e1124ffdb40f20260c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 10:41:46 +0100 Subject: [PATCH 2/8] Readded noselect class to description. --- src/components/Movie.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Movie.vue b/src/components/Movie.vue index 498b2aa..6639f14 100644 --- a/src/components/Movie.vue +++ b/src/components/Movie.vue @@ -53,7 +53,7 @@
-
{{ movie.overview }} From bc6f706e4a707b6fea1215a6c59d7d41e07ccc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 13:33:08 +0100 Subject: [PATCH 3/8] New mediaquery to check if hover is available then only style hover when it is. This solves sticky hover styling on mobile. --- src/components/ui/SeasonedButton.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/ui/SeasonedButton.vue b/src/components/ui/SeasonedButton.vue index 165668a..20fbbc5 100644 --- a/src/components/ui/SeasonedButton.vue +++ b/src/components/ui/SeasonedButton.vue @@ -46,9 +46,16 @@ export default { padding: 6px 20px 5px 20px; } - body:not(.touch) &:hover, &:focus, &:active, &.active { + &:focus, &:active, &.active { background: $text-color; color: $background-color; } + + @media (hover: hover) { + &:hover { + background: $text-color; + color: $background-color; + } + } } From d8368706124ffd4066d379b317d864f49ab08ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 13:41:39 +0100 Subject: [PATCH 4/8] Toggle active boolean to set class on buttons. --- src/components/ui/SeasonedButton.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ui/SeasonedButton.vue b/src/components/ui/SeasonedButton.vue index 20fbbc5..286f5ab 100644 --- a/src/components/ui/SeasonedButton.vue +++ b/src/components/ui/SeasonedButton.vue @@ -13,6 +13,7 @@ export default { }, methods: { emit() { + this.active = !this.active; this.$emit('click') } } From 14ac780aa5293956b8dc81884d45aea73dd03db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 13:55:04 +0100 Subject: [PATCH 5/8] Should not overwrite prop data. Copy and set to internal data attribute. --- src/components/ui/SeasonedButton.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/ui/SeasonedButton.vue b/src/components/ui/SeasonedButton.vue index 286f5ab..197bba8 100644 --- a/src/components/ui/SeasonedButton.vue +++ b/src/components/ui/SeasonedButton.vue @@ -1,6 +1,6 @@ @@ -9,11 +9,20 @@ export default { name: 'seasonedButton', props: { - active: Boolean + required: false, + active: Boolean, + default: false + }, + data() { + isActive: false + }, + beforeMount() { + if (this.active) { + this.isActive = this.active; + } }, methods: { emit() { - this.active = !this.active; this.$emit('click') } } From 20b8692c9188121ceb683716af8e882d35c95a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 13:56:56 +0100 Subject: [PATCH 6/8] Forgot to toggle isActive when clicked. --- src/components/ui/SeasonedButton.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ui/SeasonedButton.vue b/src/components/ui/SeasonedButton.vue index 197bba8..8e2e9f5 100644 --- a/src/components/ui/SeasonedButton.vue +++ b/src/components/ui/SeasonedButton.vue @@ -23,6 +23,7 @@ export default { }, methods: { emit() { + this.isActive = !this.isActive; this.$emit('click') } } From 3becce2a6c54937a4c084a29737da48e90026120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 14:08:46 +0100 Subject: [PATCH 7/8] Moved isPlexAuthenticated from movie component to userModule. --- src/components/Movie.vue | 3 +++ src/modules/userModule.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Movie.vue b/src/components/Movie.vue index 6639f14..5f4d35f 100644 --- a/src/components/Movie.vue +++ b/src/components/Movie.vue @@ -182,6 +182,9 @@ export default { numberOfTorrentResults: () => { let numTorrents = store.getters['torrentModule/resultCount'] return numTorrents !== null ? numTorrents + ' results' : null + }, + isPlexAuthenticated: () => { + return store.getters['userModule/isPlexAuthenticated'] } }, methods: { diff --git a/src/modules/userModule.js b/src/modules/userModule.js index 71e8d7e..dfa47bf 100644 --- a/src/modules/userModule.js +++ b/src/modules/userModule.js @@ -69,6 +69,10 @@ export default { ifMissingSettingsAndTokenExistsFetchSettings() return undefined + }, + isPlexAuthenticated: (state) => { + let hasPlexId = state.settings['plex_userid'] + return hasPlexId != undefined } }, mutations: { @@ -101,4 +105,4 @@ export default { commit('SET_SETTINGS', settings) } } -} \ No newline at end of file +} From 3912766982ffe81cb699b87cfee2f7fe6454c816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 20 Feb 2020 14:09:08 +0100 Subject: [PATCH 8/8] Reverted active logic for seasonedButton. --- src/components/ui/SeasonedButton.vue | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/ui/SeasonedButton.vue b/src/components/ui/SeasonedButton.vue index 8e2e9f5..28da75d 100644 --- a/src/components/ui/SeasonedButton.vue +++ b/src/components/ui/SeasonedButton.vue @@ -1,6 +1,6 @@ @@ -13,17 +13,8 @@ export default { active: Boolean, default: false }, - data() { - isActive: false - }, - beforeMount() { - if (this.active) { - this.isActive = this.active; - } - }, methods: { emit() { - this.isActive = !this.isActive; this.$emit('click') } }