Moved char subscription to page so it isn't re-fired on tabletops
This commit is contained in:
@@ -44,6 +44,15 @@ export default {
|
|||||||
VerticalHex
|
VerticalHex
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
/**
|
||||||
|
advantage: 0 | 1 | -1;
|
||||||
|
skillVariableName?: string;
|
||||||
|
abilityVariableName?: string;
|
||||||
|
dc: number | null;
|
||||||
|
contest?: true;
|
||||||
|
targetSkillVariableName?: string;
|
||||||
|
targetAbilityVariableName?: string;
|
||||||
|
*/
|
||||||
value: {
|
value: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@@ -1,18 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="character-sheet fill-height">
|
<div class="character-sheet fill-height">
|
||||||
<v-fade-transition mode="out-in">
|
<v-fade-transition mode="out-in">
|
||||||
<div
|
<div v-if="!creature">
|
||||||
v-if="!$subReady.singleCharacter"
|
|
||||||
key="character-loading"
|
|
||||||
class="fill-height layout justify-center align-center"
|
|
||||||
>
|
|
||||||
<v-progress-circular
|
|
||||||
indeterminate
|
|
||||||
color="primary"
|
|
||||||
size="64"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="!creature">
|
|
||||||
<v-layout
|
<v-layout
|
||||||
column
|
column
|
||||||
align-center
|
align-center
|
||||||
@@ -214,11 +203,6 @@ export default {
|
|||||||
this.logObserver?.stop();
|
this.logObserver?.stop();
|
||||||
},
|
},
|
||||||
meteor: {
|
meteor: {
|
||||||
$subscribe: {
|
|
||||||
'singleCharacter'() {
|
|
||||||
return [this.creatureId];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
creature() {
|
creature() {
|
||||||
return Creatures.findOne(this.creatureId, {
|
return Creatures.findOne(this.creatureId, {
|
||||||
fields: { variables: 0 }
|
fields: { variables: 0 }
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<character-sheet
|
<v-fade-transition mode="out-in">
|
||||||
show-menu-button
|
<div
|
||||||
:creature-id="$route.params.id"
|
v-if="!$subReady.singleCharacter"
|
||||||
/>
|
key="character-loading"
|
||||||
|
class="fill-height layout justify-center align-center"
|
||||||
|
>
|
||||||
|
<v-progress-circular
|
||||||
|
indeterminate
|
||||||
|
color="primary"
|
||||||
|
size="64"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<character-sheet
|
||||||
|
v-else
|
||||||
|
show-menu-button
|
||||||
|
:creature-id="$route.params.id"
|
||||||
|
/>
|
||||||
|
</v-fade-transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="js">
|
<script lang="js">
|
||||||
@@ -11,5 +25,12 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
CharacterSheet,
|
CharacterSheet,
|
||||||
},
|
},
|
||||||
|
meteor: {
|
||||||
|
$subscribe: {
|
||||||
|
'singleCharacter'() {
|
||||||
|
return [this.$route.params.id];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user