Skip to content

Commit

Permalink
fix: Removes legacy creator option
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Mar 21, 2024
1 parent 6d1b0e0 commit d8f6cdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
10 changes: 1 addition & 9 deletions src/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,7 @@ export default class InitiativeTrackerSettings extends PluginSettingTab {
await this.plugin.saveSettings();
});
});
new Setting(containerEl)
.setName("Use Legacy 'Add Creatures'")
.setDesc("Use the legacy way to add creatures.")
.addToggle((t) => {
t.setValue(this.plugin.data.useLegacy).onChange(async (v) => {
this.plugin.data.useLegacy = v;
await this.plugin.saveSettings();
});
});

new Setting(containerEl)
.setName("Embed statblock-link content in the Creature View")
.setDesc(
Expand Down
22 changes: 3 additions & 19 deletions src/tracker/ui/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,10 @@
let saving = false;
let loading = false;
let legacy = false,
editing: Creature;
const editOrAdd = (creature?: Creature) => {
if (plugin.data.useLegacy) {
legacy = true;
editing = creature;
} else {
const modal = new AddCreatureModal(plugin, creature);
modal.onClose = () => {};
modal.open();
}
const modal = new AddCreatureModal(plugin, creature);
modal.onClose = () => {};
modal.open();
};
const addButton = (node: HTMLElement) => {
new ExtraButtonComponent(node).setTooltip("Add Creature").setIcon(ADD);
Expand Down Expand Up @@ -95,15 +88,6 @@
<SaveEncounter on:cancel={() => (saving = false)} />
{:else if loading}
<LoadEncounter on:cancel={() => (loading = false)} />
{:else if legacy}
<Legacy
{plugin}
creature={editing}
on:close={() => {
legacy = false;
editing = null;
}}
/>
{:else}
<div class="add-creature-container">
<div class="context-container">
Expand Down

0 comments on commit d8f6cdb

Please sign in to comment.