Began working on build tab
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template lang="html">
|
||||
<dialog-base :color="model.color">
|
||||
<dialog-base v-if="model" :color="model.color">
|
||||
<template slot="toolbar">
|
||||
<v-toolbar-title>
|
||||
Character Details
|
||||
@@ -43,7 +43,10 @@ export default {
|
||||
ColorPicker,
|
||||
},
|
||||
props: {
|
||||
_id: String,
|
||||
_id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
startInEditTab: Boolean,
|
||||
},
|
||||
meteor: {
|
||||
|
||||
@@ -63,6 +63,9 @@ if<template>
|
||||
<v-tab-item>
|
||||
<character-tab :creature-id="creatureId" />
|
||||
</v-tab-item>
|
||||
<v-tab-item>
|
||||
<build-tab :creature-id="creatureId" />
|
||||
</v-tab-item>
|
||||
<v-tab-item
|
||||
v-if="creature.settings.showTreeTab"
|
||||
>
|
||||
@@ -82,7 +85,8 @@ if<template>
|
||||
import FeaturesTab from '/imports/ui/creature/character/characterSheetTabs/FeaturesTab.vue';
|
||||
import InventoryTab from '/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue';
|
||||
import SpellsTab from '/imports/ui/creature/character/characterSheetTabs/SpellsTab.vue';
|
||||
import CharacterTab from '/imports/ui/creature/character/characterSheetTabs/CharacterTab.vue';
|
||||
import CharacterTab from '/imports/ui/creature/character/characterSheetTabs/JournalTab.vue';
|
||||
import BuildTab from '/imports/ui/creature/character/characterSheetTabs/BuildTab.vue';
|
||||
import TreeTab from '/imports/ui/creature/character/characterSheetTabs/TreeTab.vue';
|
||||
import { assertEditPermission } from '/imports/api/creature/creatures/creaturePermissions.js';
|
||||
import CreatureLogs from '/imports/api/creature/log/CreatureLogs.js';
|
||||
@@ -95,6 +99,7 @@ if<template>
|
||||
InventoryTab,
|
||||
SpellsTab,
|
||||
CharacterTab,
|
||||
BuildTab,
|
||||
TreeTab,
|
||||
},
|
||||
props: {
|
||||
|
||||
@@ -110,7 +110,10 @@
|
||||
Spells
|
||||
</v-tab>
|
||||
<v-tab>
|
||||
Character
|
||||
Journal
|
||||
</v-tab>
|
||||
<v-tab>
|
||||
Build
|
||||
</v-tab>
|
||||
<v-tab v-if="creature.settings.showTreeTab">
|
||||
Tree
|
||||
|
||||
56
app/imports/ui/creature/character/CreatureSummary.vue
Normal file
56
app/imports/ui/creature/character/CreatureSummary.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<v-card
|
||||
hover
|
||||
data-id="creature-summary"
|
||||
@mouseover="hover = true"
|
||||
@mouseleave="hover = false"
|
||||
@click="showCharacterForm"
|
||||
>
|
||||
<v-img
|
||||
v-if="creature.picture"
|
||||
:src="creature.picture"
|
||||
/>
|
||||
<v-card-title class="text-h6">
|
||||
{{ creature.name }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{ creature.alignment }}<br>
|
||||
{{ creature.gender }}
|
||||
</v-card-text>
|
||||
<card-highlight :active="hover" />
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import CardHighlight from '/imports/ui/components/CardHighlight.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CardHighlight,
|
||||
},
|
||||
props: {
|
||||
creature: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data(){ return {
|
||||
hover: false,
|
||||
}},
|
||||
methods: {
|
||||
showCharacterForm(){
|
||||
this.$store.commit('pushDialogStack', {
|
||||
component: 'creature-form-dialog',
|
||||
elementId: 'creature-summary',
|
||||
data: {
|
||||
_id: this.creature._id,
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -1,53 +1,6 @@
|
||||
<template lang="html">
|
||||
<div class="inventory">
|
||||
<div class="build">
|
||||
<column-layout wide-columns>
|
||||
<div>
|
||||
<v-card
|
||||
hover
|
||||
data-id="creature-summary"
|
||||
@mouseover="summaryHover = true"
|
||||
@mouseleave="summaryHover = false"
|
||||
@click="showCharacterForm"
|
||||
>
|
||||
<v-img
|
||||
v-if="creature.picture"
|
||||
:src="creature.picture"
|
||||
/>
|
||||
<v-card-title class="text-h6">
|
||||
{{ creature.name }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{ creature.alignment }}<br>
|
||||
{{ creature.gender }}
|
||||
</v-card-text>
|
||||
<card-highlight :active="summaryHover" />
|
||||
</v-card>
|
||||
</div>
|
||||
<div>
|
||||
<toolbar-card
|
||||
data-id="slot-card"
|
||||
@toolbarclick="showSlotDialog"
|
||||
>
|
||||
<template slot="toolbar">
|
||||
<v-toolbar-title>
|
||||
Build
|
||||
</v-toolbar-title>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>
|
||||
<v-icon
|
||||
small
|
||||
style="width: 16px;"
|
||||
class="mr-1"
|
||||
>
|
||||
mdi-pencil
|
||||
</v-icon>
|
||||
</v-toolbar-title>
|
||||
</template>
|
||||
<v-card-text style="background-color: inherit;">
|
||||
<slots :creature-id="creatureId" />
|
||||
</v-card-text>
|
||||
</toolbar-card>
|
||||
</div>
|
||||
<div>
|
||||
<v-card class="class-details">
|
||||
<v-card-title
|
||||
@@ -117,13 +70,30 @@
|
||||
</v-list>
|
||||
</v-card>
|
||||
</div>
|
||||
<div
|
||||
v-for="note in notes"
|
||||
:key="note._id"
|
||||
>
|
||||
<note-card
|
||||
:model="note"
|
||||
/>
|
||||
<div>
|
||||
<toolbar-card
|
||||
data-id="slot-card"
|
||||
@toolbarclick="showSlotDialog"
|
||||
>
|
||||
<template slot="toolbar">
|
||||
<v-toolbar-title>
|
||||
Build
|
||||
</v-toolbar-title>
|
||||
<v-spacer />
|
||||
<v-toolbar-title>
|
||||
<v-icon
|
||||
small
|
||||
style="width: 16px;"
|
||||
class="mr-1"
|
||||
>
|
||||
mdi-pencil
|
||||
</v-icon>
|
||||
</v-toolbar-title>
|
||||
</template>
|
||||
<v-card-text style="background-color: inherit;">
|
||||
<slots :creature-id="creatureId" />
|
||||
</v-card-text>
|
||||
</toolbar-card>
|
||||
</div>
|
||||
</column-layout>
|
||||
</div>
|
||||
@@ -133,18 +103,16 @@
|
||||
import Creatures from '/imports/api/creature/creatures/Creatures.js';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
import ColumnLayout from '/imports/ui/components/ColumnLayout.vue';
|
||||
import NoteCard from '/imports/ui/properties/components/persona/NoteCard.vue';
|
||||
import Slots from '/imports/ui/creature/slots/Slots.vue';
|
||||
import ToolbarCard from '/imports/ui/components/ToolbarCard.vue';
|
||||
import CardHighlight from '/imports/ui/components/CardHighlight.vue';
|
||||
import CreatureSummary from '/imports/ui/creature/character/CreatureSummary.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ColumnLayout,
|
||||
NoteCard,
|
||||
Slots,
|
||||
ToolbarCard,
|
||||
CardHighlight,
|
||||
CreatureSummary,
|
||||
},
|
||||
props: {
|
||||
creatureId: {
|
||||
@@ -152,9 +120,6 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data(){return {
|
||||
summaryHover: false,
|
||||
}},
|
||||
computed: {
|
||||
highestClassLevels(){
|
||||
let highestLevels = {};
|
||||
@@ -182,16 +147,6 @@ export default {
|
||||
}
|
||||
},
|
||||
meteor: {
|
||||
notes(){
|
||||
return CreatureProperties.find({
|
||||
'ancestors.id': this.creatureId,
|
||||
type: 'note',
|
||||
removed: {$ne: true},
|
||||
inactive: {$ne: true},
|
||||
}, {
|
||||
sort: {order: 1},
|
||||
});
|
||||
},
|
||||
creature(){
|
||||
return Creatures.findOne(this.creatureId);
|
||||
},
|
||||
@@ -207,15 +162,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showCharacterForm(){
|
||||
this.$store.commit('pushDialogStack', {
|
||||
component: 'creature-form-dialog',
|
||||
elementId: 'creature-summary',
|
||||
data: {
|
||||
_id: this.creatureId,
|
||||
},
|
||||
});
|
||||
},
|
||||
addExperience(){
|
||||
this.$store.commit('pushDialogStack', {
|
||||
component: 'experience-insert-dialog',
|
||||
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div class="build-tab">
|
||||
<column-layout wide-columns>
|
||||
<div>
|
||||
<creature-summary :creature="creature" />
|
||||
</div>
|
||||
<div
|
||||
v-for="note in notes"
|
||||
:key="note._id"
|
||||
>
|
||||
<note-card
|
||||
:model="note"
|
||||
/>
|
||||
</div>
|
||||
</column-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import ColumnLayout from '/imports/ui/components/ColumnLayout.vue';
|
||||
import Creatures from '/imports/api/creature/creatures/Creatures.js';
|
||||
import Slots from '/imports/ui/creature/slots/Slots.vue';
|
||||
import ToolbarCard from '/imports/ui/components/ToolbarCard.vue';
|
||||
import NoteCard from '/imports/ui/properties/components/persona/NoteCard.vue';
|
||||
import CreatureSummary from '/imports/ui/creature/character/CreatureSummary.vue';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ColumnLayout,
|
||||
CreatureSummary,
|
||||
NoteCard,
|
||||
},
|
||||
props: {
|
||||
creatureId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
meteor: {
|
||||
notes(){
|
||||
return CreatureProperties.find({
|
||||
'ancestors.id': this.creatureId,
|
||||
type: 'note',
|
||||
removed: {$ne: true},
|
||||
inactive: {$ne: true},
|
||||
}, {
|
||||
sort: {order: 1},
|
||||
});
|
||||
},
|
||||
creature(){
|
||||
return Creatures.findOne(this.creatureId);
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
</style>
|
||||
2
app/package-lock.json
generated
2
app/package-lock.json
generated
@@ -2788,7 +2788,7 @@
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
},
|
||||
"simpl-schema": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"author": "Stefan Zermatten",
|
||||
"scripts": {
|
||||
"run": "meteor --once",
|
||||
"run": "meteor",
|
||||
"test": "meteor test --driver-package meteortesting:mocha --port 3001"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user