UNPKG

scriptremote

Version:

Message server providing secure remote access to scripted applications from a browser UI

40 lines (33 loc) 1.47 kB
<!-- This is the default Angular template for displaying read-only message data, which is contained in the 'content' and 'files' scope variables. 'content' is an array of name-value string pairs which are rendered as paragraphs. 'files' is an array (possibly empty) of name-data pairs for files attached to the message. The file data can be text, png image, or svg image and is rendered in a div. The template can be customized for specific data by handling the array elements individually and choosing styling using inline CSS and classes from the bootstrap library. It is best to avoid using script tags or url's unless you know what you are doing since they could cause code conflicts or security vulnerabilities. --> <ul class="list-group"> <li ng-repeat="item in content" class="list-group-item"> <p style="text-decoration:underline blue"><b>{{item.name}}:</b></p> <p>{{item.value}}</p> </li> </ul> <ul class="list-group"> <li ng-repeat="item in files" class="list-group-item"> <p style="text-decoration:underline blue"><b>{{item.key}}:</b></p> <div ng-if="item.type == 'image/svg+xml'"> <img data-ng-src="data:image/svg+xml,{{item.data}}"/> </div> <div ng-if="item.type == 'image/png'"> <img data-ng-src="data:image/png;base64,{{item.data}}"/> </div> <div ng-if="item.type == 'text/plain'"> {{item.data}} </div> </li> </ul>