|
@@ -3,29 +3,35 @@
|
|
|
<span class="in-view-indicator" in-view="ctrl.thumbnailInView($inview)"></span>
|
|
|
|
|
|
<div ng-if="ctrl.uploading">
|
|
|
- <! -- Loading indicator -->
|
|
|
+ <!-- Loading indicator -->
|
|
|
<div class="circle active center">
|
|
|
<i class="material-icons md-24">file_upload</i>
|
|
|
<div class="loading active"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div ng-if="!ctrl.uploading">
|
|
|
- <div ng-if="ctrl.showThumbnail" class="thumbnail {{ctrl.type}}" ng-click="ctrl.download()" ng-style="ctrl.thumbnailStyle">
|
|
|
+ <div ng-if="ctrl.showThumbnail" class="thumbnail {{ ctrl.type }}" ng-click="ctrl.download()" ng-style="ctrl.thumbnailStyle">
|
|
|
|
|
|
+ <!-- Loading indicator -->
|
|
|
<div class="loading-wrapper" ng-class="{active: ctrl.downloading || ctrl.thumbnailDownloading}">
|
|
|
<div class="loading"></div>
|
|
|
<div class="loading-text" translate>messenger.DOWNLOADING</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- Thumbnail overlays for videos and GIFs -->
|
|
|
<div class="overlay video" ng-if="ctrl.type === 'video' && !ctrl.downloading">
|
|
|
<i class="material-icons md-light">play_circle_outline</i>
|
|
|
</div>
|
|
|
<div class="overlay gif" ng-if="ctrl.type === 'file' && ctrl.message.file.type === 'image/gif' && !ctrl.downloading">
|
|
|
<i class="material-icons md-light">play_circle_outline</i>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- Thumbnails -->
|
|
|
<img ng-if="ctrl.thumbnail !== null" ng-src="{{ctrl.thumbnail}}">
|
|
|
<div ng-if="ctrl.message.thumbnail != undefined" class="thumbnail-loader">
|
|
|
<img ng-src="{{ ctrl.message.thumbnail.preview | bufferToUrl: 'image/png' }}">
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<!-- Location -->
|
|
@@ -33,14 +39,14 @@
|
|
|
|
|
|
<!-- Audio file -->
|
|
|
<div class="file-message" ng-if="ctrl.type === 'audio'">
|
|
|
- <! -- Loading indicator -->
|
|
|
+ <!-- Loading indicator -->
|
|
|
<div class="circle" ng-click="ctrl.download()"
|
|
|
ng-class="{active: !ctrl.downloading}"
|
|
|
ng-if="!ctrl.downloaded">
|
|
|
<i class="material-icons md-24">file_download</i>
|
|
|
<div class="loading" ng-class="{active: ctrl.downloading}"></div>
|
|
|
</div>
|
|
|
- <! -- Play Indicator -->
|
|
|
+ <!-- Play Indicator -->
|
|
|
<div class="circle" ng-click="ctrl.download()" ng-if="ctrl.downloaded">
|
|
|
<i class="material-icons md-24">play_arrow</i>
|
|
|
</div>
|
|
@@ -54,7 +60,7 @@
|
|
|
|
|
|
<!-- Other file messages -->
|
|
|
<div class="file-message" ng-if="ctrl.type === 'file' && !ctrl.isAnimGif" ng-click="ctrl.download()">
|
|
|
- <! -- Loading indicator -->
|
|
|
+ <!-- Loading indicator -->
|
|
|
<div class="circle"
|
|
|
ng-class="{active: !ctrl.downloading}"
|
|
|
ng-if="!ctrl.downloaded"
|
|
@@ -62,7 +68,7 @@
|
|
|
<i class="material-icons md-24">file_download</i>
|
|
|
<div class="loading" ng-class="{active: ctrl.downloading}"></div>
|
|
|
</div>
|
|
|
- <! -- Open Indicator -->
|
|
|
+ <!-- Open Indicator -->
|
|
|
<div class="circle"
|
|
|
ng-if="ctrl.downloaded && ctrl.message.thumbnail.preview !== undefined"
|
|
|
ng-style="{'background-image': 'url({{ctrl.message.thumbnail.preview | bufferToUrl: 'image/png'}})' }">
|