Skip to content

Commit

Permalink
feat: Add DAW field to project details (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
pruizlezcano authored Mar 18, 2024
1 parent 153c4a4 commit fa3ffe8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/content/docs/managing-projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ The path to the project file.

**Filter:** `path:` [*text*](/legato/search-filters#text)

### DAW

The digital audio workstation used to create the project.

**Default**: The DAW used to create the project.

**Filter:** `daw:` [*text*](/legato/search-filters#text)

### Tracks

A list of tracks in the project.
Expand Down
1 change: 1 addition & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ ipcMain.on('update-project', async (event, arg: Project) => {
project.notes = arg.notes;
project.progress = arg.progress;
project.audioFile = arg.audioFile;
project.daw = arg.daw;
for (let i = 0; i < arg.tagNames!.length; i += 1) {
let tag = await TagRepository.findOneBy({
name: arg.tagNames![i],
Expand Down
18 changes: 18 additions & 0 deletions src/renderer/Views/ProjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,24 @@ function ProjectView({
/>
)}
</div>
<div className="grid w-full max-w-sm items-center gap-1.5">
<Label htmlFor="name">DAW</Label>
<div className="col-span-3 flex">
<DebounceInput
value={project.daw ?? ''}
onChange={(value: string) => {
if (
value === project.daw ||
(project.daw == null && value === '')
)
return;
dispatch(saveProject({ ...project, daw: value }));
}}
placeholder="Add Scale..."
className="w-40"
/>
</div>
</div>
<div className="grid w-full max-w-sm items-center gap-1.5">
<Label>Tracks</Label>
<Accordion type="single" collapsible>
Expand Down

0 comments on commit fa3ffe8

Please sign in to comment.