mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 20:10:03 +03:00
59 lines
2.8 KiB
HTML
59 lines
2.8 KiB
HTML
<h4 mat-dialog-title><ng-container i18n="Update task schedule">Update task schedule</ng-container></h4>
|
|
<mat-dialog-content>
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12 mt-3">
|
|
<mat-checkbox [(ngModel)]="enabled"><ng-container i18n="Enabled">Enabled</ng-container></mat-checkbox>
|
|
</div>
|
|
<div class="col-12 mt-2">
|
|
<mat-checkbox [(ngModel)]="recurring" [disabled]="!enabled"><ng-container i18n="Recurring">Recurring</ng-container></mat-checkbox>
|
|
</div>
|
|
@if (recurring) {
|
|
<div class="col-12 mt-2">
|
|
<mat-form-field>
|
|
<mat-select placeholder="Interval" [(ngModel)]="interval" [disabled]="!enabled">
|
|
<mat-option value="weekly">Weekly</mat-option>
|
|
<mat-option value="daily">Daily</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
@if (interval === 'weekly') {
|
|
<div class="col-12 mt-2">
|
|
<mat-button-toggle-group [(ngModel)]="days_of_week" [multiple]="true" [disabled]="!enabled" aria-label="Week day">
|
|
<!-- TODO: support translation -->
|
|
<mat-button-toggle [value]="0">M</mat-button-toggle>
|
|
<mat-button-toggle [value]="1">T</mat-button-toggle>
|
|
<mat-button-toggle [value]="2">W</mat-button-toggle>
|
|
<mat-button-toggle [value]="3">T</mat-button-toggle>
|
|
<mat-button-toggle [value]="4">F</mat-button-toggle>
|
|
<mat-button-toggle [value]="5">S</mat-button-toggle>
|
|
<mat-button-toggle [value]="6">S</mat-button-toggle>
|
|
</mat-button-toggle-group>
|
|
</div>
|
|
}
|
|
} @else {
|
|
<div class="col-12 mt-2">
|
|
<mat-form-field>
|
|
<mat-label i18n="Choose a date">Choose a date</mat-label>
|
|
<input [(ngModel)]="date" [min]="today" matInput [matDatepicker]="picker" [disabled]="!enabled">
|
|
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
|
<mat-datepicker #picker></mat-datepicker>
|
|
</mat-form-field>
|
|
</div>
|
|
}
|
|
<div class="col-12 mt-2">
|
|
<mat-form-field>
|
|
<mat-label>Time</mat-label>
|
|
<input type="time" matInput [(ngModel)]="time" [disabled]="!enabled">
|
|
@if (Intl?.DateTimeFormat().resolvedOptions().timeZone) {
|
|
<mat-hint>{{Intl.DateTimeFormat().resolvedOptions().timeZone}}</mat-hint>
|
|
}
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</mat-dialog-content>
|
|
<mat-dialog-actions>
|
|
<button mat-button mat-dialog-close><ng-container i18n="Update task schedule cancel button">Cancel</ng-container></button>
|
|
<button mat-button (click)="updateTaskSchedule()"><ng-container i18n="Update button">Update</ng-container></button>
|
|
</mat-dialog-actions> |