diff --git a/apps/issues/script.js b/apps/issues/script.js index b7ffc0bc..7ccf746a 100644 --- a/apps/issues/script.js +++ b/apps/issues/script.js @@ -207,9 +207,7 @@ class TfIssuesAppElement extends LitElement { } render() { - let header = html` -

Tilde Friends Issues

- `; + let header = html`

Tilde Friends Issues

`; if (this.selected) { return html` ${header} diff --git a/core/app.js b/core/app.js index 3ac5e7cf..b4bd6f62 100644 --- a/core/app.js +++ b/core/app.js @@ -141,12 +141,21 @@ function socket(request, response, client) { } } response.send( - JSON.stringify(Object.assign({ - action: 'session', - credentials: credentials, - parentApp: parentApp, - id: blobId, - }, await core.getIdentityInfo(credentials?.session?.name, packageOwner, packageName))), + JSON.stringify( + Object.assign( + { + action: 'session', + credentials: credentials, + parentApp: parentApp, + id: blobId, + }, + await core.getIdentityInfo( + credentials?.session?.name, + packageOwner, + packageName + ) + ) + ), 0x1 ); diff --git a/core/client.js b/core/client.js index 50a5db88..870f4b40 100644 --- a/core/client.js +++ b/core/client.js @@ -169,15 +169,35 @@ class TfNavigationElement extends LitElement { style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 100%" @click=${self.toggle_id_dropdown} > - ${self.names[this.identity]}${self.names[this.identity] === this.identity ? '' : html` - ${this.identity}`} ▾ + ${self.names[this.identity]}${self.names[this.identity] === + this.identity + ? '' + : html` - ${this.identity}`} + ▾ -
- - +
+ + ${this.identities.map( (x) => html`
+ ${this.status.message + ? html` + +
+ + × +
ERROR:

${this.status.message}

+
+
+ ` + : undefined} `; } } diff --git a/core/core.js b/core/core.js index 55065f47..f64c8d49 100644 --- a/core/core.js +++ b/core/core.js @@ -540,13 +540,18 @@ async function getProcessBlob(blobId, key, options) { }, }; process.sendIdentities = async function () { - process.app.send(Object.assign({ - action: 'identities', - }, await getIdentityInfo( - process?.credentials?.session?.name, - options?.packageOwner, - options?.packageName - ))); + process.app.send( + Object.assign( + { + action: 'identities', + }, + await getIdentityInfo( + process?.credentials?.session?.name, + options?.packageOwner, + options?.packageName + ) + ) + ); }; process.setActiveIdentity = async function (identity) { if ( @@ -586,7 +591,7 @@ async function getProcessBlob(blobId, key, options) { process.credentials?.session?.name, options.packageOwner, options.packageName - ) + ), ] ); return id; @@ -1555,14 +1560,13 @@ async function getActiveIdentity(user, packageOwner, packageName) { } async function getIdentityInfo(user, packageOwner, packageName) { - let identities = await ssb.getIdentities( - user - ); + let identities = await ssb.getIdentities(user); let names = new Object(); for (let identity of identities) { names[identity] = identity; } - await ssb.sqlAsync(` + await ssb.sqlAsync( + ` SELECT author, name FROM ( SELECT messages.author, @@ -1577,15 +1581,12 @@ async function getIdentityInfo(user, packageOwner, packageName) { [JSON.stringify(identities)], function (row) { names[row.author] = row.name; - }); + } + ); return { identities: identities, - identity: await getActiveIdentity( - user, - packageOwner, - packageName - ), + identity: await getActiveIdentity(user, packageOwner, packageName), names: names, }; }