fix: improve pdf rendering and html

This commit is contained in:
tdurieux
2026-08-06 14:35:21 -07:00
parent e54b78c7e6
commit f0fdd9250b
202 changed files with 999 additions and 2051 deletions
+12 -4
View File
@@ -1,11 +1,19 @@
<div ng-if="type == 'text'" ng-model="content" ui-ace="aceOption"></div>
<div ng-if="type == 'html'" ng-bind-html="content" class="file-content markdown-body"></div>
<div ng-if="type == 'code' && content != null" ui-ace="aceOption" ng-model="content"></div>
<html-doc
ng-if="type == 'html-doc' && !showSource && content != null"
content="content"
base-url="{{fileBaseUrl}}"
allow-scripts="allowScripts"
></html-doc>
<div
ng-if="(type == 'code' || (type == 'html-doc' && showSource)) && content != null"
ui-ace="aceOption"
ng-model="content"
></div>
<img ng-if="type == 'image'" class="image-content" ng-src="{{url}}"></img>
<iframe class="h-100 overflow-auto w-100 b-0" ng-if="type == 'media'" ng-src="{{url}}"></iframe>
<div class="h-100 overflow-auto" ng-if="type == 'pdf'">
<pdfviewer class="h-100 overflow-auto" src="{{url}}" id="viewer"></pdfviewer>
</div>
<pdfviewer ng-if="type == 'pdf'" src="{{url}}"></pdfviewer>
<div ng-if="type == 'audio'"><audio controls="controls"><source ng-src="{{url}}" /></audio></div>
<div ng-if="type == 'IPython'"><notebook file="url"></notebook></div>
<div ng-if="type == 'rate_limited'" class="file-error container d-flex h-100">