Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

1.9 KB
Raw Blame
<div class="modal-header">
  <h4 class="modal-title">
    <svg [lucideIcon]="icons.LucideFileArchive"></svg>
    @if (archiveProps.compressInDirectory) {
      <span l10nTranslate>Compress and Save</span>
    } @else {
      <span l10nTranslate>Compress and Download</span>
    }
  </h4>
  <h4 class="modal-title ms-auto">
    <span>{{ archiveProps.files.length }} {{ (archiveProps.files.length > 1 ? 'items' : 'item') | translate:locale.language }}</span>
  </h4>
  <button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white ms-2" type="button"></button>
</div>
<div class="modal-body">
  <div class="input-group">
    <input [(ngModel)]="archiveProps.name" appAutofocus class="form-control" [placeholder]="'Archive name' | translate:locale.language" type="text">
    <select [(ngModel)]="archiveProps.extension" class="form-select flex-grow-0" style="width: 85px">
      @for (extension of archiveExtensions; track extension) {
        <option [ngValue]="extension">.{{ extensionLabel(extension) }}</option>
      }
    </select>
  </div>
  <div class="form-check mb-0 mt-3 ps-0">
    <label class="form-check-label ps-1">
      <input [(ngModel)]="archiveProps.compression" type="checkbox">
      <span class="me-1" l10nTranslate>Enable compression</span>
      <small l10nTranslate>(this may take longer)</small>
    </label>
  </div>
  @if (!disableInDirCompression) {
    <div class="form-check mb-0 mt-1 ps-0">
      <label class="form-check-label ps-1">
        <input [(ngModel)]="archiveProps.compressInDirectory" type="checkbox">
        <span l10nTranslate>Save in the current directory</span>
      </label>
    </div>
  }
</div>
<div class="modal-footer">
  <button (click)="layout.closeDialog()" class="btn btn-secondary" data-dismiss="modal" type="button" l10nTranslate>Cancel</button>
  <button (click)="onSubmit()" [disabled]="!archiveProps.name || submitted" class="btn btn-primary" l10nTranslate type="button">Confirm</button>
</div>