From 62f4019666d4bbd77750ed5aafe963b1e14dcabd Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 5 Sep 2020 20:23:05 -0500 Subject: [PATCH] change all router link to= props into object based references, fix unfinished sceneIndex var refactor, separate quoteList href/hover highlights --- client/src/components/CharacterList.vue | 2 +- client/src/components/Episode.vue | 4 +- client/src/components/QuoteList.vue | 7 +- client/src/components/SearchResult.vue | 3 +- client/src/components/SeasonList.vue | 172 +++++++++++++----------- 5 files changed, 101 insertions(+), 87 deletions(-) diff --git a/client/src/components/CharacterList.vue b/client/src/components/CharacterList.vue index a3e945f..b6ffae3 100644 --- a/client/src/components/CharacterList.vue +++ b/client/src/components/CharacterList.vue @@ -3,7 +3,7 @@ {{ character.name }} {{ character.appearances}} diff --git a/client/src/components/Episode.vue b/client/src/components/Episode.vue index a9fbc50..9f6c32f 100644 --- a/client/src/components/Episode.vue +++ b/client/src/components/Episode.vue @@ -8,7 +8,7 @@
- @@ -61,7 +61,7 @@ ${this.$route.params.season}/${this.$route.params.episode}/`; if (this.$route.hash) { this.$nextTick(() => { const section = document.getElementById(this.$route.hash.substring(1)); - this.$scrollTo(section, 500, { easing: 'ease-in', offset: 0 }); + this.$scrollTo(section, 500, { easing: 'ease-in' }); }); } }) diff --git a/client/src/components/QuoteList.vue b/client/src/components/QuoteList.vue index 0ab70f7..f51ad54 100644 --- a/client/src/components/QuoteList.vue +++ b/client/src/components/QuoteList.vue @@ -22,9 +22,12 @@ .quote-list > tr { white-space: nowrap; - &:hover, &.highlight { + &:hover { background-color: $grey-4; } + &.highlight { + background-color: $grey-5 !important; + } } .quote-text { @@ -64,7 +67,7 @@ export default { }, quotes: { required: true, - type: Object, + type: Array, }, }, methods: { diff --git a/client/src/components/SearchResult.vue b/client/src/components/SearchResult.vue index f4c9f6b..73d4d44 100644 --- a/client/src/components/SearchResult.vue +++ b/client/src/components/SearchResult.vue @@ -31,7 +31,8 @@ + :to="{ name: 'Episode', params: { season: item.season, episode: item.episode_rel }, + hash: `#${item.section_rel - 1}-${item.quote_rel - 1}` }"> Season {{ item.season }} Episode {{ item.episode_rel }} Scene {{ item.section_rel }} diff --git a/client/src/components/SeasonList.vue b/client/src/components/SeasonList.vue index 92c4022..f6f39e9 100644 --- a/client/src/components/SeasonList.vue +++ b/client/src/components/SeasonList.vue @@ -16,8 +16,9 @@ - Episode {{ episode.episode_id }} - "{{ episode.title }}" + :to="{ name: 'Episode', params: { season: season.season_id, + episode: episode.episode_id} }"> + Episode {{ episode.episode_id }} - "{{ episode.title }}"