Skip to content

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

1.5 KB
Raw Blame
<div class="modal-header">
  <h4 class="modal-title">
    <svg [lucideIcon]="hasExclusiveLock ? icons.LucideLock : icons.LucideLockOpen"></svg>
    <span>{{ file.name }}</span>
  </h4>
  <button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white" type="button"></button>
</div>
<div class="modal-body">
  <div class="d-flex flex-column align-items-center avatar my-2">
    @if (hasExclusiveLock) {
      <span class="mb-2" l10nTranslate>The file is locked by</span>
    } @else {
      <span class="mb-2" l10nTranslate>The file is edited by</span>
    }
    <img class="avatar-img mb-2" [src]="userAvatarUrl" alt="">
    <b>{{ file.lock | fileLockFormatPipe }}</b>
  </div>
  @if (hasExclusiveLock && !isLockOwner && isFileOwner) {
    <div class="text-align-center mt-3 mb-1">
      <small l10nTranslate>As the file owner, you can unlock the file or request the current lock owner to release it.</small>
    </div>
  }
</div>
<div class="modal-footer">
  <button (click)="layout.closeDialog()" class="btn btn-secondary" data-dismiss="modal" type="button" l10nTranslate>
    {{ hasAction ? 'Cancel' : 'Close' }}
  </button>
  @if (canUnlock) {
    <button (click)="onUnlock()" [disabled]="submitted" class="btn btn-primary" type="button" l10nTranslate>Unlock</button>
  }
  @if (canRequestUnlock) {
    <button (click)="onSendUnLockRequest()" [disabled]="submitted" class="btn btn-success" type="button" l10nTranslate>Send an unlock request</button>
  }
</div>