Skip to content

Commit

Permalink
Fix schedule page navigating to /not-found (#4602)
Browse files Browse the repository at this point in the history
* Fix schedule page

* Fix schedule.mako code style
  • Loading branch information
sharkykh authored and OmgImAlexis committed Jul 11, 2018
1 parent 648ddc4 commit 9ff3caf
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 68 deletions.
10 changes: 10 additions & 0 deletions themes-default/slim/static/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if (!window.router) {
const configComponent = httpVueLoader('js/templates/config.vue');
const addShowsComponent = httpVueLoader('js/templates/add-shows.vue');
const addRecommendedComponent = httpVueLoader('js/templates/add-recommended.vue');
// eslint-disable-next-line capitalized-comments
// const scheduleComponent = httpVueLoader('js/templates/schedule.vue');
const notFoundComponent = httpVueLoader('js/templates/http/404.vue');

const router = new VueRouter({
Expand Down Expand Up @@ -34,6 +36,14 @@ if (!window.router) {
header: 'Add Recommended Shows'
},
component: addRecommendedComponent
}, {
path: '/schedule',
name: 'schedule',
meta: {
title: 'Schedule',
header: 'Schedule'
}, // eslint-disable-line comma-dangle
// component: scheduleComponent
}, {
path: '/not-found',
name: 'not-found',
Expand Down
36 changes: 14 additions & 22 deletions themes-default/slim/views/schedule.mako
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,22 @@ const startVue = () => {
store,
el: '#vue-wrap',
router,
metaInfo: {
title: 'Schedule'
},
data() {
return {
header: 'Schedule'
};
},
computed: Object.assign(
store.mapState(['shows']),
{
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
computed: Object.assign(store.mapState(['shows']), {
header() {
return this.$route.meta.header;
},
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
}
),
}),
mounted() {
const { $store, $route } = this;
// $store.dispatch('getShows');
Expand Down
10 changes: 10 additions & 0 deletions themes/dark/assets/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if (!window.router) {
const configComponent = httpVueLoader('js/templates/config.vue');
const addShowsComponent = httpVueLoader('js/templates/add-shows.vue');
const addRecommendedComponent = httpVueLoader('js/templates/add-recommended.vue');
// eslint-disable-next-line capitalized-comments
// const scheduleComponent = httpVueLoader('js/templates/schedule.vue');
const notFoundComponent = httpVueLoader('js/templates/http/404.vue');

const router = new VueRouter({
Expand Down Expand Up @@ -34,6 +36,14 @@ if (!window.router) {
header: 'Add Recommended Shows'
},
component: addRecommendedComponent
}, {
path: '/schedule',
name: 'schedule',
meta: {
title: 'Schedule',
header: 'Schedule'
}, // eslint-disable-line comma-dangle
// component: scheduleComponent
}, {
path: '/not-found',
name: 'not-found',
Expand Down
2 changes: 1 addition & 1 deletion themes/dark/assets/js/router.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 14 additions & 22 deletions themes/dark/templates/schedule.mako
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,22 @@ const startVue = () => {
store,
el: '#vue-wrap',
router,
metaInfo: {
title: 'Schedule'
},
data() {
return {
header: 'Schedule'
};
},
computed: Object.assign(
store.mapState(['shows']),
{
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
computed: Object.assign(store.mapState(['shows']), {
header() {
return this.$route.meta.header;
},
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
}
),
}),
mounted() {
const { $store, $route } = this;
// $store.dispatch('getShows');
Expand Down
10 changes: 10 additions & 0 deletions themes/light/assets/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if (!window.router) {
const configComponent = httpVueLoader('js/templates/config.vue');
const addShowsComponent = httpVueLoader('js/templates/add-shows.vue');
const addRecommendedComponent = httpVueLoader('js/templates/add-recommended.vue');
// eslint-disable-next-line capitalized-comments
// const scheduleComponent = httpVueLoader('js/templates/schedule.vue');
const notFoundComponent = httpVueLoader('js/templates/http/404.vue');

const router = new VueRouter({
Expand Down Expand Up @@ -34,6 +36,14 @@ if (!window.router) {
header: 'Add Recommended Shows'
},
component: addRecommendedComponent
}, {
path: '/schedule',
name: 'schedule',
meta: {
title: 'Schedule',
header: 'Schedule'
}, // eslint-disable-line comma-dangle
// component: scheduleComponent
}, {
path: '/not-found',
name: 'not-found',
Expand Down
2 changes: 1 addition & 1 deletion themes/light/assets/js/router.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 14 additions & 22 deletions themes/light/templates/schedule.mako
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,22 @@ const startVue = () => {
store,
el: '#vue-wrap',
router,
metaInfo: {
title: 'Schedule'
},
data() {
return {
header: 'Schedule'
};
},
computed: Object.assign(
store.mapState(['shows']),
{
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
computed: Object.assign(store.mapState(['shows']), {
header() {
return this.$route.meta.header;
},
layout: {
get() {
const { config } = this;
return config.layout.schedule;
},
set(layout) {
const { $store } = this;
const page = 'schedule';
$store.dispatch('setLayout', { page, layout });
}
}
),
}),
mounted() {
const { $store, $route } = this;
// $store.dispatch('getShows');
Expand Down

0 comments on commit 9ff3caf

Please sign in to comment.