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-repeat="metadata in bufferline.metadata">
|
||||||
<div ng-show="metadata.visible">
|
<div ng-show="metadata.visible">
|
||||||
<div ng-bind-html="metadata.content"></div>
|
<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>
|
||||||
<div ng-hide="metadata.visible">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -15,6 +15,7 @@ var Plugin = function(contentForMessage) {
|
||||||
return {
|
return {
|
||||||
contentForMessage: contentForMessage,
|
contentForMessage: contentForMessage,
|
||||||
exclusive: false,
|
exclusive: false,
|
||||||
|
name: "additional content"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +69,8 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce)
|
||||||
if (pluginContent) {
|
if (pluginContent) {
|
||||||
var pluginContent = {'visible': visible,
|
var pluginContent = {'visible': visible,
|
||||||
'content': $sce.trustAsHtml(pluginContent),
|
'content': $sce.trustAsHtml(pluginContent),
|
||||||
'nsfw': nsfw }
|
'nsfw': nsfw,
|
||||||
|
'name': plugins[i].name }
|
||||||
|
|
||||||
content.push(pluginContent);
|
content.push(pluginContent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue