mirror of
https://github.com/bartvdbraak/SlayerWeightCalculator.git
synced 2025-04-27 09:41:19 +00:00
temporary
This commit is contained in:
parent
a9df851533
commit
2ecf653079
4 changed files with 28 additions and 20 deletions
|
@ -9,7 +9,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<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>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<section>
|
||||
<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>
|
||||
<h4>Stats</h4>
|
||||
<b-row class="text-center align-content-center">
|
||||
|
@ -36,8 +36,15 @@
|
|||
value="true"
|
||||
unchecked-value="false"
|
||||
>
|
||||
<span class="mr-2" v-b-tooltip.hover.right :title="masterListString(pointUnlock)">{{ pointUnlock.name }}
|
||||
<small class="text-monospace text-muted">{{ monsterPreText(pointUnlock) }}</small>
|
||||
<span class="mr-2">
|
||||
<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>
|
||||
</b-form-checkbox>
|
||||
</b-col>
|
||||
|
@ -76,7 +83,6 @@
|
|||
</b-form-checkbox>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
@ -164,20 +170,18 @@ export default {
|
|||
return monsterList.join(', ').replace(/,(?!.*,)/gmi, ' and');
|
||||
},
|
||||
masterListString(entry) {
|
||||
|
||||
let masterList = [];
|
||||
entry['masters'].forEach( id => {
|
||||
masterList.push(this.mastersData[id].name)
|
||||
});
|
||||
|
||||
return 'Assigned by' + masterList.join(', ').replace(/,(?!.*,)/gmi, ' and');
|
||||
},
|
||||
testConfig() {
|
||||
console.log(JSON.stringify(this.configData.blockList, null, 2))
|
||||
return 'Added to ' + masterList.join(', ').replace(/,(?!.*,)/gmi, ' and');
|
||||
},
|
||||
},
|
||||
beforeDestroy: function() {
|
||||
this.$emit('config', this.configData)
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
console.log(JSON.stringify(this.configData, 0, 2))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'MainContent',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
headerText: String,
|
||||
currentComponent: {
|
||||
default: 'config-section',
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentConfig: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setConfig(configObject) {
|
||||
this.currentConfig = configObject;
|
||||
console.log(this.currentConfig)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ export default {
|
|||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue