Skip to content

Commit

Permalink
Merge branch 'release/2.32.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HarmlessHarm committed Nov 8, 2024
2 parents e1bc516 + badf499 commit a582b7a
Show file tree
Hide file tree
Showing 23 changed files with 625 additions and 200 deletions.
88 changes: 43 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.31.4",
"version": "2.32.0",
"name": "shieldmaiden",
"description": "A Dungeons and Dragons Combat Tracker",
"productName": "Shieldmaiden",
Expand Down
10 changes: 2 additions & 8 deletions src/components/combat/TargetAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
!entity.reminder?.surprised)
? 'url(' + entity.img + ')'
: '',
'border-color': entity.color_label ? entity.color_label : ``,
color: entity.color_label ? entity.color_label : ``,
}"
>
<template v-if="icons && entity.hidden">
<hk-icon icon="fas fa-eye-slash" class="red" />
<hk-icon icon="fas fa-eye-slash" class="red" :class="{ 'neutral-1': entity.color_label }" />
<q-tooltip anchor="top middle" self="center middle">Hidden</q-tooltip>
</template>
<template v-else-if="icons && entity.transformed">
<hk-icon icon="fas fa-paw-claws" />
<hk-icon icon="fas fa-paw-claws" :class="{ 'neutral-1': entity.color_label }" />
<q-tooltip anchor="top middle" self="center middle">Transformed</q-tooltip>
</template>
<template v-else-if="icons && entity.reminders?.surprised">
Expand Down Expand Up @@ -49,11 +48,6 @@ export default {
default: true,
},
},
data() {
return {};
},
methods: {},
mounted() {},
};
</script>

Expand Down
16 changes: 6 additions & 10 deletions src/components/combat/TargetItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
<div class="target-item-wrapper">
<div class="target-item bg-neutral-8" :class="{ hasInitiative: initiative }">
<!-- INITIATIVE -->
<span
class="initiative"
v-if="initiative"
@click.stop
:style="{ color: entity.color_label ? entity.color_label : `` }"
>
<span class="initiative truncate" v-if="initiative" @click.stop>
{{ entity.initiative }}
<q-popup-proxy
:dark="$store.getters.theme === 'dark'"
Expand Down Expand Up @@ -65,7 +60,7 @@
:dark="$store.getters.theme === 'dark'"
flat
v-model="editable_entity.color_label"
:palette="hkColors"
:palette="shieldmaiden_colors"
default-view="palette"
/>
<div class="d-flex justify-content-end mt-2">
Expand All @@ -91,8 +86,8 @@
</TargetAvatar>

<!-- ARMOR CLASS -->
<div class="ac_wrapper" @click.stop>
<i aria-hidden="true" class="fas fa-shield"></i>
<div class="ac_wrapper" :style="{ color: entity.color_label || null }" @click.stop>
<i aria-hidden="true" class="fas fa-shield" />
<span
v-if="entity.ac_bonus"
class="ac"
Expand Down Expand Up @@ -418,9 +413,11 @@
<script>
import { mapGetters, mapActions } from "vuex";
import TargetAvatar from "./TargetAvatar.vue";
import { colors } from "src/mixins/colors";
export default {
name: "TargetItem",
mixins: [colors],
components: {
TargetAvatar,
},
Expand All @@ -446,7 +443,6 @@ export default {
user: this.$store.getters.user || {},
target: "",
entitySetter: undefined,
hkColors: ["#88b3ce", "#9ac16a", "#c45e66", "#db815e", "#e2da5f", "#9b7aba"],
};
},
computed: {
Expand Down
7 changes: 4 additions & 3 deletions src/components/combat/Targeted.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
? {
encounter_id: encounterId,
entity_key: key,
}
}
: null
"
>
Expand Down Expand Up @@ -123,7 +123,7 @@
? {
encounter_id: encounterId,
entity_key: key,
}
}
: null
"
>
Expand Down Expand Up @@ -260,7 +260,7 @@ export default {
return this.targeted.length > 1
? this.options.filter((opt) => {
return !["transform"].includes(opt.option);
})
})
: this.options;
},
},
Expand Down Expand Up @@ -471,6 +471,7 @@ export default {
border-radius: $border-radius-small;
border: none;
cursor: pointer;
text-align: center;
&:hover {
background: $neutral-4;
Expand Down
17 changes: 14 additions & 3 deletions src/components/drawers/editEncounter/EditEntity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
:style="{
backgroundImage: 'url(\'' + npc.avatar + '\')',
'border-color': npc.color_label ? npc.color_label : ``,
'background-color': npc.color_label ? npc.color_label : ``,
color: npc.color_label ? npc.color_label : ``,
}"
>
<i aria-hidden="true" v-if="!npc.avatar" class="hki-monster" />
<i
aria-hidden="true"
v-if="!npc.avatar"
class="hki-monster"
:class="{ 'neutral-1': npc.color_label }"
/>
</div>
<ValidationProvider
rules="url|max:2000"
Expand Down Expand Up @@ -67,7 +73,11 @@
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy transition-show="scale" transition-hide="scale">
<q-color v-model="npc.color_label" :palette="hkColors" default-view="palette" />
<q-color
v-model="npc.color_label"
:palette="shieldmaiden_colors"
default-view="palette"
/>
</q-popup-proxy>
</q-icon>
</template>
Expand Down Expand Up @@ -156,18 +166,19 @@

<script>
import { mapActions } from "vuex";
import { colors } from "src/mixins/colors";

export default {
name: "EditNpc",
props: ["data"],
mixins: [colors],
data() {
return {
demo: this.$route.name === "ToolsBuildEncounter",
campaignId: this.$route.params.campid,
encounterId: this.$route.params.encid,
npc: { ...this.data.npc },
encounter: this.data.encounter,
hkColors: ["#88b3ce", "#9ac16a", "#c45e66", "#db815e", "#e2da5f", "#9b7aba"],
};
},
methods: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/drawers/encounter/AddNpc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

<q-tab-panels v-model="tab" class="bg-transparent mt-3">
<q-tab-panel name="npc">
<a class="btn bg-neutral-5 full-width mb-3" @click="copy_dialog = true">
<button class="btn bg-neutral-5 full-width mb-3" @click="copy_dialog = true">
<i aria-hidden="true" class="fas fa-copy" /> Copy NPC
</a>
</button>

<ValidationObserver v-slot="{ handleSubmit, validate, valid }">
<q-form @submit="valid ? handleSubmit(addNPC) : validate()" greedy>
Expand Down
5 changes: 3 additions & 2 deletions src/components/drawers/encounter/EditEntity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
square
:dark="$store.getters.theme === 'dark'"
v-model="entity.color_label"
:palette="hkColors"
:palette="shieldmaiden_colors"
default-view="palette"
@input="editValue('color_label', entity.color_label)"
/>
Expand Down Expand Up @@ -313,13 +313,15 @@
<script>
import { mapActions, mapGetters } from "vuex";
import TargetItem from "src/components/combat/TargetItem.vue";
import { colors } from "src/mixins/colors";
export default {
name: "EditEntity",
components: {
TargetItem,
},
props: ["data"],
mixins: [colors],
data() {
return {
demo: this.$route.name === "Demo",
Expand All @@ -329,7 +331,6 @@ export default {
maxHpMod: undefined,
tempHp: undefined,
ac_bonus: undefined,
hkColors: ["#88b3ce", "#9ac16a", "#c45e66", "#db815e", "#e2da5f", "#9b7aba"],
npcsOptions: [
{
key: "name",
Expand Down
Loading

0 comments on commit a582b7a

Please sign in to comment.