mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
75 lines
2.1 KiB
JavaScript
75 lines
2.1 KiB
JavaScript
import {ConfigSettingsGroup} from "./util-config-settings-group.js";
|
|
import {ConfigSettingBoolean, ConfigSettingEnum, ConfigSettingExternal} from "./utils-config-setting-base.js";
|
|
|
|
const settingsGroupStyleSwitcher = new ConfigSettingsGroup({
|
|
groupId: "styleSwitcher",
|
|
name: "Appearance",
|
|
configSettings: [
|
|
new (
|
|
class extends ConfigSettingExternal {
|
|
_configId = "theme";
|
|
_name = "Theme";
|
|
_help = "The color theme to be applied.";
|
|
_isRowLabel = true;
|
|
|
|
_getEleExternal () { return StyleSwitcher.getSelStyle(); }
|
|
}
|
|
)(),
|
|
new (
|
|
class extends ConfigSettingExternal {
|
|
_configId = "isWideMode";
|
|
_name = "Wide Mode (Experimental)";
|
|
_help = "This feature is unsupported. Expect bugs.";
|
|
_isRowLabel = true;
|
|
|
|
_getEleExternal () { return StyleSwitcher.getCbWide(); }
|
|
}
|
|
)(),
|
|
],
|
|
});
|
|
|
|
const _MARKDOWN_TAG_RENDER_MODES = {
|
|
"convertMarkdown": "Convert to Markdown",
|
|
"ignore": "Leave As-Is",
|
|
"convertText": "Convert to Text",
|
|
};
|
|
|
|
const settingsGroupMarkdown = new ConfigSettingsGroup({
|
|
groupId: "markdown",
|
|
name: "Markdown",
|
|
configSettings: [
|
|
new ConfigSettingEnum({
|
|
configId: "tagRenderMode",
|
|
name: `Tag Handling (<code>@tag</code>)`,
|
|
help: `THe output to produce when rendering a 5etools "@tag".`,
|
|
isRowLabel: true,
|
|
default: "convertMarkdown",
|
|
values: [
|
|
"convertMarkdown",
|
|
"ignore",
|
|
"convertText",
|
|
],
|
|
fnDisplay: it => _MARKDOWN_TAG_RENDER_MODES[it] || it,
|
|
}),
|
|
new ConfigSettingBoolean({
|
|
configId: "isAddColumnBreaks",
|
|
name: `Add GM Binder Column Breaks (<code>\\\\columnbreak</code>)`,
|
|
help: `If "\\\\columnbreak"s should be added to exported Markdown, at an approximate column breakpoint.`,
|
|
isRowLabel: true,
|
|
default: false,
|
|
}),
|
|
new ConfigSettingBoolean({
|
|
configId: "isAddPageBreaks",
|
|
name: `Add GM Binder Page Breaks (<code>\\\\pagebreak</code>)`,
|
|
help: `If "\\\\pagebreak"s should be added to exported Markdown, at an approximate page breakpoint.`,
|
|
isRowLabel: true,
|
|
default: false,
|
|
}),
|
|
],
|
|
});
|
|
|
|
export const SETTINGS_GROUPS = [
|
|
settingsGroupStyleSwitcher,
|
|
settingsGroupMarkdown,
|
|
];
|