mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 11:32:04 +03:00
updates to data structure
This commit is contained in:
parent
ac2be8fa57
commit
38fbb3793a
@ -5,7 +5,7 @@
|
||||
let columnsData: BranchLane[] = [
|
||||
{
|
||||
id: 'c1',
|
||||
name: 'TODO',
|
||||
name: 'implement new api',
|
||||
items: [
|
||||
{ id: 1, name: 'item41' },
|
||||
{ id: 2, name: 'item42' },
|
||||
@ -16,20 +16,71 @@
|
||||
{ id: 7, name: 'item47' },
|
||||
{ id: 8, name: 'item48' },
|
||||
{ id: 9, name: 'item49' }
|
||||
],
|
||||
uncommittedFiles: [
|
||||
{
|
||||
filePath: 'src/foo.py',
|
||||
hunks: [
|
||||
{ id: 'a', updated: new Date('2011-04-11T10:20:30Z'), description: 'add api' },
|
||||
{ id: 'b', updated: new Date('2011-04-11T10:25:30Z'), description: 'new user model' },
|
||||
{ id: 'c', updated: new Date('2011-04-11T10:27:30Z'), description: 'refactor' }
|
||||
]
|
||||
},
|
||||
{
|
||||
filePath: 'src/bar.py',
|
||||
hunks: [
|
||||
{ id: 'd', updated: new Date('2011-04-11T10:10:30Z'), description: 'extract function' },
|
||||
{ id: 'e', updated: new Date('2011-04-11T10:15:30Z'), description: 'things' }
|
||||
]
|
||||
},
|
||||
{
|
||||
filePath: 'src/baz.py',
|
||||
hunks: [
|
||||
{
|
||||
id: 'f',
|
||||
updated: new Date('2011-04-11T11:15:30Z'),
|
||||
description: 'database migration'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'c2',
|
||||
name: 'DOING',
|
||||
name: 'bug fixes',
|
||||
items: [
|
||||
{ id: 10, name: 'item50' },
|
||||
{ id: 11, name: 'item51' }
|
||||
],
|
||||
uncommittedFiles: [
|
||||
{
|
||||
filePath: 'src/foo.py',
|
||||
hunks: [
|
||||
{
|
||||
id: 'g',
|
||||
updated: new Date('2011-04-11T10:20:30Z'),
|
||||
description: 'correct broken things'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'c3',
|
||||
name: 'DONE',
|
||||
items: [{ id: 13, name: 'item52' }]
|
||||
name: 'for later',
|
||||
items: [{ id: 13, name: 'item52' }],
|
||||
uncommittedFiles: [
|
||||
{
|
||||
filePath: '.env',
|
||||
hunks: [
|
||||
{
|
||||
id: 'h',
|
||||
updated: new Date('2011-04-10T12:20:30Z'),
|
||||
description: 'API keys for local development'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
function handleBoardUpdated(newColumnsData: BranchLane[]) {
|
||||
|
@ -30,6 +30,7 @@
|
||||
{#each items as item (item.id)}
|
||||
<div
|
||||
class="my-2 flex h-14 w-full items-center justify-center rounded border border-zinc-600 bg-zinc-700"
|
||||
animate:flip={{ duration: flipDurationMs }}
|
||||
>
|
||||
{item.name}
|
||||
</div>
|
||||
|
@ -3,8 +3,20 @@ export type FileCard = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type Hunk = {
|
||||
id: string;
|
||||
updated: Date;
|
||||
description: string;
|
||||
};
|
||||
|
||||
export type File = {
|
||||
filePath: string;
|
||||
hunks: Hunk[];
|
||||
};
|
||||
|
||||
export type BranchLane = {
|
||||
id: string;
|
||||
name: string;
|
||||
items: FileCard[];
|
||||
uncommittedFiles: File[];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user