Most of CC flow complete. Refactored css. Code is now a mess. Navbar > Sidebar. CSS still hates me move to tailwind 🙏
This commit is contained in:
1 parent
8be4c8d571
commit
a73c5ea002
10 files changed
+10331
-195
No files matched your search
+5590
-54
File diff suppressed because it is too large.
Load diff
+1983
-91
File diff suppressed because it is too large.
Load diff
Vendored
+172
@@ -6,6 +6,14 @@ interface DesktopApi {
|
||||
pickSourceZip: () => Promise<string | null>;
|
||||
runSetup: (input: SetupRunInput) => Promise<SetupRunResult>;
|
||||
resetOnboarding: () => Promise<SetupRunResult>;
|
||||
listCharacters: () => Promise<CharacterSummary[]>;
|
||||
getCharacter: (id: string) => Promise<CharacterDocument | null>;
|
||||
saveCharacter: (input: CharacterUpsertInput) => Promise<CharacterDocument>;
|
||||
deleteCharacter: (id: string) => Promise<boolean>;
|
||||
getCharacterOptions: () => Promise<CharacterSelectionOptionSets>;
|
||||
getCharacterOptionDetail: (entityRef: string) => Promise<CharacterSelectionDetail | null>;
|
||||
pickCharacterJson: () => Promise<string | null>;
|
||||
importCharacterJson: (filePath: string) => Promise<CharacterDocument>;
|
||||
}
|
||||
|
||||
interface SetupState {
|
||||
@@ -30,6 +38,170 @@ interface SetupRunResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
type CharacterEntityType = "class" | "background" | "species";
|
||||
type CharacterSourceBucket = "homebrew" | "core2024" | "expanded2024" | "core2014" | "expanded2014";
|
||||
|
||||
interface CharacterSelectionOption {
|
||||
entityType: CharacterEntityType;
|
||||
name: string;
|
||||
source: string;
|
||||
hash: string;
|
||||
entityRef: string;
|
||||
details: string;
|
||||
sourceName: string;
|
||||
sourceGroup: string | null;
|
||||
sourcePublished: string | null;
|
||||
sourceBucket: CharacterSourceBucket;
|
||||
sourceEdition: "2014" | "2024" | null;
|
||||
imagePath: string | null;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
interface CharacterFeatureOption {
|
||||
name: string;
|
||||
source: string;
|
||||
hash: string;
|
||||
entityRef: string;
|
||||
details: string;
|
||||
}
|
||||
|
||||
interface CharacterFeatureCard {
|
||||
id: string;
|
||||
title: string;
|
||||
level: number | null;
|
||||
summary: string;
|
||||
options?: CharacterFeatureOption[];
|
||||
}
|
||||
|
||||
interface CharacterSelectionDetail extends CharacterSelectionOption {
|
||||
featureCards: CharacterFeatureCard[];
|
||||
rawJson: string;
|
||||
}
|
||||
|
||||
interface CharacterSelectionOptionSets {
|
||||
classes: CharacterSelectionOption[];
|
||||
backgrounds: CharacterSelectionOption[];
|
||||
species: CharacterSelectionOption[];
|
||||
}
|
||||
|
||||
interface CharacterEntityRef {
|
||||
entityType: "class" | "subclass" | "background" | "species" | "item" | "feat" | "spell";
|
||||
name: string;
|
||||
source: string;
|
||||
hash: string;
|
||||
entityRef: string;
|
||||
}
|
||||
|
||||
interface CharacterProfile {
|
||||
name: string;
|
||||
level: number;
|
||||
alignment: string;
|
||||
faith: string;
|
||||
lifestyle: string;
|
||||
age: string;
|
||||
gender: string;
|
||||
height: string;
|
||||
weight: string;
|
||||
eyes: string;
|
||||
skin: string;
|
||||
hair: string;
|
||||
}
|
||||
|
||||
interface CharacterPreferencesStep {
|
||||
sourceBuckets: string[];
|
||||
useOptionalClassFeatures: boolean;
|
||||
customizeOrigin: boolean;
|
||||
advancementType: "milestone" | "xp";
|
||||
hpMode: "average" | "maximum" | "rolled";
|
||||
usePrerequisitesFeats: boolean;
|
||||
usePrerequisitesMulticlass: boolean;
|
||||
}
|
||||
|
||||
interface CharacterAbilityScoresStep {
|
||||
method: "standardArray" | "pointBuy" | "manual" | "rolled";
|
||||
scores: Record<"str" | "dex" | "con" | "int" | "wis" | "cha", number>;
|
||||
rolledValues: [number, number, number, number, number, number];
|
||||
assignments: Record<"str" | "dex" | "con" | "int" | "wis" | "cha", number>;
|
||||
backgroundBonusModeIndex: number;
|
||||
backgroundBonusSelections: Array<"str" | "dex" | "con" | "int" | "wis" | "cha">;
|
||||
}
|
||||
|
||||
interface CharacterFeatsStep {
|
||||
selected: string[];
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface CharacterSkillsStep {
|
||||
selected: string[];
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface CharacterSpellsStep {
|
||||
selected: string[];
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface CharacterEquipmentStep {
|
||||
startingEquipmentText: string;
|
||||
inventoryText: string;
|
||||
possessionsText: string;
|
||||
currency: Record<"cp" | "sp" | "ep" | "gp" | "pp", number>;
|
||||
}
|
||||
|
||||
interface CharacterAboutStep {
|
||||
personality: string;
|
||||
ideals: string;
|
||||
bonds: string;
|
||||
flaws: string;
|
||||
backstory: string;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface CharacterDocument {
|
||||
schema: "5etd.character";
|
||||
version: 1;
|
||||
id: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
profile: CharacterProfile;
|
||||
selections: {
|
||||
class: CharacterEntityRef | null;
|
||||
subclass: CharacterEntityRef | null;
|
||||
background: CharacterEntityRef | null;
|
||||
species: CharacterEntityRef | null;
|
||||
};
|
||||
steps: {
|
||||
preferences: CharacterPreferencesStep;
|
||||
abilityScores: CharacterAbilityScoresStep;
|
||||
feats: CharacterFeatsStep;
|
||||
skills: CharacterSkillsStep;
|
||||
spells: CharacterSpellsStep;
|
||||
equipment: CharacterEquipmentStep;
|
||||
about: CharacterAboutStep;
|
||||
};
|
||||
notes: string;
|
||||
}
|
||||
|
||||
interface CharacterSummary {
|
||||
id: string;
|
||||
name: string;
|
||||
level: number;
|
||||
className: string | null;
|
||||
backgroundName: string | null;
|
||||
speciesName: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
interface CharacterUpsertInput {
|
||||
id?: string;
|
||||
profile?: Partial<CharacterProfile>;
|
||||
selections?: Partial<CharacterDocument["selections"]>;
|
||||
steps?: Partial<CharacterDocument["steps"]>;
|
||||
notes?: string;
|
||||
createdAt?: string;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
desktopApi: DesktopApi;
|
||||
}
|
||||
+71
-21
@@ -1,40 +1,90 @@
|
||||
export interface WikiNavItem {
|
||||
export interface WikiTopbarItem {
|
||||
label: string;
|
||||
path: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface WikiNavSection {
|
||||
title: string;
|
||||
items: WikiNavItem[];
|
||||
export interface WikiTopbarMenu {
|
||||
label: string;
|
||||
items: WikiTopbarItem[];
|
||||
}
|
||||
|
||||
export const WIKI_NAV_SECTIONS: WikiNavSection[] = [
|
||||
export const WIKI_TOPBAR_MENUS: WikiTopbarMenu[] = [
|
||||
{
|
||||
title: "Core",
|
||||
label: "Home",
|
||||
items: [
|
||||
{ label: "Home", path: "/5etools.html", description: "Main dashboard and tools" },
|
||||
{ label: "Search", path: "/search.html", description: "Global content search" },
|
||||
{ label: "Rules", path: "/variantrules.html", description: "System and optional rules" },
|
||||
{ label: "Dashboard", path: "/5etools.html" },
|
||||
{ label: "Quick Reference", path: "/quickreference.html" },
|
||||
{ label: "Search", path: "/search.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Character",
|
||||
label: "Rules",
|
||||
items: [
|
||||
{ label: "Classes", path: "/classes.html", description: "Class and subclass details" },
|
||||
{ label: "Backgrounds", path: "/backgrounds.html", description: "Origin and backstory options" },
|
||||
{ label: "Species", path: "/races.html", description: "Species and lineages" },
|
||||
{ label: "Feats", path: "/feats.html", description: "Character feat selection" },
|
||||
{ label: "Optional Features", path: "/optionalfeatures.html", description: "Expanded build options" }
|
||||
{ label: "Variant Rules", path: "/variantrules.html" },
|
||||
{ label: "Actions", path: "/actions.html" },
|
||||
{ label: "Conditions", path: "/conditionsdiseases.html" },
|
||||
{ label: "Tables", path: "/tables.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Compendium",
|
||||
label: "Player",
|
||||
items: [
|
||||
{ label: "Spells", path: "/spells.html", description: "Spell catalog and filters" },
|
||||
{ label: "Items", path: "/items.html", description: "Equipment and magic items" },
|
||||
{ label: "Bestiary", path: "/bestiary.html", description: "Creatures and stat blocks" },
|
||||
{ label: "Tables", path: "/tables.html", description: "Reference tables and charts" }
|
||||
{ label: "Species", path: "/races.html" },
|
||||
{ label: "Classes", path: "/classes.html" },
|
||||
{ label: "Backgrounds", path: "/backgrounds.html" },
|
||||
{ label: "Feats", path: "/feats.html" },
|
||||
{ label: "Optional Features", path: "/optionalfeatures.html" },
|
||||
{ label: "Spells", path: "/spells.html" },
|
||||
{ label: "Items", path: "/items.html" },
|
||||
{ label: "Stat Generator", path: "/statgen.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Dungeon Master",
|
||||
items: [
|
||||
{ label: "Bestiary", path: "/bestiary.html" },
|
||||
{ label: "DM Screen", path: "/dmscreen.html" },
|
||||
{ label: "Encounter Builder", path: "/encountergen.html" },
|
||||
{ label: "Maps", path: "/maps.html" },
|
||||
{ label: "Traps & Hazards", path: "/trapshazards.html" },
|
||||
{ label: "Deities", path: "/deities.html" },
|
||||
{ label: "Objects", path: "/objects.html" },
|
||||
{ label: "Vehicles", path: "/vehicles.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "References",
|
||||
items: [
|
||||
{ label: "Adventures", path: "/adventures.html" },
|
||||
{ label: "Books", path: "/books.html" },
|
||||
{ label: "Rewards", path: "/rewards.html" },
|
||||
{ label: "Psionics", path: "/psionics.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Utilities",
|
||||
items: [
|
||||
{ label: "Name Generator", path: "/names.html" },
|
||||
{ label: "Loot Generator", path: "/lootgen.html" },
|
||||
{ label: "CR Calculator", path: "/crcalculator.html" },
|
||||
{ label: "Converter", path: "/converter.html" },
|
||||
{ label: "Decks", path: "/decks.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Settings",
|
||||
items: [
|
||||
{ label: "Manage Homebrew", path: "/managebrew.html" },
|
||||
{ label: "Manage Prerelease", path: "/manageprerelease.html" },
|
||||
{ label: "Blocklist", path: "/blocklist.html" },
|
||||
{ label: "Changelog", path: "/changelog.html" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Help",
|
||||
items: [
|
||||
{ label: "Privacy Policy", path: "/privacy-policy.html" },
|
||||
{ label: "Plutonium", path: "/plutonium.html" }
|
||||
]
|
||||
}
|
||||
];
|
||||
Reference in new issue
Block a user