forked from cory/tildefriends
		
	Slightly better initial experience. When you create your first identity, it becomes selected.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4030 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		| @@ -48,7 +48,6 @@ class TfElement extends LitElement { | ||||
| 				self.connections = value; | ||||
| 			} | ||||
| 		}); | ||||
| 		tfrpc.rpc.localStorageGet('whoami').then(whoami => self.whoami = whoami); | ||||
| 	} | ||||
|  | ||||
| 	set_hash(hash) { | ||||
| @@ -227,7 +226,9 @@ class TfElement extends LitElement { | ||||
| 	} | ||||
|  | ||||
| 	async render_id_picker() { | ||||
| 		let whoami = await tfrpc.rpc.localStorageGet('whoami'); | ||||
| 		this.ids = this.ids || (await tfrpc.rpc.getIdentities()) || []; | ||||
| 		this.whoami = whoami ?? (this.ids.length ? this.ids[0] : undefined); | ||||
| 		return html` | ||||
| 			<tf-id-picker id="picker" selected=${this.whoami} .ids=${this.ids} @change=${this._handle_whoami_changed}></tf-id-picker> | ||||
| 			<button @click=${this.create_identity}>Create Identity</button> | ||||
|   | ||||
| @@ -169,7 +169,7 @@ class TfMessageElement extends LitElement { | ||||
|  | ||||
| 	render_children() { | ||||
| 		let self = this; | ||||
| 		if (false && this.collapsed && this.message.child_messages?.length) { | ||||
| 		if (this.collapsed && this.message.child_messages?.length) { | ||||
| 			return html`<input type="button" value=${this.message.child_messages?.length + ' More'} @click=${() => self.collapsed = false}></input>`; | ||||
| 		} else { | ||||
| 			return html`${(this.message.child_messages || []).map(x => html`<tf-message .message=${x} whoami=${this.whoami} .users=${this.users}></tf-message>`)}`; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user