All files / app/component/backup backup.component.html

30.84% Statements 33/107
37.5% Branches 3/8
0% Functions 0/4
43.63% Lines 24/55

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 811x 2x 2x       1x 1x   2x 1x       1x 1x 2x 2x             1x     2x       1x     1x       1x       1x       1x       1x       1x               1x             1x           1x 1x        
<div class="link">
  @if (!inProgress) {
    <a [href]="downloadLinkAuth">{{ id }}</a>
  } @else {
    <span>{{ id.substring(1) }}</span>
  }
</div>
<div class="stack">
  <div class="info">
    @if (inProgress) {
      <span i18n>in progress...</span>
    } @else if (size) {
      <span>{{ fileSize }}</span>
    }
  </div>
  <div class="actions">
    <a [routerLink]="['/ref', downloadLink]" i18n>ref</a>
    @if (store.account.admin) {
      @if (!inProgress) {
        <app-confirm-action #restoreButton [action]="restore$">restore</app-confirm-action>
      }
      <app-confirm-action [action]="delete$">delete</app-confirm-action>
    }
 
  </div>
</div>
 
@for (e of serverError; track e) {
  <div class="error">{{ e }}</div>
}
 
<ng-template #restoreOptions>
  <div class="popup bubble" (click)="$event.stopPropagation()" [formGroup]="restoreOptionsForm">
    <div class="form">
      <label for="restoreCache" i18n>Cache</label>
      <div>
        <input id="restoreCache" type="checkbox" formControlName="cache">
      </div>
      <label for="restoreRefs" i18n>Refs</label>
      <div>
        <input id="restoreRefs" type="checkbox" formControlName="ref">
      </div>
      <label for="restoreExts" i18n>Exts</label>
      <div>
        <input id="restoreExts" type="checkbox" formControlName="ext">
      </div>
      <label for="restoreUsers" i18n>Users</label>
      <div>
        <input id="restoreUsers" type="checkbox" formControlName="user">
      </div>
      <label for="restorePlugins" i18n>Plugins</label>
      <div>
        <input id="restorePlugins" type="checkbox" formControlName="plugin">
      </div>
      <label for="restoreTemplates" i18n>Templates</label>
      <div>
        <input id="restoreTemplates" type="checkbox" formControlName="template">
      </div>
    </div>
    <hr>
    <div class="form">
      <div>
        <label for="newerThan" i18n>Newer than:</label>
        <div class="form-array">
          <input type="datetime-local"
                 id="newerThan"
                 step="1"
                 formControlName="newerThan"
                 class="grow">
          <button type="button" (click)="restoreOptionsForm.get('newerThan')!.setValue('')" i18n-title title="Clear" i18n>🆑️</button>
        </div>
      </div>
    </div>
 
    <div class="buttons right">
      <button type="button" (click)="cancelRestore()" i18n>cancel</button>
      <button type="button" (click)="confirmRestore()" i18n>restore</button>
    </div>
  </div>
</ng-template>