Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schedule page navigating to /not-found #4602

Merged
merged 2 commits into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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