plugins: let plugins name their content
This commit is contained in:
parent
41b0684c82
commit
b2ee67707b
2 changed files with 5 additions and 3 deletions
|
@ -124,12 +124,12 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
|||
<div ng-repeat="metadata in bufferline.metadata">
|
||||
<div ng-show="metadata.visible">
|
||||
<div ng-bind-html="metadata.content"></div>
|
||||
<button class="btn btn-primary" ng-click="metadata.visible = false">Hide additional content</button>
|
||||
<button class="btn btn-primary" ng-click="metadata.visible = false">Hide {{ metadata.name }}</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div ng-hide="metadata.visible">
|
||||
<button class="btn" ng-class="{'btn-warning': metadata.nsfw, 'btn-primary': !metadata.nsfw}" ng-click="metadata.visible = true">Show additional content</button>
|
||||
<button class="btn" ng-class="{'btn-warning': metadata.nsfw, 'btn-primary': !metadata.nsfw}" ng-click="metadata.visible = true">Show {{ metadata.name }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -15,6 +15,7 @@ var Plugin = function(contentForMessage) {
|
|||
return {
|
||||
contentForMessage: contentForMessage,
|
||||
exclusive: false,
|
||||
name: "additional content"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +69,8 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce)
|
|||
if (pluginContent) {
|
||||
var pluginContent = {'visible': visible,
|
||||
'content': $sce.trustAsHtml(pluginContent),
|
||||
'nsfw': nsfw }
|
||||
'nsfw': nsfw,
|
||||
'name': plugins[i].name }
|
||||
|
||||
content.push(pluginContent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue