mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.208.0
This commit is contained in:
74
js/utils-config/utils-config-registry.js
Normal file
74
js/utils-config/utils-config-registry.js
Normal file
@@ -0,0 +1,74 @@
|
||||
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,
|
||||
];
|
||||
Reference in New Issue
Block a user