|
22 | 22 | import { graph, namedNode, NamedNode, Namespace, serialize, st, Statement, sym, BlankNode } from 'rdflib' |
23 | 23 | import solidAuthClient from 'solid-auth-client' |
24 | 24 | import { PaneDefinition } from 'pane-registry' |
25 | | -import Signup from './signup' |
26 | | -import widgets from '../widgets' |
27 | | -import ns from '../ns.js' |
28 | | -import utils from '../utils.js' |
| 25 | +import { Signup } from './signup' |
| 26 | +import * as widgets from '../widgets' |
| 27 | +import * as ns from '../ns.js' |
| 28 | +import * as utils from '../utils.js' |
29 | 29 | import { alert } from '../log' |
30 | 30 | import { AppDetails, AuthenticationContext } from './types' |
31 | 31 | import * as debug from '../debug' |
@@ -208,7 +208,7 @@ export async function logInLoadPreferences (context: AuthenticationContext): Pro |
208 | 208 | } catch (err) { |
209 | 209 | let m2: string |
210 | 210 | if (err instanceof UnauthorizedError) { |
211 | | - m2 = 'Strange - you are not authenticated (properly logged in) to read preference file.' |
| 211 | + m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?' |
212 | 212 | alert(m2) |
213 | 213 | } else if (err instanceof CrossOriginForbiddenError) { |
214 | 214 | m2 = `Unauthorized: Assuming preference file blocked for origin ${window.location.origin}` |
@@ -439,7 +439,7 @@ export async function findAppInstances ( |
439 | 439 | for (let i = 0; i < containers.length; i++) { |
440 | 440 | const cont = containers[i] |
441 | 441 | context.instances = context.instances.concat( |
442 | | - solidLogicSingleton.getContainerElements(cont as NamedNode) as NamedNode[] |
| 442 | + (await solidLogicSingleton.getContainerMembers(cont.value)).map(uri => solidLogicSingleton.store.sym(uri)) // @@ warning: uses strings not NN |
443 | 443 | ) |
444 | 444 | } |
445 | 445 | return context |
@@ -1027,10 +1027,10 @@ export function loginStatusBox ( |
1027 | 1027 | box.refresh = function () { |
1028 | 1028 | solidAuthClient.currentSession().then( |
1029 | 1029 | session => { |
1030 | | - if (session && session.webId) { |
| 1030 | + if (session && session.webId) { // offline |
1031 | 1031 | me = sym(session.webId) |
1032 | 1032 | } else { |
1033 | | - me = null |
| 1033 | + me = offlineTestID() // null unless testing |
1034 | 1034 | } |
1035 | 1035 | if ((me && box.me !== me.uri) || (!me && box.me)) { |
1036 | 1036 | widgets.clearElement(box) |
|
0 commit comments