Skip to content

Commit

Permalink
fix: fixed issue with editing blocks in custom layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Jan 22, 2022
1 parent 086e9e1 commit 83e2bd3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/importers/importer.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ctx.onmessage = async (event) => {
ctx.postMessage({ monsters });
};

/* export default {} as typeof Worker & (new () => Worker); */
export default {} as typeof Worker & (new () => Worker);

ctx.addEventListener(
"unhandledrejection",
Expand Down
4 changes: 3 additions & 1 deletion src/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ import { FolderSuggestionModal } from "src/util/folder";
import { EditMonsterModal } from "./modal";

export default class StatblockSettingTab extends PluginSettingTab {
importer: Importer;
constructor(app: App, private plugin: StatBlockPlugin) {
super(app, plugin);
this.importer = new Importer(this.plugin);
}

async display(): Promise<void> {
Expand Down Expand Up @@ -387,7 +389,7 @@ export default class StatblockSettingTab extends PluginSettingTab {
});
}
}
importer = new Importer(this.plugin);

generateImports(containerEl: HTMLDivElement) {
containerEl.empty();
new Setting(containerEl)
Expand Down
3 changes: 2 additions & 1 deletion src/settings/ui/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import TableHeaders from "./TableHeaders.svelte";
export class BlockModal extends Modal {
block: StatblockItem;
saved: boolean;
advanced: boolean = this.plugin.settings.showAdvanced;
advanced: boolean;
constructor(public plugin: StatBlockPlugin, block?: StatblockItem) {
super(plugin.app);
this.advanced = this.plugin.settings.showAdvanced;
if (block) this.block = copy(block);
this.containerEl.addClass("statblock-edit-block");
}
Expand Down
37 changes: 0 additions & 37 deletions src/view/test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"baseUrl": ".",
"inlineSources": true,
"module": "ESNext",
"target": "esnext",
"target": "es2020",
"allowJs": true,
"noImplicitAny": true,
"moduleResolution": "node",
Expand Down

0 comments on commit 83e2bd3

Please sign in to comment.