You've already forked obsidian-visualiser
Rename RedrawableHTML, remove File API rate limite and fix pull job transaction.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Ability, ArmorConfig, AspectConfig, CharacterConfig, CommonItemConfig, DamageType, Feature, FeatureChoice, FeatureEquipment, FeatureItem, FeatureList, FeatureTree, FeatureValue, ItemConfig, Level, MainStat, MundaneConfig, RaceConfig, Resistance, SpellConfig, TrainingLevel, WeaponConfig, WeaponType, WondrousConfig } from "~/types/character";
|
||||
import { div, dom, icon, span, text, type NodeChildren, type RedrawableHTML } from "#shared/dom";
|
||||
import { div, dom, icon, span, text, type NodeChildren, type HTMLElement } from "#shared/dom";
|
||||
import { MarkdownEditor } from "#shared/editor";
|
||||
import { preview } from "#shared/proses";
|
||||
import { button, checkbox, combobox, foldable, input, multiselect, numberpicker, optionmenu, select, tabgroup, table, toggle, type Option } from "#shared/components";
|
||||
@@ -18,10 +18,10 @@ type Rarity = ItemConfig['rarity'];
|
||||
const config = reactive(characterConfig as CharacterConfig);
|
||||
export class HomebrewBuilder
|
||||
{
|
||||
private _container: RedrawableHTML;
|
||||
private _tabs: RedrawableHTML;
|
||||
private _container: HTMLElement;
|
||||
private _tabs: HTMLElement;
|
||||
|
||||
constructor(container: RedrawableHTML)
|
||||
constructor(container: HTMLElement)
|
||||
{
|
||||
this._container = container;
|
||||
|
||||
@@ -58,7 +58,7 @@ export class HomebrewBuilder
|
||||
}).reduce((p, v) => { p[v[0]] = v[1]; return p }, {} as Record<Level, string[]>)
|
||||
};
|
||||
config.peoples[people.id] = people;
|
||||
(content[0] as RedrawableHTML).appendChild(peopleRender(people));
|
||||
(content[0] as HTMLElement).appendChild(peopleRender(people));
|
||||
}
|
||||
const render = (people: string, level: Level, feature: string) => {
|
||||
let element = dom("div", { class: ["border border-light-40 dark:border-dark-40 cursor-pointer px-2 py-1 w-[400px] hover:border-light-50 dark:hover:border-dark-50"], listeners: { click: e => {
|
||||
@@ -144,7 +144,7 @@ export class HomebrewBuilder
|
||||
])
|
||||
}
|
||||
|
||||
const _options = MAIN_STATS.reduce((p, v) => { p[v] = statRenderBlock(v); return p; }, {} as Record<MainStat, RedrawableHTML[][]>);
|
||||
const _options = MAIN_STATS.reduce((p, v) => { p[v] = statRenderBlock(v); return p; }, {} as Record<MainStat, HTMLElement[][]>);
|
||||
|
||||
const _statIndicator = dom('span', { class: 'rounded-full w-3 h-3 bg-accent-blue absolute transition-[left] after:content-[attr(data-text)] after:absolute after:-translate-x-1/2 after:top-4 after:p-px after:bg-light-0 dark:after:bg-dark-0 after:text-center' });
|
||||
const _statContainer = div('relative select-none transition-[left] flex flex-1 flex-row max-w-full', Object.values(_options).map(e => div('flex flex-shrink-0 flex-col gap-4 relative w-full overflow-y-auto px-8', e.flatMap(_e => [..._e]))));
|
||||
@@ -507,7 +507,7 @@ class FeatureEditor
|
||||
private _arr: boolean;
|
||||
private option!: FeatureOption;
|
||||
|
||||
container!: RedrawableHTML;
|
||||
container!: HTMLElement;
|
||||
|
||||
constructor(list: Record<string, FeatureOption> | FeatureOption[], id: string, draft: boolean)
|
||||
{
|
||||
@@ -795,7 +795,7 @@ export class FeaturePanel
|
||||
}
|
||||
static edit(feature: Feature): Promise<Feature>
|
||||
{
|
||||
let container: RedrawableHTML, close: Function;
|
||||
let container: HTMLElement, close: Function;
|
||||
return new Promise<Feature>((success, failure) => {
|
||||
container = FeaturePanel.render(feature, success, failure);
|
||||
close = fullblocker([container], {
|
||||
@@ -869,7 +869,7 @@ export class ItemPanel
|
||||
}
|
||||
static edit(item: ItemConfig): Promise<ItemConfig>
|
||||
{
|
||||
let container: RedrawableHTML, close: Function;
|
||||
let container: HTMLElement, close: Function;
|
||||
return new Promise<ItemConfig>((success, failure) => {
|
||||
container = ItemPanel.render(item, success, failure);
|
||||
close = fullblocker([container], {
|
||||
|
||||
Reference in New Issue
Block a user