mirror of
https://github.com/alexkurowski/solo-toolkit.git
synced 2026-07-22 10:10:32 +00:00
Merge branch 'main' into feat/map-generator
This commit is contained in:
commit
2de49bd925
2 changed files with 24 additions and 7 deletions
|
|
@ -4,12 +4,14 @@ import SoloToolkitPlugin from "../main";
|
|||
export interface SoloToolkitSettings {
|
||||
customTableRoot: string;
|
||||
deckJokers: boolean;
|
||||
deckTarot: boolean;
|
||||
inlineCounters: boolean;
|
||||
}
|
||||
|
||||
export const DEFAULT_SETTINGS: SoloToolkitSettings = {
|
||||
customTableRoot: "Tables",
|
||||
deckJokers: false,
|
||||
deckTarot: false,
|
||||
inlineCounters: false,
|
||||
};
|
||||
|
||||
|
|
@ -36,7 +38,19 @@ export class SoloToolkitSettingTab extends PluginSettingTab {
|
|||
.onChange(async (value) => {
|
||||
this.plugin.settings.customTableRoot = value;
|
||||
await this.plugin.saveSettings();
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Enable additional tarot deck")
|
||||
.setDesc("22 cards of the major arcana")
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.deckTarot)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.deckTarot = value;
|
||||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
|
|
@ -48,13 +62,13 @@ export class SoloToolkitSettingTab extends PluginSettingTab {
|
|||
.onChange(async (value) => {
|
||||
this.plugin.settings.deckJokers = value;
|
||||
await this.plugin.saveSettings();
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Enable inline counters")
|
||||
.setDesc(
|
||||
"Typing `1` will render a dynamic counter, typing `1/5` will render a progress tracker",
|
||||
"Typing `1` will render a dynamic counter, typing `1/5` will render a progress tracker"
|
||||
)
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
|
|
@ -62,7 +76,7 @@ export class SoloToolkitSettingTab extends PluginSettingTab {
|
|||
.onChange(async (value) => {
|
||||
this.plugin.settings.inlineCounters = value;
|
||||
await this.plugin.saveSettings();
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,12 @@ export class DeckView {
|
|||
this.btnsEls.push(this.view.tabViewEl.createDiv("deck-buttons"));
|
||||
this.createDeckBtns();
|
||||
this.createDeckCounter();
|
||||
this.btnsEls.push(this.view.tabViewEl.createDiv("deck-buttons"));
|
||||
this.createTarotBtns();
|
||||
this.createTarotCounter();
|
||||
|
||||
if (this.view.settings.deckTarot) {
|
||||
this.btnsEls.push(this.view.tabViewEl.createDiv("deck-buttons"));
|
||||
this.createTarotBtns();
|
||||
this.createTarotCounter();
|
||||
}
|
||||
|
||||
if (!this.view.isMobile) {
|
||||
this.resultsEl = this.view.tabViewEl.createDiv("deck-results");
|
||||
|
|
|
|||
Loading…
Reference in a new issue