Skip to content

Commit

Permalink
Convert titles and headers to VueRouter (#4663)
Browse files Browse the repository at this point in the history
* Add routes

* Update templates for the added routes

* Sync themes

* Webpack

* More /home routes

* /home/snatchSelection
* /home/testRename
* /home/postprocess
* /home/status

* More /addShows routes

* /addShows/trendingShows
* /addShows/popularShows
* /addShows/popularAnime

* More / routes

* /news
* /changes
* /IRC

* Move /errorlogs routes

* Restart & Shutdown

* Format router.js

* Add missing router, change errorlogs header

* Update errorlogs.mako

* Simplify route nesting

* Add (extremely) simple router test

* Put router after store in schedule.mako

* Add router to 404.mako 500.mako

They don't have paths so nothing to add to the router.
  • Loading branch information
OmgImAlexis authored Aug 23, 2018
1 parent 3965eb1 commit 7cb7584
Show file tree
Hide file tree
Showing 110 changed files with 599 additions and 545 deletions.
13 changes: 11 additions & 2 deletions themes-default/slim/src/components/display-show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ export default {
AppLink,
PlotInfo
},
data() {
return {};
metaInfo() {
if (!this.show || !this.show.title) {
return {
title: 'Medusa'
};
}
const { title } = this.show;
return {
title,
titleTemplate: '%s | Medusa'
};
},
computed: {
...mapState({
Expand Down
8 changes: 0 additions & 8 deletions themes-default/slim/src/components/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ export default {
components: {
AppLink
},
metaInfo: {
title: 'Home'
},
data() {
return {
header: 'Show List'
};
},
computed: {
...mapState([
'config'
Expand Down
8 changes: 0 additions & 8 deletions themes-default/slim/src/components/manual-post-process.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
export default {
name: 'manual-post-process',
template: '#manual-post-process-template',
metaInfo: {
title: 'Post Processing'
},
data() {
return {
header: 'Post Processing'
};
},
mounted() {
$('#episodeDir').fileBrowser({
title: 'Select Unprocessed Episode Folder',
Expand Down
17 changes: 17 additions & 0 deletions themes-default/slim/src/components/snatch-selection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ export default {
components: {
AppLink
},
metaInfo() {
if (!this.show || !this.show.title) {
return {
title: 'Medusa'
};
}
const { title } = this.show;
return {
title,
titleTemplate: '%s | Medusa'
};
},
computed: {
...mapState({
shows: state => state.shows.shows
Expand Down Expand Up @@ -43,6 +55,11 @@ export default {
return show;
}
},
created() {
const { indexer, id, $store } = this;
// Needed for the title
$store.dispatch('getShow', { indexer, id });
},
mounted() {
window.addEventListener('load', () => {
// Adjust the summary background position and size
Expand Down
Loading

0 comments on commit 7cb7584

Please sign in to comment.