diff --git a/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue b/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue new file mode 100644 index 00000000..5a4c5b53 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue @@ -0,0 +1,339 @@ + + + + + + + + + + Character not found + + + Either this character does not exist, or you don't have permission + to view it. + + + + + + + + + {{ creature.name }} + + + + {{ creature.alignment }} {{ background }} + + + {{ race }} {{ creature.gender }} + + + Level {{ level }} {{ classes[0].name }} + + + Level {{ level }} ({{ classes.map(c => `${c.name} ${c.level}`).join(', ') }}) + + + + + + {{ creatureUrl }} + + + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue new file mode 100644 index 00000000..53694a81 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedInventory.vue @@ -0,0 +1,270 @@ + + + + + + + Inventory + + + $vuetify.icons.injustice + Weight Carried: + {{ weightCarried }} lb + + + $vuetify.icons.cash + Net worth: + + + + $vuetify.icons.spell + Items attuned: + {{ variables.itemsAttuned && variables.itemsAttuned.value }} + + + + + + Equipped + + + + + + + + Carried + + + + + + + + + + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue new file mode 100644 index 00000000..1d60374b --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedSpells.vue @@ -0,0 +1,128 @@ + + + + + + Spells + + + + + + + + + + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue b/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue new file mode 100644 index 00000000..e3bad2a4 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/PrintedStats.vue @@ -0,0 +1,639 @@ + + + + + + + + + + {{ ability.total }} + + + {{ numberToSignedString(ability.modifier) }} + + + + + {{ numberToSignedString(ability.modifier) }} + + + {{ ability.total }} + + + + + {{ ability.name }} + + + + + + + + + {{ toggle.name }} + + + + + + {{ stat.value }} + + + {{ stat.name }} + + + + + + {{ numberToSignedString(modifier.value) }} + + + {{ modifier.name }} + + + + + + {{ numberToSignedString(check.value) }} + + + {{ check.name }} + + + + + + Total: {{ healthBar.total }} + + + + {{ healthBar.name }} + + + + + + + + + + + Total: + + + {{ hitDie.total }}{{ hitDie.hitDiceSize }} + + + + + Hit Dice + + + + + + + + {{ resource.name }} + + + total: {{ resource.total }} + + + + + + + {{ resource.name }} + + + + + + + + Spell Slots + + + + {{ spellSlot.name }} + + + Total: {{ spellSlot.total }} + + + + + + + + + + + + + Saving Throws + + + + + + + + + Skills + + + + + + + + Weapons + + + + + + + + Armor + + + + + + + + Tools + + + + + + + + Languages + + + + + + + + {{ note.name }} + + + + + + + + + + + + + + + {{ feature.name }} + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue new file mode 100644 index 00000000..5f1adf07 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedAction.vue @@ -0,0 +1,247 @@ + + + + {{ actionTypeName }} + + + + + + {{ rollBonus }} + + + + + + + + {{ model.name || propertyName }} + + + + + {{ model.uses }} uses + + + + + Cost: {{ attributeConsumed.quantity && attributeConsumed.quantity.value }} {{ attributeConsumed.statName || attributeConsumed.variableName }} + + + + Uses: {{ itemConsumed.quantity && itemConsumed.quantity.value || 0 }} {{ itemConsumed.itemName || itemConsumed.tag }} + + + + + + + + $emit('sub-click', e)" + /> + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue new file mode 100644 index 00000000..a15ed8c8 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedContainer.vue @@ -0,0 +1,135 @@ + + + + + + {{ model.name }} + + + + + + + + + $vuetify.icons.two_coins + + + + + + + $vuetify.icons.cash + + + + contents + + + + + + + + + + $vuetify.icons.weight + + {{ model.weight }} lb + + + + + $vuetify.icons.injustice + + {{ model.contentsWeight }} lb + + contents + + + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue new file mode 100644 index 00000000..386aabcd --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedDamageMultipliers.vue @@ -0,0 +1,71 @@ + + + + + + + {{ multiplier.name }} + + + {{ title(multiplier) }} + + + {{ multiplier.damageTypes.join(', ') }} + + + + For: + + {{ multiplier.includeTags.join(', ') }} + + + + Except: + + {{ multiplier.excludeTags.join(', ') }} + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue new file mode 100644 index 00000000..ccc5b85d --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedItem.vue @@ -0,0 +1,173 @@ + + + + + {{ title }} + + ({{ attunementText }}) + + + + + + + + + + + $vuetify.icons.cash + + + + + + $vuetify.icons.two_coins + + + + each + + + + + + + + + + $vuetify.icons.injustice + + {{ totalWeight }} lb + + + + $vuetify.icons.weight + + {{ model.weight }} lb + + each + + + + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue new file mode 100644 index 00000000..2920634c --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSkill.vue @@ -0,0 +1,105 @@ + + + + + + + {{ displayedModifier }} + + + mdi-chevron-double-up + + + mdi-chevron-double-down + + + + + {{ model.name }} + + * + + + ({{ passiveScore }}) + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue new file mode 100644 index 00000000..8367c2a0 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpell.vue @@ -0,0 +1,82 @@ + + + + {{ model.name }} + + + {{ levelText }} {{ model.school }} {{ model.ritual ? '(ritual)' : '' }} + + + {{ model.school }} cantrip + + + Casting Time: {{ model.castingTime }} + + + Range: {{ model.range }} + + + Components: {{ spellComponents }} + + + Duration: {{ model.duration }} + + + + + + + + + + diff --git a/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue new file mode 100644 index 00000000..0ee80376 --- /dev/null +++ b/app/imports/ui/creature/character/printedCharacterSheet/components/PrintedSpellList.vue @@ -0,0 +1,39 @@ + + + + {{ model.name }} + + + Spell Save DC: {{ model.dc && model.dc.value }} + + + Spell Attack Bonus: {{ model.attackRollBonus && model.attackRollBonus.value }} + + + Maximum prepared spells: {{ model.maxPrepared && model.maxPrepared.value }} + + + + + + \ No newline at end of file diff --git a/app/imports/ui/router.js b/app/imports/ui/router.js index 6fd075d9..bb8dc307 100644 --- a/app/imports/ui/router.js +++ b/app/imports/ui/router.js @@ -12,6 +12,7 @@ const LibraryCollectionToolbar = () => import('/imports/ui/library/LibraryCollec const CharacterSheetPage = () => import('/imports/ui/pages/CharacterSheetPage.vue'); const CharacterSheetToolbar = () => import('/imports/ui/creature/character/CharacterSheetToolbar.vue'); const CharacterSheetRightDrawer = () => import('/imports/ui/creature/character/CharacterSheetRightDrawer.vue'); +const CharacterSheetPrinted = () => import('/imports/ui/creature/character/printedCharacterSheet/CharacterSheetPrinted.vue'); const SignIn = () => import('/imports/ui/pages/SignIn.vue'); const Register = () => import('/imports/ui/pages/Register.vue'); const IconAdmin = () => import('/imports/ui/icons/IconAdmin.vue'); @@ -177,6 +178,16 @@ RouterFactory.configure(router => { meta: { title: 'Character Sheet', }, + }, { + name: 'printCharacterSheet', + path: '/print-character/:id', + alias: '/print-character/:id/:urlName', + components: { + default: CharacterSheetPrinted, + }, + meta: { + title: 'Print Character Sheet', + }, }, { path: '/tabletops', name: 'tabletops', diff --git a/app/package-lock.json b/app/package-lock.json index 1fe4cb46..6e4b3ba5 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -3169,6 +3169,11 @@ "yargs": "^15.3.1" } }, + "qrcode.vue": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz", + "integrity": "sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g==" + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", diff --git a/app/package.json b/app/package.json index b38cc787..94c1ce5a 100644 --- a/app/package.json +++ b/app/package.json @@ -44,6 +44,7 @@ "ngraph.path": "^1.4.0", "pretty-bytes": "^6.0.0", "qrcode": "^1.5.1", + "qrcode.vue": "^1.7.0", "request": "^2.88.2", "sharp": "^0.30.7", "simpl-schema": "^1.13.1", diff --git a/app/public/images/print/octogonBorder.png b/app/public/images/print/octagonBorder.png similarity index 100% rename from app/public/images/print/octogonBorder.png rename to app/public/images/print/octagonBorder.png