Refactor imports and paths: implement base URL aliasing with @
, adjust TypeScript configuration, and update all relevant imports.
This commit is contained in:
16
package-lock.json
generated
16
package-lock.json
generated
@@ -9,6 +9,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
|
"@types/node": "^24.0.10",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
@@ -1637,6 +1638,15 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "24.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.10.tgz",
|
||||||
|
"integrity": "sha512-ENHwaH+JIRTDIEEbDK6QSQntAYGtbvdDXnMXnZaZ6k13Du1dPMmprkEHIL7ok2Wl2aZevetwTAb5S+7yIF+enA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/react": {
|
"node_modules/@types/react": {
|
||||||
"version": "19.1.8",
|
"version": "19.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.8.tgz",
|
||||||
@@ -3899,6 +3909,12 @@
|
|||||||
"typescript": ">=4.8.4 <5.9.0"
|
"typescript": ">=4.8.4 <5.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
||||||
|
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/universalify": {
|
"node_modules/universalify": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tailwindcss/vite": "^4.1.11",
|
"@tailwindcss/vite": "^4.1.11",
|
||||||
|
"@types/node": "^24.0.10",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"react": "^19.1.0",
|
"react": "^19.1.0",
|
||||||
"react-dom": "^19.1.0",
|
"react-dom": "^19.1.0",
|
||||||
|
20
src/App.tsx
20
src/App.tsx
@@ -1,9 +1,9 @@
|
|||||||
import './App.css'
|
import '@/App.css'
|
||||||
import Main from "./modules/main/components/Main.tsx";
|
|
||||||
import Footer from "./modules/footer/components/Footer.tsx";
|
|
||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import type {CharacterData} from "./types/CharacterJson.ts";
|
import type {CharacterData} from "@/types/CharacterJson.ts";
|
||||||
import Header from "./modules/header/components/Header.tsx";
|
import Header from "@/modules/header/components/Header.tsx";
|
||||||
|
import Footer from "@/modules/footer/components/Footer.tsx";
|
||||||
|
import Main from "@/modules/main/components/Main.tsx";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [jsonData, setJsonData] = useState<CharacterData | null>(null);
|
const [jsonData, setJsonData] = useState<CharacterData | null>(null);
|
||||||
@@ -36,11 +36,11 @@ function App() {
|
|||||||
// if (loading) return <div>Loading...</div>;
|
// if (loading) return <div>Loading...</div>;
|
||||||
|
|
||||||
if (!jsonData) return (
|
if (!jsonData) return (
|
||||||
<>
|
<>
|
||||||
<Header onFileLoad={handleFileLoad}/>
|
<Header onFileLoad={handleFileLoad}/>
|
||||||
|
|
||||||
<Footer/>
|
<Footer/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
10
src/main.tsx
10
src/main.tsx
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import ReactDOM from 'react-dom/client'
|
import ReactDOM from 'react-dom/client'
|
||||||
import App from './App'
|
import App from '@/App'
|
||||||
import './index.css'
|
import '@/index.css'
|
||||||
|
|
||||||
// Ensure root element exists
|
// Ensure root element exists
|
||||||
const rootElement = document.getElementById('root');
|
const rootElement = document.getElementById('root');
|
||||||
@@ -11,7 +11,7 @@ if (!rootElement) {
|
|||||||
|
|
||||||
// Create root and render app
|
// Create root and render app
|
||||||
ReactDOM.createRoot(rootElement).render(
|
ReactDOM.createRoot(rootElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App/>
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
);
|
);
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import ImportButton from "./ImportButton";
|
import type {CharacterData} from '@/types/CharacterJson.ts';
|
||||||
import type { CharacterData } from '../../../types/CharacterJson.ts';
|
import ImportButton from "@/modules/header/components/ImportButton";
|
||||||
|
|
||||||
interface HeaderProps {
|
interface HeaderProps {
|
||||||
onFileLoad: (data: CharacterData) => void;
|
onFileLoad: (data: CharacterData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Header({ onFileLoad }: HeaderProps) {
|
export default function Header({onFileLoad}: HeaderProps) {
|
||||||
return (
|
return (
|
||||||
<header className="bg-gray-800">
|
<header className="bg-gray-800">
|
||||||
<nav className="container mx-auto flex justify-between items-center py-6 px-6">
|
<nav className="container mx-auto flex justify-between items-center py-6 px-6">
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
import { useRef } from 'react';
|
import {useRef} from 'react';
|
||||||
import type { CharacterData } from '../../../../types/CharacterJson.ts';
|
import type {CharacterData} from '@/types/CharacterJson.ts';
|
||||||
|
|
||||||
interface ImportButtonProps {
|
interface ImportButtonProps {
|
||||||
onFileLoad: (data: CharacterData) => void;
|
onFileLoad: (data: CharacterData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ImportButton({ onFileLoad }: ImportButtonProps) {
|
export default function ImportButton({onFileLoad}: ImportButtonProps) {
|
||||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||||
|
|
||||||
const handleFileChange = async (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleFileChange = async (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const file = event.target.files?.[0];
|
const file = event.target.files?.[0];
|
||||||
|
|
||||||
@@ -38,23 +38,23 @@ export default function ImportButton({ onFileLoad }: ImportButtonProps) {
|
|||||||
fileInputRef.current.value = '';
|
fileInputRef.current.value = '';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<input
|
<input
|
||||||
ref={fileInputRef}
|
ref={fileInputRef}
|
||||||
type="file"
|
type="file"
|
||||||
accept=".json"
|
accept=".json"
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
className="hidden"
|
className="hidden"
|
||||||
id="character-import"
|
id="character-import"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
htmlFor="character-import"
|
htmlFor="character-import"
|
||||||
className="cursor-pointer bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors duration-200"
|
className="cursor-pointer bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors duration-200"
|
||||||
>
|
>
|
||||||
Charakter laden
|
Charakter laden
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import Tabs from "./Tabs";
|
import type {CharacterData} from "@/types/CharacterJson.ts";
|
||||||
import SheetHeader from "../modules/sheetHeader/components/SheetHeader.tsx";
|
import SheetHeader from "@/modules/main/modules/sheetHeader/components/SheetHeader.tsx";
|
||||||
import type {CharacterData} from "../../../types/CharacterJson.ts";
|
import Tabs from "@/modules/main/components/Tabs.tsx";
|
||||||
|
|
||||||
export default function Main({jsonData}: { jsonData: CharacterData }) {
|
export default function Main({jsonData}: { jsonData: CharacterData }) {
|
||||||
return (
|
return (
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import Skills from "../modules/skills/components/Skills.tsx";
|
import Skills from "@/modules/main/modules/skills/components/Skills.tsx";
|
||||||
import Combat from "../modules/combat/components/Combat.tsx";
|
import Combat from "@/modules/main/modules/combat/components/Combat.tsx";
|
||||||
import Equipment from "../modules/equipment/components/Equipment.tsx";
|
import Attributes from "@/modules/main/modules/attributes/components/Attributes.tsx";
|
||||||
import Attributes from "../modules/attributes/components/Attributes.tsx";
|
import Equipment from "@/modules/main/modules/equipment/components/Equipment.tsx";
|
||||||
import State from "../modules/state/components/State.tsx";
|
import State from "@/modules/main/modules/state/components/State.tsx";
|
||||||
import Magic from "../modules/magic/components/Magic.tsx";
|
import Magic from "@/modules/main/modules/magic/components/Magic.tsx";
|
||||||
import Religion from "../modules/religion/components/Religion.tsx";
|
import Religion from "@/modules/main/modules/religion/components/Religion.tsx";
|
||||||
import Notes from "../modules/notes/components/Notes.tsx";
|
import Notes from "@/modules/main/modules/notes/components/Notes.tsx";
|
||||||
import type {CharacterData} from "../../../types/CharacterJson.ts";
|
import type {CharacterData} from "@/types/CharacterJson.ts";
|
||||||
|
|
||||||
export default function Tabs({jsonData}: { jsonData: CharacterData }) {
|
export default function Tabs({jsonData}: { jsonData: CharacterData }) {
|
||||||
const [activeTab, setActiveTab] = useState("skills");
|
const [activeTab, setActiveTab] = useState("skills");
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import type {CharacterData} from "../../../../../types/CharacterJson.ts";
|
import type {CharacterData} from "@/types/CharacterJson.ts";
|
||||||
import {
|
import {
|
||||||
type AttributeWithValue,
|
type AttributeWithValue,
|
||||||
loadAttributesWithValues,
|
loadAttributesWithValues,
|
||||||
loadProfession,
|
loadProfession,
|
||||||
loadRace,
|
loadRace,
|
||||||
loadRaceVariant
|
loadRaceVariant
|
||||||
} from "../../../../../utils/loaders";
|
} from "@/utils/loaders";
|
||||||
import {useEffect, useState} from 'react';
|
import {useEffect, useState} from 'react';
|
||||||
|
|
||||||
export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
||||||
@@ -13,10 +13,10 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
const [raceVariantName, setRaceVariantName] = useState<string>(jsonData.rv || '');
|
const [raceVariantName, setRaceVariantName] = useState<string>(jsonData.rv || '');
|
||||||
const [professionName, setProfessionName] = useState<string>(jsonData.p);
|
const [professionName, setProfessionName] = useState<string>(jsonData.p);
|
||||||
const [attributes, setAttributes] = useState<AttributeWithValue[]>([]);
|
const [attributes, setAttributes] = useState<AttributeWithValue[]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isMounted = true;
|
let isMounted = true;
|
||||||
|
|
||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
try {
|
try {
|
||||||
// Load race and profession using the new loader functions
|
// Load race and profession using the new loader functions
|
||||||
@@ -25,10 +25,10 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
loadRaceVariant(jsonData.rv || ''),
|
loadRaceVariant(jsonData.rv || ''),
|
||||||
loadProfession(jsonData.p)
|
loadProfession(jsonData.p)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Process attributes using the new loadAttributesWithValues function
|
// Process attributes using the new loadAttributesWithValues function
|
||||||
const loadedAttributes = await loadAttributesWithValues(jsonData.attr.values);
|
const loadedAttributes = await loadAttributesWithValues(jsonData.attr.values);
|
||||||
|
|
||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setRaceName(race?.name || jsonData.r);
|
setRaceName(race?.name || jsonData.r);
|
||||||
setRaceVariantName(raceVariant?.name || '');
|
setRaceVariantName(raceVariant?.name || '');
|
||||||
@@ -49,19 +49,19 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
isMounted = false;
|
isMounted = false;
|
||||||
};
|
};
|
||||||
}, [jsonData.r, jsonData.rv, jsonData.p, jsonData.attr]);
|
}, [jsonData.r, jsonData.rv, jsonData.p, jsonData.attr]);
|
||||||
|
|
||||||
console.log(jsonData)
|
console.log(jsonData)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex justify-between items-center py-5 px-5">
|
<div className="flex justify-between items-end py-5 px-5">
|
||||||
<div className="w-[30%]">
|
<div className="w-[30%]">
|
||||||
<p className="border-b border-gray-500 font-semibold">
|
<p className="border-b border-gray-500 font-semibold">
|
||||||
{jsonData.name}
|
{jsonData.name}
|
||||||
@@ -81,19 +81,20 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
<small>Profession</small>
|
<small>Profession</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-between items-center py-3 px-10">
|
<div className="flex justify-between items-center py-3 px-10">
|
||||||
<div className="w-[20%] h-[20%] rounded-full overflow-hidden">
|
<div className="w-[20%] h-[20%] rounded-full overflow-hidden">
|
||||||
<img src="#" alt="char bild"/>
|
<img src="#" alt="char bild"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col gap-2 w-[80%]">
|
<div className="flex flex-col gap-2 w-[80%]">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
{attributes.map(attr => (
|
{attributes.map(attr => (
|
||||||
<div key={attr.id} className="w-[10%] text-center">
|
<div key={attr.id} className="w-[10%] text-center">
|
||||||
<div className="relative group cursor-help">
|
<div className="relative group cursor-help">
|
||||||
<div className="font-bold">{attr.short}</div>
|
<div className="font-bold">{attr.short}</div>
|
||||||
<span className="absolute left-1/2 transform -translate-x-1/2 bottom-full mb-1 px-2 py-1 bg-gray-800 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity duration-200 whitespace-nowrap">
|
<span
|
||||||
|
className="absolute left-1/2 transform -translate-x-1/2 bottom-full mb-1 px-2 py-1 bg-gray-800 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity duration-200 whitespace-nowrap">
|
||||||
{attr.name}
|
{attr.name}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +102,7 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-[100%] flex pt-2">
|
<div className="w-[100%] flex pt-2">
|
||||||
<span className="relative group cursor-help">
|
<span className="relative group cursor-help">
|
||||||
LP
|
LP
|
||||||
@@ -115,7 +116,7 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
15 / 15
|
15 / 15
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-[100%] flex pt-2">
|
<div className="w-[100%] flex pt-2">
|
||||||
<span className="relative group cursor-help">
|
<span className="relative group cursor-help">
|
||||||
AP
|
AP
|
||||||
@@ -129,7 +130,7 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
16 / 16
|
16 / 16
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-[100%] flex pt-2">
|
<div className="w-[100%] flex pt-2">
|
||||||
<span className="relative group cursor-help">
|
<span className="relative group cursor-help">
|
||||||
KP
|
KP
|
||||||
@@ -143,7 +144,7 @@ export default function SheetHeader({jsonData}: { jsonData: CharacterData }) {
|
|||||||
16 / 16
|
16 / 16
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-[100%] flex pt-2">
|
<div className="w-[100%] flex pt-2">
|
||||||
<span className="w-[10%] relative group cursor-help">
|
<span className="w-[10%] relative group cursor-help">
|
||||||
SP
|
SP
|
||||||
|
@@ -1,21 +1,21 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import {useEffect, useState} from 'react';
|
||||||
import type { CharacterData } from '../../../../../types/CharacterJson';
|
import type {CharacterData} from '@/types/CharacterJson.ts';
|
||||||
import { loadSkillsWithValues, type SkillWithValue } from '../../../../../utils/loaders';
|
import {loadSkillsWithValues, type SkillWithValue} from '@/utils/loaders.ts';
|
||||||
|
|
||||||
export default function Skills({ jsonData }: { jsonData: CharacterData }) {
|
export default function Skills({jsonData}: { jsonData: CharacterData }) {
|
||||||
const [skills, setSkills] = useState<SkillWithValue[]>([]);
|
const [skills, setSkills] = useState<SkillWithValue[]>([]);
|
||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let isMounted = true;
|
let isMounted = true;
|
||||||
|
|
||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
// Load skills with their values using the new loader function
|
// Load skills with their values using the new loader function
|
||||||
const loadedSkills = await loadSkillsWithValues(jsonData.talents);
|
const loadedSkills = await loadSkillsWithValues(jsonData.talents);
|
||||||
|
|
||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setSkills(loadedSkills);
|
setSkills(loadedSkills);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -28,57 +28,57 @@ export default function Skills({ jsonData }: { jsonData: CharacterData }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
isMounted = false;
|
isMounted = false;
|
||||||
};
|
};
|
||||||
}, [jsonData.talents]);
|
}, [jsonData.talents]);
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return <div>Loading skills...</div>;
|
return <div>Loading skills...</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <div className="text-red-500">{error}</div>;
|
return <div className="text-red-500">{error}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skills.length === 0) {
|
if (skills.length === 0) {
|
||||||
return <div>No skills found.</div>;
|
return <div>No skills found.</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
<h1 className="text-2xl font-bold mb-4">Skills</h1>
|
<h1 className="text-2xl font-bold mb-4">Skills</h1>
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||||
{skills.map(skill => (
|
{skills.map(skill => (
|
||||||
<div key={skill.id} className="border p-3 rounded shadow">
|
<div key={skill.id} className="border p-3 rounded shadow">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<h2 className="text-lg font-semibold">{skill.name}</h2>
|
<h2 className="text-lg font-semibold">{skill.name}</h2>
|
||||||
<span className="bg-blue-100 text-blue-800 font-bold px-2 py-1 rounded">
|
<span className="bg-blue-100 text-blue-800 font-bold px-2 py-1 rounded">
|
||||||
{skill.value}
|
{skill.value}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{/*{skill.applications && skill.applications.length > 0 && (*/}
|
{/*{skill.applications && skill.applications.length > 0 && (*/}
|
||||||
{/* <div className="mt-2">*/}
|
{/* <div className="mt-2">*/}
|
||||||
{/* <h3 className="font-medium">Applications:</h3>*/}
|
{/* <h3 className="font-medium">Applications:</h3>*/}
|
||||||
{/* <ul className="list-disc list-inside">*/}
|
{/* <ul className="list-disc list-inside">*/}
|
||||||
{/* {skill.applications.map((app: any, index: number) => (*/}
|
{/* {skill.applications.map((app: any, index: number) => (*/}
|
||||||
{/* <li key={index}>{app.name}</li>*/}
|
{/* <li key={index}>{app.name}</li>*/}
|
||||||
{/* ))}*/}
|
{/* ))}*/}
|
||||||
{/* </ul>*/}
|
{/* </ul>*/}
|
||||||
{/* </div>*/}
|
{/* </div>*/}
|
||||||
{/*)}*/}
|
{/*)}*/}
|
||||||
{/*{skill.tools && (*/}
|
{/*{skill.tools && (*/}
|
||||||
{/* <div className="mt-2">*/}
|
{/* <div className="mt-2">*/}
|
||||||
{/* <h3 className="font-medium">Tools:</h3>*/}
|
{/* <h3 className="font-medium">Tools:</h3>*/}
|
||||||
{/* <p className="text-sm">{skill.tools}</p>*/}
|
{/* <p className="text-sm">{skill.tools}</p>*/}
|
||||||
{/* </div>*/}
|
{/* </div>*/}
|
||||||
{/*)}*/}
|
{/*)}*/}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,65 +1,65 @@
|
|||||||
import type {Race} from '../types/Race';
|
import type {Race} from '@/types/Race';
|
||||||
import type {Profession} from '../types/Profession';
|
import type {Profession} from '@/types/Profession';
|
||||||
import type {Attribute} from '../types/Attribute';
|
import type {Attribute} from '@/types/Attribute';
|
||||||
import type {AttributeValue} from '../types/CharacterJson';
|
import type {AttributeValue} from '@/types/CharacterJson';
|
||||||
import type {Advantage} from '../types/Advantage';
|
import type {Advantage} from '@/types/Advantage';
|
||||||
import type {AnimistForce} from '../types/AnimistForce';
|
import type {AnimistForce} from '@/types/AnimistForce';
|
||||||
// import type { ArcaneBardTradition } from '../types/ArcaneBardTradition';
|
// import type { ArcaneBardTradition } from '@/types/ArcaneBardTradition';
|
||||||
// import type { ArcaneDancerTradition } from '../types/ArcaneDancerTradition';
|
// import type { ArcaneDancerTradition } from '@/types/ArcaneDancerTradition';
|
||||||
// import type { ArmorType } from '../types/ArmorType';
|
// import type { ArmorType } from '@/types/ArmorType';
|
||||||
// import type { Aspect } from '../types/Aspect';
|
// import type { Aspect } from '@/types/Aspect';
|
||||||
// import type { BlessedTradition } from '../types/BlessedTradition';
|
// import type { BlessedTradition } from '@/types/BlessedTradition';
|
||||||
// import type { Blessing } from '../types/Blessing';
|
// import type { Blessing } from '@/types/Blessing';
|
||||||
// import type { Book } from '../types/Book';
|
// import type { Book } from '@/types/Book';
|
||||||
// import type { Brew } from '../types/Brew';
|
// import type { Brew } from '@/types/Brew';
|
||||||
// import type { Cantrip } from '../types/Cantrip';
|
// import type { Cantrip } from '@/types/Cantrip';
|
||||||
// import type { CombatSpecialAbilityGroup } from '../types/CombatSpecialAbilityGroup';
|
// import type { CombatSpecialAbilityGroup } from '@/types/CombatSpecialAbilityGroup';
|
||||||
// import type { CombatTechniqueGroup } from '../types/CombatTechniqueGroup';
|
// import type { CombatTechniqueGroup } from '@/types/CombatTechniqueGroup';
|
||||||
// import type { CombatTechnique } from '../types/CombatTechnique';
|
// import type { CombatTechnique } from '@/types/CombatTechnique';
|
||||||
// import type { Condition } from '../types/Condition';
|
// import type { Condition } from '@/types/Condition';
|
||||||
// import type { Culture } from '../types/Culture';
|
// import type { Culture } from '@/types/Culture';
|
||||||
// import type { Curse } from '../types/Curse';
|
// import type { Curse } from '@/types/Curse';
|
||||||
// import type { DerivedCharacteristic } from '../types/DerivedCharacteristic';
|
// import type { DerivedCharacteristic } from '@/types/DerivedCharacteristic';
|
||||||
// import type { Disadvantage } from '../types/Disadvantage';
|
// import type { Disadvantage } from '@/types/Disadvantage';
|
||||||
// import type { DominationRitual } from '../types/DominationRitual';
|
// import type { DominationRitual } from '@/types/DominationRitual';
|
||||||
// import type { Element } from '../types/Element';
|
// import type { Element } from '@/types/Element';
|
||||||
// import type { ElvenMagicalSong } from '../types/ElvenMagicalSong';
|
// import type { ElvenMagicalSong } from '@/types/ElvenMagicalSong';
|
||||||
// import type { EquipmentGroup } from '../types/EquipmentGroup';
|
// import type { EquipmentGroup } from '@/types/EquipmentGroup';
|
||||||
// import type { EquipmentPackage } from '../types/EquipmentPackage';
|
// import type { EquipmentPackage } from '@/types/EquipmentPackage';
|
||||||
// import type { Equipment } from '../types/Equipment';
|
// import type { Equipment } from '@/types/Equipment';
|
||||||
// import type { ExperienceLevel } from '../types/ExperienceLevel';
|
// import type { ExperienceLevel } from '@/types/ExperienceLevel';
|
||||||
// import type { EyeColor } from '../types/EyeColor';
|
// import type { EyeColor } from '@/types/EyeColor';
|
||||||
// import type { FocusRule } from '../types/FocusRule';
|
// import type { FocusRule } from '@/types/FocusRule';
|
||||||
// import type { GeodeRitual } from '../types/GeodeRitual';
|
// import type { GeodeRitual } from '@/types/GeodeRitual';
|
||||||
// import type { HairColor } from '../types/HairColor';
|
// import type { HairColor } from '@/types/HairColor';
|
||||||
// import type { LiturgicalChantEnhancement } from '../types/LiturgicalChantEnhancement';
|
// import type { LiturgicalChantEnhancement } from '@/types/LiturgicalChantEnhancement';
|
||||||
// import type { LiturgicalChantGroup } from '../types/LiturgicalChantGroup';
|
// import type { LiturgicalChantGroup } from '@/types/LiturgicalChantGroup';
|
||||||
// import type { LiturgicalChant } from '../types/LiturgicalChant';
|
// import type { LiturgicalChant } from '@/types/LiturgicalChant';
|
||||||
// import type { MagicalDance } from '../types/MagicalDance';
|
// import type { MagicalDance } from '@/types/MagicalDance';
|
||||||
// import type { MagicalMelodie } from '../types/MagicalMelodie';
|
// import type { MagicalMelodie } from '@/types/MagicalMelodie';
|
||||||
// import type { MagicalTradition } from '../types/MagicalTradition';
|
// import type { MagicalTradition } from '@/types/MagicalTradition';
|
||||||
// import type { OptionalRule } from '../types/OptionalRule';
|
// import type { OptionalRule } from '@/types/OptionalRule';
|
||||||
// import type { Pact } from '../types/Pact';
|
// import type { Pact } from '@/types/Pact';
|
||||||
// import type { PatronCategorie } from '../types/PatronCategorie';
|
// import type { PatronCategorie } from '@/types/PatronCategorie';
|
||||||
// import type { Patron } from '../types/Patron';
|
// import type { Patron } from '@/types/Patron';
|
||||||
// import type { ProfessionVariant } from '../types/ProfessionVariant';
|
// import type { ProfessionVariant } from '@/types/ProfessionVariant';
|
||||||
// import type { Propertie } from '../types/Propertie';
|
// import type { Propertie } from '@/types/Propertie';
|
||||||
// import type { RaceVariant } from '../types/RaceVariant';
|
// import type { RaceVariant } from '@/types/RaceVariant';
|
||||||
// import type { Reache } from '../types/Reache';
|
// import type { Reache } from '@/types/Reache';
|
||||||
// import type { RogueSpell } from '../types/RogueSpell';
|
// import type { RogueSpell } from '@/types/RogueSpell';
|
||||||
// import type { SkillGroup } from '../types/SkillGroup';
|
// import type { SkillGroup } from '@/types/SkillGroup';
|
||||||
import type {Skill} from '../types/Skill';
|
import type {Skill} from '@/types/Skill';
|
||||||
import type {RaceVariant} from "../types/RaceVariant.ts";
|
import type {RaceVariant} from "@/types/RaceVariant.ts";
|
||||||
// import type { SocialStatuse } from '../types/SocialStatuse';
|
// import type { SocialStatuse } from '@/types/SocialStatuse';
|
||||||
// import type { SpecialAbilitie } from '../types/SpecialAbilitie';
|
// import type { SpecialAbilitie } from '@/types/SpecialAbilitie';
|
||||||
// import type { SpecialAbilityGroup } from '../types/SpecialAbilityGroup';
|
// import type { SpecialAbilityGroup } from '@/types/SpecialAbilityGroup';
|
||||||
// import type { SpellEnhancement } from '../types/SpellEnhancement';
|
// import type { SpellEnhancement } from '@/types/SpellEnhancement';
|
||||||
// import type { SpellGroup } from '../types/SpellGroup';
|
// import type { SpellGroup } from '@/types/SpellGroup';
|
||||||
// import type { Spell } from '../types/Spell';
|
// import type { Spell } from '@/types/Spell';
|
||||||
// import type { State } from '../types/State';
|
// import type { State } from '@/types/State';
|
||||||
// import type { Subject } from '../types/Subject';
|
// import type { Subject } from '@/types/Subject';
|
||||||
// import type { Tribe } from '../types/Tribe';
|
// import type { Tribe } from '@/types/Tribe';
|
||||||
// import type { ZibiljaRitual } from '../types/ZibiljaRitual';
|
// import type { ZibiljaRitual } from '@/types/ZibiljaRitual';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic function to load data from a JSON file
|
* Generic function to load data from a JSON file
|
||||||
|
@@ -3,10 +3,13 @@
|
|||||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
"lib": [
|
||||||
|
"ES2022",
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable"
|
||||||
|
],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
@@ -14,14 +17,21 @@
|
|||||||
"moduleDetection": "force",
|
"moduleDetection": "force",
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
|
|
||||||
/* Linting */
|
/* Linting */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"erasableSyntaxOnly": true,
|
"erasableSyntaxOnly": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noUncheckedSideEffectImports": true
|
"noUncheckedSideEffectImports": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"./src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": [
|
||||||
|
"src"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ import {defineConfig} from 'vite'
|
|||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
import {viteStaticCopy} from "vite-plugin-static-copy";
|
import {viteStaticCopy} from "vite-plugin-static-copy";
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -12,9 +13,14 @@ export default defineConfig({
|
|||||||
targets: [
|
targets: [
|
||||||
{src: 'src/assets/database/*.json', dest: 'database'},
|
{src: 'src/assets/database/*.json', dest: 'database'},
|
||||||
],
|
],
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
base: './',
|
base: './',
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, 'src'),
|
||||||
|
}
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
minify: 'esbuild', // ← Statt terser
|
minify: 'esbuild', // ← Statt terser
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
Reference in New Issue
Block a user