meals-made-easy-app/src/app/pages/recipe-upload-page/steps/ai-or-manual/ai-or-manual.html
2026-01-29 17:23:10 -06:00

36 lines
1.4 KiB
HTML

<section>
<h2>Start</h2>
<section>
@if (inProgressDrafts.isLoading()) {
<p>Loading drafts...</p>
} @else if (inProgressDrafts.isError()) {
<p>Could not fetch drafts!</p>
} @else if (inProgressDrafts.isSuccess() && inProgressDrafts.data().length) {
<h3>In Progress Drafts</h3>
<ul>
@for (draft of inProgressDrafts.data(); track draft.id) {
<li>
<a (click)="onInProgressDraftClick(draft)">
<fa-icon [icon]="faFilePen"></fa-icon>
{{ draft.title }}
</a>
</li>
}
</ul>
}
</section>
<section>
<h3>New Draft</h3>
<p>Either upload a photo of a recipe and AI will assist you, or enter your recipe manually.</p>
<form id="ai-or-manual-form">
<app-file-upload [files]="sourceFilesArray()" (fileChange)="onFileChange($event)"></app-file-upload>
<div id="ai-or-manual-buttons">
<button matButton="outlined" type="button" (click)="onFormSubmit('manual')">Enter Manually</button>
<button matButton="filled" type="button" [disabled]="!sourceFile()" (click)="onFormSubmit('ai-assist')">
Use AI Assist
</button>
</div>
</form>
</section>
</section>