diff --git a/app/imports/api/library/LibraryNodes.js b/app/imports/api/library/LibraryNodes.js
index b24b5324..a81e7d71 100644
--- a/app/imports/api/library/LibraryNodes.js
+++ b/app/imports/api/library/LibraryNodes.js
@@ -72,14 +72,12 @@ let LibraryNodeSchema = new SimpleSchema({
optional: true,
max: STORAGE_LIMITS.variableName,
},
- /* TODO: Disabled for now until image upload is working
// Image to display when filling the slot
slotFillImage: {
type: String,
optional: true,
max: STORAGE_LIMITS.url,
},
- */
// Fill more than one quantity in a slot, like feats and ability score
// improvements, filtered out of UI if there isn't space in quantityExpected
slotQuantityFilled: {
diff --git a/app/imports/client/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue b/app/imports/client/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
index 32ae0e01..a7a3c6af 100644
--- a/app/imports/client/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
+++ b/app/imports/client/ui/creature/creatureProperties/AddCreaturePropertyDialog.vue
@@ -45,7 +45,10 @@
Create
-
+
Library
@@ -77,7 +80,10 @@
/>
-
+
= this.countAll) return;
this._subs.searchLibraryNodes.setData('limit', this.currentLimit + 32);
},
- insert(){
- if (!this.selectedNodeIds.length) return;
- this.$store.dispatch('popDialogStack', this.selectedNodeIds);
- },
changeType(type){
this._subs.searchLibraryNodes.setData('type', type);
if (!type) return;
diff --git a/app/imports/client/ui/creature/creatureProperties/CreaturePropertyDialog.vue b/app/imports/client/ui/creature/creatureProperties/CreaturePropertyDialog.vue
index 08bdde87..883d8d1e 100644
--- a/app/imports/client/ui/creature/creatureProperties/CreaturePropertyDialog.vue
+++ b/app/imports/client/ui/creature/creatureProperties/CreaturePropertyDialog.vue
@@ -208,7 +208,9 @@ export default {
}
});
},
- change({path, value, ack}){
+ change(arg) {
+ const { path, value, ack } = arg;
+ console.log('creaturePropDialogChangeHandler', arg);
if (path && path[0] === 'equipped'){
equipItem.call({_id: this.currentId, equipped: value}, ack);
return;
diff --git a/app/imports/client/ui/library/LibraryNodeDialog.vue b/app/imports/client/ui/library/LibraryNodeDialog.vue
index 67cd16dd..2f510906 100644
--- a/app/imports/client/ui/library/LibraryNodeDialog.vue
+++ b/app/imports/client/ui/library/LibraryNodeDialog.vue
@@ -28,15 +28,16 @@
size="64"
/>
-
$emit('change', {path: ['name'], value, ack})"
/>
$emit('change', e)"
/>
$emit('change', e)"
+ @push="e => $emit('push', e)"
+ @pull="e => $emit('pull', e)"
+ >
+
+
+
+ $emit('change', {path: ['slotFillerType'], value, ack})"
+ />
+
+
+ $emit('change', {path: ['slotQuantityFilled'], value, ack})"
+ />
+
+
+ $emit('change', {path: ['slotFillerCondition'], value, ack})"
+ />
+
+
+ $emit('change', {path: ['slotFillerConditionNote'], value, ack})"
+ />
+
+
+ $emit('change', {path: ['libraryTags'], value, ack})"
+ />
+
+
+
+
+
-
$emit('change', {path: ['tags'], value, ack})"
/>
@@ -71,7 +149,7 @@
tile
color="accent"
data-id="insert-creature-property-btn"
- @click="$emit('add-child')"
+ @click="$event=>$emit('add-child')"
>
mdi-plus
@@ -83,9 +161,15 @@
tile
color="accent"
data-id="insert-creature-property-btn"
- @click="$emit('add-child')"
+ @click="$event=>$emit('add-child')"
>
- ...Other
+
+ mdi-plus
+
+ {{ suggestedChildren.length ? '...Other' : 'Child' }}
@@ -106,7 +190,13 @@ import IconColorMenu from '/imports/client/ui/properties/forms/shared/IconColorM
import CreaturePropertiesTree from '/imports/client/ui/creature/creatureProperties/CreaturePropertiesTree.vue';
import OutlinedInput from '/imports/client/ui/properties/viewers/shared/OutlinedInput.vue';
import { getSuggestedChildren } from '/imports/constants/PROPERTIES.js';
+import PROPERTIES from '/imports/constants/PROPERTIES.js';
+const slotTypes = [];
+for (let key in PROPERTIES) {
+ slotTypes.push({ text: PROPERTIES[key].name, value: key });
+}
+
export default {
components: {
ComputedField,
@@ -118,6 +208,9 @@ export default {
OutlinedInput,
...propertyFormIndex,
},
+ inject: {
+ context: { default: {} }
+ },
props: {
model: {
type: [Object, Array],
@@ -125,19 +218,28 @@ export default {
},
embedded: Boolean, // This dialog is embedded in a page
},
+ data() {
+ return {
+ slotTypes,
+ };
+ },
computed: {
suggestedChildren() {
if (!this.model?.type) return;
return getSuggestedChildren(this.model.type);
},
},
- methods: {
- change(path, value, ack){
- if (!Array.isArray(path)){
- path = [path];
+ mounted() {
+ // Don't autofocus on mobile, it brings up the on-screen keyboard
+ if (this.$vuetify.breakpoint.smAndDown) return;
+
+ setTimeout(() => {
+ if (this.$refs.focusFirst && this.$refs.focusFirst.focus) {
+ this.$refs.focusFirst.focus()
}
- this.$emit('change', {path, value, ack});
- },
+ }, 300);
+ },
+ methods: {
selectSubProperty(_id){
this.$store.commit('pushDialogStack', {
component: 'creature-property-dialog',
diff --git a/app/imports/client/ui/properties/forms/ActionForm.vue b/app/imports/client/ui/properties/forms/ActionForm.vue
index d20c14dd..a81d1d5e 100644
--- a/app/imports/client/ui/properties/forms/ActionForm.vue
+++ b/app/imports/client/ui/properties/forms/ActionForm.vue
@@ -172,6 +172,7 @@
@change="change('reset', ...arguments)"
/>
+
diff --git a/app/imports/client/ui/properties/forms/AdjustmentForm.vue b/app/imports/client/ui/properties/forms/AdjustmentForm.vue
index 353d4fab..38a9a507 100644
--- a/app/imports/client/ui/properties/forms/AdjustmentForm.vue
+++ b/app/imports/client/ui/properties/forms/AdjustmentForm.vue
@@ -65,13 +65,15 @@
:error-messages="errors.silent"
@change="change('silent', ...arguments)"
/>
-
-
-
+
+
+
+
+
+
diff --git a/app/imports/client/ui/properties/forms/AttributeForm.vue b/app/imports/client/ui/properties/forms/AttributeForm.vue
index 77e66af1..ed9d01e2 100644
--- a/app/imports/client/ui/properties/forms/AttributeForm.vue
+++ b/app/imports/client/ui/properties/forms/AttributeForm.vue
@@ -259,6 +259,7 @@
/>
+
diff --git a/app/imports/client/ui/properties/forms/BranchForm.vue b/app/imports/client/ui/properties/forms/BranchForm.vue
index 8893f57d..15e9f447 100644
--- a/app/imports/client/ui/properties/forms/BranchForm.vue
+++ b/app/imports/client/ui/properties/forms/BranchForm.vue
@@ -44,12 +44,14 @@
:error-messages="errors.silent"
@change="change('silent', ...arguments)"
/>
-
-
-
+
+
+
+
+
+
diff --git a/app/imports/client/ui/properties/forms/BuffForm.vue b/app/imports/client/ui/properties/forms/BuffForm.vue
index 965f5810..71d0f538 100644
--- a/app/imports/client/ui/properties/forms/BuffForm.vue
+++ b/app/imports/client/ui/properties/forms/BuffForm.vue
@@ -93,6 +93,7 @@
@change="change('tags', ...arguments)"
/>
+
diff --git a/app/imports/client/ui/properties/forms/FolderForm.vue b/app/imports/client/ui/properties/forms/FolderForm.vue
index 9c993d3d..7b8f3a47 100644
--- a/app/imports/client/ui/properties/forms/FolderForm.vue
+++ b/app/imports/client/ui/properties/forms/FolderForm.vue
@@ -1,31 +1,8 @@
diff --git a/app/imports/client/ui/properties/forms/shared/propertyFormMixin.js b/app/imports/client/ui/properties/forms/shared/propertyFormMixin.js
index 58c3ec28..84f6760e 100644
--- a/app/imports/client/ui/properties/forms/shared/propertyFormMixin.js
+++ b/app/imports/client/ui/properties/forms/shared/propertyFormMixin.js
@@ -19,22 +19,12 @@ export default {
default: () => ({}),
},
},
- mounted(){
- // Don't autofocus on mobile, it brings up the on-screen keyboard
- if (this.$vuetify.breakpoint.smAndDown) return;
-
- setTimeout(() => {
- if (this.$refs.focusFirst && this.$refs.focusFirst.focus){
- this.$refs.focusFirst.focus()
- }
- }, 300);
- },
methods: {
- change(path, value, ack){
- if (!Array.isArray(path)){
+ change(path, value, ack) {
+ if (!Array.isArray(path)) {
path = [path];
}
- this.$emit('change', {path, value, ack});
+ this.$emit('change', { path, value, ack });
}
},
}
diff --git a/app/imports/client/ui/properties/viewers/FolderViewer.vue b/app/imports/client/ui/properties/viewers/FolderViewer.vue
index 91e24a6d..b1adbcb3 100644
--- a/app/imports/client/ui/properties/viewers/FolderViewer.vue
+++ b/app/imports/client/ui/properties/viewers/FolderViewer.vue
@@ -1,5 +1,17 @@
-
+