Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
h.textContent = str
return h
}
// Todo: only show this if there is vcard info
heading('Contact')
const contactDisplay = paneDiv(context, subject, 'contact')
contactDisplay.style.border = '0em' // override form
main.appendChild(contactDisplay)
if (store.holds(subject, ns.foaf('knows'))) {
heading('Solid Friends')
widgets.attachmentList(dom, subject, container, {
doc: profile,
modify: false,
predicate: ns.foaf('knows'),
noun: 'friend'
})
}
}
const dom = context.dom
var h = main.appendChild(dom.createElement('h3'))
h.setAttribute(
'style',
'font-size: 120%; color:' + highlightColor + ';'
)
h.textContent = str
return h
}
// Todo: only show this if there is vcard info
heading('Contact')
const contactDisplay = paneDiv(context, subject, 'contact')
contactDisplay.style.border = '0em' // override form
main.appendChild(contactDisplay)
if (store.holds(subject, ns.foaf('knows'))) {
heading('Solid Friends')
widgets.attachmentList(dom, subject, container, {
doc: profile,
modify: false,
predicate: ns.foaf('knows'),
noun: 'friend'
})
}
}
const dom = context.dom
var h = main.appendChild(dom.createElement('h3'))
h.setAttribute(
'style',
'font-size: 120%; color:' + highlightColor + ';'
)
h.textContent = str
return h
}
// Todo: only show this if there is vcard info
heading('Contact')
const contactDisplay = paneDiv(context, subject, 'contact')
contactDisplay.style.border = '0em' // override form
main.appendChild(contactDisplay)
if (store.holds(subject, ns.foaf('knows'))) {
heading('Solid Friends')
widgets.attachmentList(dom, subject, container, {
doc: profile,
modify: false,
predicate: ns.foaf('knows'),
noun: 'friend'
})
}
}
const dom = context.dom
comment(`This is your public social network.
Just put people here you are happy to be connected with publicly
(You can always keep private track of friends and family in your contacts.)`)
// TODO: would be useful to explain what it means to "drag people"
// what is it that is being dragged?
// is there a way to search for people (or things to drag) on this page?
if (editableProfile) {
comment('Drag people onto the target below to add people.')
}
widgets.attachmentList(dom, subject, main, {
doc: profile,
modify: !!editableProfile,
predicate: ns.foaf('knows'),
noun: 'friend'
})
heading('The style of your public profile')
renderProfileForm(main, subject)
heading('Thank you for filling your profile.')
},
(err: Error) => {
comment(`This is your public social network.
Just put people here you are happy to be connected with publicly
(You can always keep private track of friends and family in your contacts.)`)
// TODO: would be useful to explain what it means to "drag people"
// what is it that is being dragged?
// is there a way to search for people (or things to drag) on this page?
if (editableProfile) {
comment('Drag people onto the target below to add people.')
}
widgets.attachmentList(dom, subject, main, {
doc: profile,
modify: !!editableProfile,
predicate: ns.foaf('knows'),
noun: 'friend'
})
heading('The style of your public profile')
renderProfileForm(main, subject)
heading('Thank you for filling your profile.')
},
(err: Error) => {
h.textContent = str
return h
}
// Todo: only show this if there is vcard info
heading('Contact')
const contactDisplay = paneDiv(context, subject, 'contact')
contactDisplay.style.border = '0em' // override form
main.appendChild(contactDisplay)
if (store.holds(subject, ns.foaf('knows'))) {
heading('Solid Friends')
widgets.attachmentList(dom, subject, container, {
doc: profile,
modify: false,
predicate: ns.foaf('knows'),
noun: 'friend'
})
}
}
const dom = context.dom
function getName (store: IndexedFormula, ownersProfile: NamedNode): string {
return (
store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) ||
store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||
new URL(ownersProfile.uri).host.split('.')[0]
)
}
label: function (subject, context) {
var t = context.session.store.findTypeURIs(subject)
if (
t[ns.vcard('Individual').uri] ||
t[ns.vcard('Organization').uri] ||
t[ns.foaf('Person').uri] ||
t[ns.schema('Person').uri]
) {
return 'Profile'
}
return null
},
label: function (subject, context) {
var t = context.session.store.findTypeURIs(subject)
if (
t[ns.vcard('Individual').uri] ||
t[ns.vcard('Organization').uri] ||
t[ns.foaf('Person').uri] ||
t[ns.schema('Person').uri]
) {
return 'Profile'
}
return null
},