mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-12 13:59:08 +02:00
format
This commit is contained in:
1
apps/app/package-lock.json
generated
1
apps/app/package-lock.json
generated
@@ -20,7 +20,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@chromatic-com/storybook": "^3.2.4",
|
||||
"@cloudflare/workers-types": "^4.20250214.0",
|
||||
"@eslint/compat": "^1.2.5",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@playwright/test": "^1.50.1",
|
||||
|
@@ -69,4 +69,4 @@
|
||||
"openapi-fetch": "^0.13.5",
|
||||
"pikaday": "^1.8.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -24,8 +24,8 @@ export function parseFamilyTree(data: components['schemas']['FamilyTree']): Layo
|
||||
let relationships: Edge[] = [];
|
||||
if (data.relationships) {
|
||||
relationships = data.relationships.map((relationship) => {
|
||||
let newEdge = { data: { ...relationship.Props } } as Edge;
|
||||
newEdge.data!.type = relationship.Type?.toLowerCase();
|
||||
const newEdge = { data: { ...relationship.Props } } as Edge;
|
||||
newEdge.data!.type = relationship.Type?.toLowerCase();
|
||||
if (relationship.StartElementId !== null && relationship.StartElementId !== undefined) {
|
||||
newEdge.source = relationship.StartElementId;
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ export class FamilyTree extends dagre.graphlib.Graph {
|
||||
): Layout {
|
||||
const isHorizontal = direction === 'LR';
|
||||
this.setGraph({ rankdir: direction });
|
||||
this.setDefaultEdgeLabel(() => ({}))
|
||||
this.setDefaultEdgeLabel(() => ({}));
|
||||
nodes.forEach((node) => {
|
||||
this.setNode(node.id, { width: nodeWidth, height: nodeHeight });
|
||||
});
|
||||
@@ -32,10 +32,10 @@ export class FamilyTree extends dagre.graphlib.Graph {
|
||||
|
||||
let newEdges: Edge[] = [];
|
||||
edges.forEach((edge) => {
|
||||
let newEdge = {...edge};
|
||||
let newEdge = { ...edge };
|
||||
if (edge.data?.type === 'spouse') {
|
||||
newEdge.style = "dashed; stroke: #000; stroke-width: 2px; color: red;";
|
||||
|
||||
newEdge.style = 'dashed; stroke: #000; stroke-width: 2px; color: red;';
|
||||
|
||||
const sourceNode = this.node(edge.source);
|
||||
const targetNode = this.node(edge.target);
|
||||
if (!sourceNode || !targetNode) {
|
||||
@@ -76,8 +76,7 @@ export class FamilyTree extends dagre.graphlib.Graph {
|
||||
targetNode.x = desiredX;
|
||||
targetNode.y = sourceNode.y;
|
||||
}
|
||||
newEdge.type = 'smoothstep'
|
||||
|
||||
newEdge.type = 'smoothstep';
|
||||
|
||||
newEdges.push(newEdge), newEdge;
|
||||
});
|
||||
|
@@ -103,24 +103,24 @@
|
||||
<p>
|
||||
<strong>{born()}:</strong>
|
||||
{#if editorMode}<input
|
||||
type="text"
|
||||
class="pika-single w-full"
|
||||
id="birth_date"
|
||||
bind:this={birth_date}
|
||||
bind:value={person.born}
|
||||
/>
|
||||
type="text"
|
||||
class="pika-single w-full"
|
||||
id="birth_date"
|
||||
bind:this={birth_date}
|
||||
bind:value={person.born}
|
||||
/>
|
||||
{:else}{person.born ?? '-'}{/if}
|
||||
</p>
|
||||
<p>
|
||||
<strong>{died()}:</strong>
|
||||
{#if editorMode}<input
|
||||
type="text"
|
||||
class="pika-single w-full"
|
||||
id="death_date"
|
||||
placeholder={died()}
|
||||
bind:this={death_date}
|
||||
bind:value={person.died}
|
||||
/>{:else}{person.died ?? '-'}{/if}
|
||||
type="text"
|
||||
class="pika-single w-full"
|
||||
id="death_date"
|
||||
placeholder={died()}
|
||||
bind:this={death_date}
|
||||
bind:value={person.died}
|
||||
/>{:else}{person.died ?? '-'}{/if}
|
||||
</p>
|
||||
<p>
|
||||
<strong>{biological_sex()}:</strong>
|
||||
|
@@ -25,7 +25,7 @@ export async function load(event: RequestEvent) {
|
||||
|
||||
const data = (await response.json()) as components['schemas']['FamilyTree'];
|
||||
|
||||
let layout = parseFamilyTree(data) as Layout & {id: string};
|
||||
const layout = parseFamilyTree(data) as Layout & { id: string };
|
||||
layout.id = event.locals.session.userId;
|
||||
|
||||
return layout;
|
||||
|
9985
apps/app/src/worker-configuration.d.ts
vendored
9985
apps/app/src/worker-configuration.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -16,4 +16,4 @@
|
||||
//
|
||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||
// from the referenced tsconfig.json - TypeScript does not merge them in
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user