Merge branch 'develop' of https://github.com/ThaumRystra/DiceCloud into develop

This commit is contained in:
Thaum Rystra
2024-10-14 21:52:54 +02:00
6 changed files with 19 additions and 44 deletions

View File

@@ -33,7 +33,6 @@ export default {
.column-layout>*,
.column-layout>span>div {
display: inline-block;
break-inside: avoid;
page-break-inside: avoid;
margin-bottom: 8px;

View File

@@ -109,7 +109,7 @@ export default {
name: 'characterSheet',
params: { id: this.creatureId},
});
return new URL(props?.href, document.baseURI).href
return new URL(props?.href, 'https://dicecloud.com').href
},
level() {
return this.variables?.level?.value;
@@ -139,7 +139,6 @@ export default {
].sort((a, b) => a.order - b.order);
},
},
// @ts-ignore reactiveProvide isn't defined on vue
reactiveProvide: {
name: 'context',
include: ['creatureId', 'editPermission'],
@@ -279,6 +278,7 @@ export default {
.character-sheet-printed .column-layout>div {
position: relative;
display: inline-block;
margin-top: 4px;
margin-bottom: 4px;
}
@@ -383,6 +383,7 @@ export default {
}
body {
margin: 0;
padding: 2mm;
}
.character-sheet-printed .page {
width: 100%;

View File

@@ -102,7 +102,6 @@ export default {
organize: false,
}
},
// @ts-ignore Meteor isn't defined on vue
meteor: {
containers() {
return CreatureProperties.find({
@@ -128,7 +127,7 @@ export default {
containersWithoutAncestorContainers() {
return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId),
$not: getFilter.descendantsOfAll(this.containers),
$nor: [getFilter.descendantsOfAll(this.containers)],
type: 'container',
removed: { $ne: true },
inactive: { $ne: true },
@@ -151,7 +150,7 @@ export default {
carriedItems() {
return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId),
$not: getFilter.descendantsOfAll(this.containers),
$nor: [getFilter.descendantsOfAll(this.containers)],
type: 'item',
equipped: { $ne: true },
removed: { $ne: true },

View File

@@ -61,7 +61,6 @@ export default {
organize: false,
}
},
// @ts-ignore-error Meteor not defined on vue
meteor: {
spellLists() {
return CreatureProperties.find({
@@ -76,7 +75,7 @@ export default {
spellsWithoutList() {
return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId),
$not: getFilter.descendantsOfAll(this.spellLists),
$nor: [getFilter.descendantsOfAll(this.spellLists)],
type: 'spell',
removed: { $ne: true },
deactivatedByAncestor: { $ne: true },
@@ -91,7 +90,7 @@ export default {
spellListsWithoutAncestorSpellLists() {
return CreatureProperties.find({
...getFilter.descendantsOfRoot(this.creatureId),
$not: getFilter.descendantsOfAll(this.spellLists),
$nor: [getFilter.descendantsOfAll(this.spellLists)],
type: 'spellList',
removed: { $ne: true },
inactive: { $ne: true },

View File

@@ -1,7 +1,7 @@
<template lang="html">
<div class="stats">
<div
class="d-flex wrap justify-space-between px-2 pt-3 pb-1"
class="d-flex wrap justify-space-between px-2 pt-3 pb-2"
style="page-break-after: avoid"
>
<div

View File

@@ -4,11 +4,6 @@
:class="cardClasses"
>
<div class="d-flex align-center mb-2">
<div class="roll-bonus">
<template v-if="!onHitDamage && rollBonus">
{{ rollBonus }}
</template>
</div>
<div class="action-title text-center flex-grow-1">
{{ model.name || propertyName }}
</div>
@@ -51,28 +46,21 @@
<markdown-text :markdown="model.summary.value || model.summary.text" />
</template>
<div
v-if="onHitDamage"
v-if="rollBonus"
class="roll-bonus"
>
<span class="damage">
<span class="to-hit ml-2">
{{ rollBonus }}
</span>
<span>
to hit
</span>
</div>
<div v-if="onHitDamage">
<span class="damage">
{{ onHitDamage.damage }}
</span>
<span>
{{ onHitDamage.suffix }}
</span>
</div>
<tree-node-list
v-else-if="children && children.length"
v-if="children && children.length"
start-expanded
show-external-details
:children="children"
:root="{id: model._id, collection: 'creatureProperties'}"
@selected="e => $emit('sub-click', e)"
/>
</div>
@@ -151,21 +139,6 @@ export default {
'long': 'Long Action'
}[this.model.actionType] || this.model.actionType
},
onHitDamage() {
/**
* Only match a property who has exactly one to-hit child with one damage under that
*/
if (this.children?.length !== 1) return;
if (this.children[0]?.node?.type !== 'branch') return;
if (this.children[0].children?.length !== 1) return;
if (this.children[0].children[0]?.node?.type !== 'damage') return;
if (this.children[0].children[0].children?.length !== 0) return;
const damage = this.children[0].children[0]?.node;
return {
damage: damage.value,
suffix: damage.damageType + (damage.damageType !== 'healing' ? ' damage ' : '')
};
},
},
meteor: {
children() {
@@ -205,6 +178,10 @@ export default {
transform 0.075s ease;
}
.roll-bonus {
color: rgba(0, 0, 0, 0.87);
}
.to-hit {
color: rgba(0, 0, 0, 0.54);
font-size: 18pt;
flex-basis: 24px;
}