All files / app/component/viewer viewer.component.html

20.45% Statements 18/88
39.53% Branches 17/43
0% Functions 0/6
23.94% Lines 17/71

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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 1458x 4x             4x             4x     4x                               4x                                 4x                 4x                 4x               4x         4x               4x             4x                 8x                         8x                         8x             8x          
@if (ref || tags) {
  @if (repost) {
    <app-ref class="expand"
             [fetchRepost]="false"
             [showToggle]="true"
             [expandInline]="true"
             [ref]="repost"></app-ref>
  }
  @if (editingRef) {
    <app-ref class="expand"
             [fetchRepost]="false"
             [showToggle]="true"
             [expandInline]="true"
             [ref]="editingRef"></app-ref>
  }
  @if (playlist) {
    <app-playlist [ref]="ref"></app-playlist>
  }
  @if (lens) {
    @if (lensPage) {
      <app-lens class="lens-expand"
                [page]="lensPage"
                [pageControls]="false"
                [tag]="lensQuery"
                [ext]="ext"
                [size]="lensSize"
                [cols]="lensCols"
                [sort]="lensSort"
                [filter]="lensFilter"
                [search]="lensSearch"></app-lens>
    } @else {
      <app-loading></app-loading>
    }
  }
  @if (embedIframe) {
    <div class="embed-container"
         [class.loading]="!embedReady"
         [class.twitter]="twitter"
         [class.zoom]="zoom"
         [appResizeHandle]="resizable && !disableResize && !fullscreen"
         [child]="iframe">
      <iframe #iframe
              class="embed-expand"
              [class.ready]="embedReady"
              src="about:blank"
              frameborder="0"
              scrolling="yes"
              allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share;"
              referrerpolicy="strict-origin-when-cross-origin"></iframe>
    </div>
  }
  @if (imageUrl) {
    <div class="image-expand"
         [appImage]="imageUrl"
         [ref]="ref"
         [defaultWidth]="ref?.plugins?.['plugin/image']?.width"
         [defaultHeight]="ref?.plugins?.['plugin/image']?.height"
         [grid]="disableResize"
         [appResize]="!disableResize"></div>
  }
  @if (videoUrl) {
    <video #video
           class="video-expand"
           [autoplay]="autoplay"
           controls
           [appResize]="!disableResize">
      <source [src]="videoUrl">
    </video>
  }
  @if (audioUrl) {
    <audio #audio
           class="no-resize audio-expand"
           [autoplay]="autoplay"
           controls>
      <source [src]="audioUrl">
    </audio>
  }
  @if (qrUrl) {
    <app-qr class="zoom qr-expand"
            [url]="qrUrl"
            [appResize]="!disableResize"></app-qr>
  }
  @if (todo) {
    <app-todo class="zoom"
              [ref]="ref"
              [text]="text"
              [tags]="tags"
              (comment)="comment.emit($event)"
              (copied)="copied.emit($event)"></app-todo>
  }
  @if (backgammon) {
    <app-backgammon class="no-resize"
                    [ref]="ref"
                    [text]="text"
                    (comment)="comment.emit($event)"
                    (copied)="copied.emit($event)"></app-backgammon>
  }
  @if (chess) {
    <app-chess class="no-resize"
               [white]="chessWhite"
               [ref]="ref"
               [text]="text"
               (comment)="comment.emit($event)"
               (copied)="copied.emit($event)"></app-chess>
  }
}
@if (code) {
  <app-md class="code md-container"
          [origin]="currentOrigin"
          [text]="currentCode"
          [mermaid]="false"
          [clipboard]="false"></app-md>
} @else if (currentText) {
  <app-md class="zoom md-container"
          [class.expand]="expand"
          [origin]="currentOrigin"
          [text]="currentText"
          [plugins]="currentTags"></app-md>
}
@if (pdfUrl) {
  <div class="embed-container"
       [appResizeHandle]="!disableResize && !fullscreen"
       [child]="pdfIframe">
    <iframe #pdfIframe
            class="embed-expand ready"
            src="about:blank"
            frameborder="0"
            scrolling="yes"
            allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share;"
            referrerpolicy="strict-origin-when-cross-origin"></iframe>
  </div>
}
@for (ui of uis; track ui.tag) {
  <app-md class="zoom md-container"
          [class]="uiCss(ui.tag)"
          [disableSanitizer]="true"
          [origin]="currentOrigin"
          [text]="uiMarkdown(ui.tag)"></app-md>
}
@if (mod) {
  <app-mod class="zoom md-container"
           [mod]="mod"
           [class.expand]="expand"></app-mod>
}