Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions sourcePane.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

const UI = require('solid-ui')
const mime = require('mime-types')
const kb = UI.store

module.exports = {
icon: UI.icons.iconBase + 'noun_109873.svg', // noun_109873_51A7F9.svg

name: 'source',

label: function (subject) {
label: function (subject, context) {
var kb = context.session.store
var typeURIs = kb.findTypeURIs(subject)
var prefix = $rdf.Util.mediaTypeClass('text/*').uri.split('*')[0]
for (var t in typeURIs) {
Expand All @@ -25,7 +25,8 @@ module.exports = {
},

// Create a new text file in a Solid system,
mintNew: function (newPaneOptions) {
mintNew: function (context, newPaneOptions) {
var kb = context.session.store
var newInstance = newPaneOptions.newInstance
if (!newInstance) {
let uri = newPaneOptions.newBase
Expand Down Expand Up @@ -68,8 +69,9 @@ module.exports = {
})
},

render: function (subject, dom) {
const kb = UI.store
render: function (subject, context) {
const dom = context.dom
const kb = context.session.store
const fetcher = kb.fetcher
const editStyle =
'font-family: monospace; font-size: 100%; min-width:60em; margin: 1em 0.2em 1em 0.2em; padding: 1em; border: 0.1em solid #888; border-radius: 0.5em;'
Expand Down