temporary

This commit is contained in:
Bart van der Braak 2020-02-03 23:39:27 +01:00
parent a9df851533
commit 2ecf653079
4 changed files with 28 additions and 20 deletions

View file

@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but SlayerWeightCalc doesn't work at all without JavaScript enabled. Please enable it to continue.</strong> <strong>SlayerWeightCalc's functionality relies on JavaScript. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
</body> </body>

View file

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<div class="pt-3 pb-2 my-2"> <div class="pt-3 pb-2 my-2">
<h1 class="h3 text-uppercase mb-2" @click="testConfig">Account Settings</h1> <h1 class="h3 text-uppercase mb-2">Account Settings</h1>
<hr> <hr>
<h4>Stats</h4> <h4>Stats</h4>
<b-row class="text-center align-content-center"> <b-row class="text-center align-content-center">
@ -36,8 +36,15 @@
value="true" value="true"
unchecked-value="false" unchecked-value="false"
> >
<span class="mr-2" v-b-tooltip.hover.right :title="masterListString(pointUnlock)">{{ pointUnlock.name }} <span class="mr-2">
<small class="text-monospace text-muted">{{ monsterPreText(pointUnlock) }}</small> <span v-if="pointUnlock.masters" v-b-tooltip.hover.right :title="masterListString(pointUnlock)">
{{ pointUnlock.name }}
<small class="text-monospace text-muted">{{ monsterPreText(pointUnlock) }}</small>
</span>
<span v-else>
{{ pointUnlock.name }}
<small class="text-monospace text-muted">{{ monsterPreText(pointUnlock) }}</small>
</span>
</span> </span>
</b-form-checkbox> </b-form-checkbox>
</b-col> </b-col>
@ -76,7 +83,6 @@
</b-form-checkbox> </b-form-checkbox>
</b-col> </b-col>
</b-row> </b-row>
</div> </div>
</section> </section>
</template> </template>
@ -164,20 +170,18 @@ export default {
return monsterList.join(', ').replace(/,(?!.*,)/gmi, ' and'); return monsterList.join(', ').replace(/,(?!.*,)/gmi, ' and');
}, },
masterListString(entry) { masterListString(entry) {
let masterList = []; let masterList = [];
entry['masters'].forEach( id => { entry['masters'].forEach( id => {
masterList.push(this.mastersData[id].name) masterList.push(this.mastersData[id].name)
}); });
return 'Assigned by' + masterList.join(', ').replace(/,(?!.*,)/gmi, ' and'); return 'Added to ' + masterList.join(', ').replace(/,(?!.*,)/gmi, ' and');
},
testConfig() {
console.log(JSON.stringify(this.configData.blockList, null, 2))
}, },
}, },
beforeDestroy: function() { watch: {
this.$emit('config', this.configData) $route(to, from) {
console.log(JSON.stringify(this.configData, 0, 2))
}
} }
} }
</script> </script>

View file

@ -1,20 +1,23 @@
<template> <template>
<main role="main" class="col-md-10 ml-sm-auto col-lg-10 px-4"> <main role="main" class="col-md-10 ml-sm-auto col-lg-10 px-4">
<router-view></router-view> <router-view v-bind="currentConfig" v-on:config="setConfig"></router-view>
</main> </main>
</template> </template>
<script> <script>
export default { export default {
name: 'MainContent', name: 'MainContent',
components: { data() {
}, return {
props: { currentConfig: {},
headerText: String, }
currentComponent: {
default: 'config-section',
},
}, },
methods: {
setConfig(configObject) {
this.currentConfig = configObject;
console.log(this.currentConfig)
}
}
} }
</script> </script>

View file

@ -142,6 +142,7 @@ export default {
this.reload(); this.reload();
} }
} }
} }
</script> </script>