Merge branch 'develop'

This commit is contained in:
Stefan Zermatten
2022-12-05 11:17:13 +02:00
9 changed files with 82 additions and 80 deletions

View File

@@ -39,6 +39,14 @@ export default {
.column-layout>div,
.column-layout>span>div {
display: table;
table-layout: fixed;
width: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
transform: translateX(0);
-webkit-transform: translateX(0);
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
padding: 4px;

View File

@@ -5,7 +5,7 @@
</v-toolbar-title>
<div>
<p v-if="name">
Type "{{ name }}" to permanenetly delete the character
Type "{{ name }}" to permanently delete the character
</p>
<v-text-field
v-if="name"

View File

@@ -28,7 +28,7 @@
@remove="softRemove"
/>
<div
v-if="!creature.settings.hideRestButtons || (properties.action.event && properties.action.event.length)"
v-if="!creature.settings.hideRestButtons || (properties.action && properties.action.event && properties.action.event.length)"
class="character-buttons"
>
<v-card>

View File

@@ -32,7 +32,7 @@
light
>
<div class="page pa-3">
<div class="px-3 d-flex align-center">
<div class="title-block px-3 d-flex align-center">
<div class="logo-background" />
<div class="creature-name mr-3">
{{ creature.name }}
@@ -258,19 +258,11 @@ export default {
.character-sheet-printed .column-layout>div {
position:relative;
display: block;
width: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-webkit-column-break-inside: avoid;
break-inside: avoid;
page-break-inside: avoid;
}
.character-sheet-printed .column-layout>div>* {
-webkit-column-break-inside: avoid;
break-inside: avoid;
}
.character-sheet-printed .column-layout > div > * {
page-break-inside: avoid;
}
.character-sheet-printed .inactive {
opacity: 1 !important;
}
@@ -295,38 +287,26 @@ export default {
.character-sheet-printed .double-border {
position: relative;
padding: 11px 10px;
}
.character-sheet-printed .double-border::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border-image-source: url(/images/print/doubleLineImageBorder.png);
border-image-slice: 110 126 fill;
border-image-width: 16px;
border-image-repeat: stretch;
box-sizing: content-box;
z-index: -1;
}
.character-sheet-printed .octagon-border {
position: relative;
padding: 4px 20px;
}
.character-sheet-printed .octagon-border::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border-image: url(/images/print/octagonBorder.png) 124 118 fill;
border-image-width: 22px;
z-index: -1;
}
.character-sheet-printed .span-all {
page-break-after: avoid;
break-after: avoid;
}
.span-all + div {
page-break-before: avoid;
break-before: avoid;
}
.character-sheet-printed .stats .label {
@@ -355,13 +335,32 @@ export default {
}
}
@media print {
@page {
size: auto;
margin: 8mm 8mm 8mm 8mm;
}
body {
margin: 0;
}
.character-sheet-printed .page {
width: 100%;
padding: 0 !important;
}
.character-sheet-printed .column-layout {
padding: 4px 0 !important;
}
.character-sheet-printed .title-block {
padding-left: 0 !important;
padding-right: 4px !important;
}
.v-main, .v-application, .v-application--wrap, .character-sheet-printed {
display: block;
display: block !important;
background-color: white !important;
}
header {
display: none !important;
html {
background-color: white !important;
}
nav {
header, nav, .v-snack, .dialog-stack {
display: none !important;
}
.v-main {

View File

@@ -1,7 +1,6 @@
<template lang="html">
<div
class="inventory"
style="page-break-before: always;"
>
<column-layout wide-columns>
<div class="span-all">

View File

@@ -1,7 +1,6 @@
<template lang="html">
<div
class="spells"
style="page-break-before: always;"
>
<column-layout wide-columns>
<div class="span-all">

View File

@@ -534,21 +534,10 @@ export default {
position: relative;
aspect-ratio: 0.87;
padding: 12px;
}
.shield-border::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: url(/images/print/shieldBorder.png);
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
z-index: -1;
}
.shield-number-label {
align-items: center !important;
@@ -577,23 +566,13 @@ export default {
font-size: 10pt;
position: relative;
padding: 0 16px;
z-index: 2;
}
.ability .bottom::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: solid white;
border-image-source: url(/images/print/upwardPointingBorder.png);
border-image-slice: 0 85 fill;
border-image-width: 0 16px;
border-image-outset: 0px 0px;
border-image-repeat: stretch;
box-sizing: content-box;
z-index: -1;
z-index: 2;
}
.ability .name {
margin-top: 10px;

View File

@@ -42,6 +42,7 @@
:key="i"
:to="link.to"
:href="link.href"
:target="link.href ? '_blank': undefined"
>
<v-list-item-action>
<v-icon>{{ link.icon }}</v-icon>
@@ -103,7 +104,7 @@ export default {
{ title: 'About', icon: 'mdi-sign-text', to: '/about' },
{ title: 'Documentation', icon: 'mdi-book-open-variant', to: '/docs' },
{ title: 'Patreon', icon: 'mdi-patreon', href: 'https://www.patreon.com/dicecloud' },
{ title: 'Github', icon: 'mdi-github', href: 'https://github.com/ThaumRystra/DiceCloud/tree/version-2' },
{ title: 'Github', icon: 'mdi-github', href: 'https://github.com/ThaumRystra/DiceCloud/' },
];
return links.filter(link => !link.requireLogin || isLoggedIn);
},

View File

@@ -5,11 +5,21 @@
@toolbarclick="clickSpellList(model._id)"
>
<template slot="toolbar">
<v-toolbar-title>
<v-toolbar-title
v-if="!preparingSpells"
>
{{ model.name }}
</v-toolbar-title>
<v-spacer v-if="!preparingSpells && preparedError" />
<v-toolbar-title
v-if="preparingSpells || preparedError"
:class="{'error--text' : preparedError}"
>
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared
</v-toolbar-title>
<v-spacer />
<v-menu
v-if="!preparingSpells"
bottom
left
transition="slide-y-transition"
@@ -33,22 +43,29 @@
/>
</v-list>
</v-menu>
</template>
<v-expand-transition>
<v-card-text
v-if="preparedError || preparingSpells"
:class="{'error--text' : preparedError}"
class="pb-0"
<v-btn
v-else
icon
@click.stop="preparingSpells = false"
>
<div v-if="model.maxPrepared && model.maxPrepared.value">
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared
</div>
<v-switch
v-model="preparingSpells"
label="Change prepared spells"
/>
</v-card-text>
</v-expand-transition>
<v-icon>mdi-check</v-icon>
</v-btn>
</template>
<!-- Disabled because it changes the height of the card
<v-card-text
v-if="preparedError || preparingSpells"
:class="{'error--text' : preparedError}"
class="pb-0"
>
<div v-if="model.maxPrepared && model.maxPrepared.value">
{{ numPrepared }}/{{ model.maxPrepared.value }} spells prepared
</div>
<v-switch
v-model="preparingSpells"
label="Change prepared spells"
/>
</v-card-text>
-->
<spell-list
:spells="spells"
:parent-ref="{id: model._id, collection: 'creatureProperties'}"