Skip to content

Commit 4fc188a

Browse files
committed
Merge branch 'release/2.37.0' into main
2 parents 2fdf580 + 2c6f385 commit 4fc188a

File tree

17 files changed

+1166
-594
lines changed

17 files changed

+1166
-594
lines changed

package-lock.json

Lines changed: 301 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.36.0",
2+
"version": "2.37.0",
33
"name": "shieldmaiden",
44
"description": "A Dungeons and Dragons Combat Tracker",
55
"productName": "Shieldmaiden",
@@ -30,6 +30,8 @@
3030
"firebase": "^8.0.0",
3131
"firebase-admin": "^13.4.0",
3232
"helmet": "^7.1.0",
33+
"html2canvas": "^1.4.1",
34+
"jspdf": "^3.0.1",
3335
"jwt-decode": "^3.1.2",
3436
"lodash": "^4.17.21",
3537
"marked": "^4.0.16",
22.2 KB
Binary file not shown.
18.6 KB
Binary file not shown.

src/components/CopyContent.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
no-caps
99
toggle-color="primary"
1010
@input="changeCopyResource($event)"
11-
:options="[
12-
{ label: `Custom ${type === 'monster' ? 'NPC' : type}s`, value: 'custom' },
13-
{ label: `SRD ${type}s`, value: 'srd' },
14-
]"
11+
:options="options"
1512
/>
1613
<hk-input
1714
:label="
@@ -135,7 +132,7 @@ export default {
135132
copy_resource_setter: undefined,
136133
show_filter: false,
137134
filter: {},
138-
pageSize: 10,
135+
pageSize: 5,
139136
page: 1,
140137
totalPages: 0,
141138
};
@@ -144,6 +141,15 @@ export default {
144141
...mapGetters("npcs", ["npcs"]),
145142
...mapGetters("items", ["items"]),
146143
...mapGetters("spells", ["spells"]),
144+
options() {
145+
const values = [
146+
{ label: `Custom`, value: "custom" },
147+
{ label: `SRD`, value: "srd" },
148+
];
149+
return this.type === "monster"
150+
? values.concat({ label: `Homebrew`, value: "homebrew" })
151+
: values;
152+
},
147153
custom_content() {
148154
let content = [];
149155
if (this.type === "monster") {
@@ -163,8 +169,11 @@ export default {
163169
: "srd";
164170
return this.copy_resource_setter ? this.copy_resource_setter : resource;
165171
},
166-
set(newVal) {
172+
async set(newVal) {
167173
this.copy_resource_setter = newVal;
174+
if (newVal !== "custom") {
175+
await this.fetchApiContent();
176+
}
168177
},
169178
},
170179
},
@@ -190,12 +199,12 @@ export default {
190199
...mapActions("api_spells", ["fetch_api_spells", "fetch_api_spell"]),
191200
...mapActions("spells", ["get_spells", "get_spell"]),
192201
changeCopyResource(value) {
193-
this.copy_resource = value;
194202
this.query = "";
195203
this.searchResults = [];
196204
this.noResult = "";
197205
this.page = 1;
198206
this.totalPages = 0;
207+
this.copy_resource = value;
199208
},
200209
async search() {
201210
// CUSTOM
@@ -240,6 +249,7 @@ export default {
240249
pageSize: this.pageSize,
241250
query: {
242251
search: this.query,
252+
source: this.copy_resource === "homebrew" ? "homebrew" : null,
243253
...this.filter,
244254
},
245255
}).then((result) => {
@@ -290,6 +300,7 @@ export default {
290300
delete result.key;
291301
delete result.url;
292302
delete result.meta;
303+
delete result.release_date;
293304
294305
this.$emit("copy", { result, id, resource: this.copy_resource });
295306
}

0 commit comments

Comments
 (0)