Fix site details panel

This commit is contained in:
Tamius Han 2019-06-14 22:36:21 +02:00
parent 8bb5f30e71
commit 060278a972

View File

@ -118,28 +118,33 @@ export default {
settings: Object, settings: Object,
}, },
created() { created() {
console.log("created!")
try { try {
this.videoManualQs = settings.active.sites[this.site].DOM.video.manual || this.videoManualQs; this.videoManualQs = this.settings.active.sites[this.site].DOM.video.manual || this.videoManualQs;
this.videoQs = settings.active.sites[this.site].DOM.video.querySelectors; this.videoQs = this.settings.active.sites[this.site].DOM.video.querySelectors;
this.videoCss = settings.active.sites[this.site].DOM.video.additionalCss; this.videoCss = this.settings.active.sites[this.site].DOM.video.additionalCss;
} catch (e) { } catch (e) {
// that's here just in case relevant settings for this site don't exist yet // that's here just in case relevant settings for this site don't exist yet
console.log("failed to load settings for the site — for video stuff")
} }
try { try {
this.playerManualQs = settings.active.sites[this.site].DOM.player.manual || this.playerManualQs; this.playerManualQs = this.settings.active.sites[this.site].DOM.player.manual || this.playerManualQs;
this.playerQs = settings.active.sites[this.site].DOM.player.querySelectors; this.playerQs = this.settings.active.sites[this.site].DOM.player.querySelectors;
this.playerByNodeIndex = settings.active.sites[this.site].DOM.player.useRelativeAncestor || this.playerByNodeIndex; this.playerByNodeIndex = this.settings.active.sites[this.site].DOM.player.useRelativeAncestor || this.playerByNodeIndex;
this.playerParentNodeIndex = settings.active.sites[this.site].DOM.player.videoAncestor; this.playerParentNodeIndex = this.settings.active.sites[this.site].DOM.player.videoAncestor;
} catch (e) { } catch (e) {
// that's here just in case relevant settings for this site don't exist yet // that's here just in case relevant settings for this site don't exist yet
console.log("failed to load settings for the site — for video stuff")
} }
try { try {
this.playerCss = settings.active.sites[this.site].css || ''; this.playerCss = this.settings.active.sites[this.site].css || '';
} catch (e) { } catch (e) {
// that's here just in case relevant settings for this site don't exist yet // that's here just in case relevant settings for this site don't exist yet
console.log("failed to load settings for the site — for video stuff")
} }
console.log("created — got settings:", this.settings)
}, },
methods: { methods: {
ensureSettings(scope) { ensureSettings(scope) {