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
26 changes: 13 additions & 13 deletions src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ module.exports = {
** (suppresses asking for a full URI or workspace)
**
*/
function newThingUI (context, thePanes) {
const dom = context.dom
const div = context.div
if (context.me && !context.me.uri) {
throw new Error('newThingUI: Invalid userid: ' + context.me)
function newThingUI (createContext, dataBrowserContext, thePanes) {
const dom = createContext.dom
const div = createContext.div
if (createContext.me && !createContext.me.uri) {
throw new Error('newThingUI: Invalid userid: ' + createContext.me)
}

var iconStyle = 'padding: 0.7em; width: 2em; height: 2em;' // was: 'padding: 1em; width: 3em; height: 3em;'
Expand Down Expand Up @@ -68,7 +68,7 @@ function newThingUI (context, thePanes) {
return new Promise(function (resolve, reject) {
var selectUI // , selectUIParent
function callbackWS (ws, newBase) {
UI.authn.logInLoadProfile(context).then(
UI.authn.logInLoadProfile(createContext).then(
_context => {
var newPaneOptions = {
newBase: newBase,
Expand All @@ -85,7 +85,7 @@ function newThingUI (context, thePanes) {
newPaneOptions.newBase
)
options.pane
.mintNew(context, newPaneOptions)
.mintNew(dataBrowserContext, newPaneOptions)
.then(function (newPaneOptions) {
if (!newPaneOptions || !newPaneOptions.newInstance) {
throw new Error('Cannot mint new - missing newInstance')
Expand Down Expand Up @@ -197,7 +197,7 @@ function newThingUI (context, thePanes) {
return classMap
}, {})
mintingPanes.forEach(pane => {
const icon = context.div.appendChild(dom.createElement('img'))
const icon = createContext.div.appendChild(dom.createElement('img'))
icon.setAttribute('src', pane.icon)
const noun = pane.mintClass
? mintingClassMap[pane.mintClass] > 1
Expand All @@ -212,15 +212,15 @@ function newThingUI (context, thePanes) {
selectTool(icon)
makeNewAppInstance({
event: e,
folder: context.folder,
folder: createContext.folder,
iconEle: icon,
pane,
noun,
noIndexHTML: true, // do NOT @@ for now write a HTML file
div: context.div,
me: context.me,
dom: context.dom,
refreshTarget: context.refreshTarget
div: createContext.div,
me: createContext.me,
dom: createContext.dom,
refreshTarget: createContext.refreshTarget
})
})
}
Expand Down