Files
grimmory/frontend/src/app/shared/components/metadata-progress-widget/metadata-progress-widget-component.html
T
James Cox 874b013f75 refactor(frontend): rename booklore-ui to frontend
- Frontend path:
  - rename the tracked Angular app tree from `booklore-ui/` to `frontend/`
  - preserve file contents during the move so this commit stays focused on the path change itself
- Frontend docs:
  - update the moved frontend README and contribution guide where they refer to the renamed folder
  - keep those edits limited to path references introduced by the directory rename
2026-04-22 17:26:39 -04:00

94 lines
3.0 KiB
HTML

<ng-container *transloco="let t; prefix: 'shared.metadataProgress'">
<div class="task-border">
@if (Object.keys(activeTasks).length > 0) {
@for (task of activeTasks | keyvalue; track task; let idx = $index) {
<div class="task-card">
<div class="task-header-row">
<div class="task-title-group">
<p class="task-title">{{ t('taskTitle') }}</p>
</div>
<div class="task-tags">
@if (task.value.review) {
<p-tag
[value]="t('tagReview')"
severity="warn"
class="task-tag">
</p-tag>
} @else {
<p-tag
[value]="t('tagAuto')"
severity="success"
class="task-tag">
</p-tag>
}
<p-tag
[value]="getStatusLabel(task.value.status)"
[severity]="getTagSeverity(task.value.status)"
class="task-tag"
></p-tag>
</div>
</div>
<div class="task-message">
{{ task.value.message }}
</div>
<div class="task-progress-info" [innerHTML]="t('bookProgress', { current: task.value.status === 'COMPLETED' || task.value.completed >= task.value.total ? task.value.total : task.value.completed + 1, total: task.value.total })">
</div>
<p-progressBar
[style]="{ height: '15px' }"
[value]="getProgressPercent(task.value)"
[showValue]="true">
</p-progressBar>
@if (task.value.status === 'COMPLETED' || task.value.status === 'ERROR' || task.value.status === 'CANCELLED') {
<div class="action-buttons">
@if (task.value.review) {
<p-button
[label]="t('reviewBtn')"
severity="info"
icon="pi pi-search"
size="small"
outlined
(click)="reviewTask(task.key)">
</p-button>
}
<p-button
[label]="task.value.review ? t('discardBtn') : t('dismissBtn')"
icon="pi pi-times"
[severity]="task.value.review ? 'danger' : 'secondary'"
size="small"
[pTooltip]="task.value.review ? t('discardTooltip') : ''"
[tooltipPosition]="task.value.review ? 'top' : undefined"
outlined
(click)="clearTask(task.key)">
</p-button>
</div>
} @else if (task.value.status === 'IN_PROGRESS') {
<div class="action-buttons">
<p-button
[label]="t('cancelBtn')"
icon="pi pi-stop"
severity="danger"
size="small"
[pTooltip]="t('cancelTooltip')"
tooltipPosition="top"
outlined
(click)="cancelTask(task.key)">
</p-button>
</div>
}
</div>
@if (idx < Object.keys(activeTasks).length - 1) {
<p-divider></p-divider>
}
}
}
</div>
</ng-container>