72 lines
2.2 KiB
HTML
72 lines
2.2 KiB
HTML
<div class="modal" [class.is-active]="isActive">
|
|
<div class="modal-background"></div>
|
|
<div class="modal-card">
|
|
<header class="modal-card-head">
|
|
<p class="modal-card-title">Add New Torrent</p>
|
|
<button class="delete" aria-label="close" (click)="cancel()"></button>
|
|
</header>
|
|
<section class="modal-card-body">
|
|
<div class="field">
|
|
<label class="label">Magnet Link</label>
|
|
<div class="control">
|
|
<textarea
|
|
class="textarea"
|
|
placeholder="Paste your magnet link here"
|
|
[(ngModel)]="magnetLink"
|
|
[disabled]="saving"
|
|
></textarea>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<div class="field">
|
|
<label class="label">Torrent file</label>
|
|
<div class="file has-name">
|
|
<label class="file-label">
|
|
<input
|
|
class="file-input"
|
|
type="file"
|
|
name="resume"
|
|
(change)="pickFile($event)"
|
|
[disabled]="saving"
|
|
/>
|
|
<span class="file-cta">
|
|
<span class="file-icon">
|
|
<i class="fas fa-upload"></i>
|
|
</span>
|
|
<span class="file-label"> Pick a torrent file... </span>
|
|
</span>
|
|
<span class="file-name">
|
|
{{ fileName }}
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
<div class="field">
|
|
<label class="checkbox">
|
|
<input type="checkbox" [(ngModel)]="autoDownload" />
|
|
Download torrent to host when finished downloading on Real-Debrid
|
|
</label>
|
|
<label class="checkbox">
|
|
<input type="checkbox" [(ngModel)]="autoDelete" />
|
|
Remove torrent when finished downloading on host
|
|
</label>
|
|
</div>
|
|
<div class="notification is-danger is-light" *ngIf="error?.length > 0">
|
|
Cannot add torrent: {{ error }}
|
|
</div>
|
|
</section>
|
|
<footer class="modal-card-foot">
|
|
<button
|
|
class="button is-success"
|
|
[disabled]="saving"
|
|
[ngClass]="{ 'is-loading': saving }"
|
|
>
|
|
<span>Add Torrent</span>
|
|
</button>
|
|
<button class="button" (click)="cancel()" [disabled]="saving">
|
|
Cancel
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|