overleaf/services/web/app/views/project/editor/binary-file.pug
Miguel Serrano e2bf647b81 Merge pull request #2763 from overleaf/ta-dot-dot-dot
Replace Triple-Dots with Ellipsis in Pug Files

GitOrigin-RevId: 408cea0772d8751acd8939e199e49e2cf9685b8f
2020-04-23 03:29:02 +00:00

41 lines
1.2 KiB
Text

div.binary-file.full-size(
ng-controller="BinaryFileController"
ng-show="ui.view == 'file'"
ng-if="openFile"
)
include ./binary-file-header
img(
ng-show="!failedLoad"
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}"
ng-if="isImageFile()"
ng-class="{'img-preview': !imgLoaded}"
onerror="sl_binaryFilePreviewError()"
onabort="sl_binaryFilePreviewError()"
onload="sl_binaryFilePreviewLoaded()"
)
img(
ng-show="!failedLoad"
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}?format=png"
ng-if="isPreviewableFile()"
ng-class="{'img-preview': !imgLoaded}"
onerror="sl_binaryFilePreviewError()"
onabort="sl_binaryFilePreviewError()"
onload="sl_binaryFilePreviewLoaded()"
)
div(ng-if="isTextFile() && !textPreview.error")
div.text-loading(ng-show="textPreview.loading && !textPreview.error")
| #{translate('loading')}…
div.text-preview(ng-show="textPreview.data && !textPreview.loading && !textPreview.error")
div.scroll-container
p
| {{ textPreview.data }}
p(ng-show="textPreview.shouldShowDots")
| …
p.no-preview(
ng-if="failedLoad || textPreview.error || isUnpreviewableFile()"
) #{translate("no_preview_available")}