Add ability to not be hosted publicly
This commit is contained in:
@@ -114,6 +114,13 @@ function toolTipTop() {
|
||||
}
|
||||
|
||||
function renderAbout(opts, about, showAllHTML = "") {
|
||||
if (about.publicWebHosting == 'false') {
|
||||
return pull(
|
||||
pull.map(renderMsg.bind(this, opts, '')),
|
||||
wrap(toolTipTop() + '<main>', '</main>' + callToAction())
|
||||
);
|
||||
}
|
||||
|
||||
opts.mentions = {};
|
||||
var figCaption = h('figcaption');
|
||||
figCaption.innerHTML = 'Feed of ' + about.name + '<br>' + marked(String(about.description), opts.marked);
|
||||
@@ -338,6 +345,7 @@ function docWrite(str) {
|
||||
|
||||
function renderMsg(opts, id, msg) {
|
||||
if (opts.renderPrivate == false && typeof(msg.value.content) == 'string') return ''
|
||||
if (msg.author.publicWebHosting == 'false') return h('article', 'User has chosen not to be hosted publicly').outerHTML;
|
||||
var c = msg.value.content || {};
|
||||
var name = encodeURIComponent(msg.key);
|
||||
return h('article#' + name,
|
||||
|
||||
Reference in New Issue
Block a user