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
|
||||
},
|
||||
props: {
|
||||
/**
|
||||
advantage: 0 | 1 | -1;
|
||||
skillVariableName?: string;
|
||||
abilityVariableName?: string;
|
||||
dc: number | null;
|
||||
contest?: true;
|
||||
targetSkillVariableName?: string;
|
||||
targetAbilityVariableName?: string;
|
||||
*/
|
||||
value: {
|
||||
type: Object,
|
||||
required: true,
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
<template>
|
||||
<div class="character-sheet fill-height">
|
||||
<v-fade-transition mode="out-in">
|
||||
<div
|
||||
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">
|
||||
<div v-if="!creature">
|
||||
<v-layout
|
||||
column
|
||||
align-center
|
||||
@@ -214,11 +203,6 @@ export default {
|
||||
this.logObserver?.stop();
|
||||
},
|
||||
meteor: {
|
||||
$subscribe: {
|
||||
'singleCharacter'() {
|
||||
return [this.creatureId];
|
||||
},
|
||||
},
|
||||
creature() {
|
||||
return Creatures.findOne(this.creatureId, {
|
||||
fields: { variables: 0 }
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
<template>
|
||||
<character-sheet
|
||||
show-menu-button
|
||||
:creature-id="$route.params.id"
|
||||
/>
|
||||
<v-fade-transition mode="out-in">
|
||||
<div
|
||||
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>
|
||||
|
||||
<script lang="js">
|
||||
@@ -11,5 +25,12 @@ export default {
|
||||
components: {
|
||||
CharacterSheet,
|
||||
},
|
||||
meteor: {
|
||||
$subscribe: {
|
||||
'singleCharacter'() {
|
||||
return [this.$route.params.id];
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user