forked from cory/tildefriends
		
	Merge branch 'main' of https://dev.tildefriends.net/cory/tildefriends
This commit is contained in:
		| @@ -345,14 +345,15 @@ class TfElement extends LitElement { | ||||
| 					([k, v]) => html` | ||||
| 						<button | ||||
| 							title=${v} | ||||
| 							class="w3-bar-item w3-padding w3-hover-theme tab ${self.tab == | ||||
| 							v | ||||
| 							class="w3-bar-item w3-padding w3-hover-theme tab ${self.tab == v | ||||
| 								? 'w3-theme-l2' | ||||
| 								: 'w3-theme-l1'}" | ||||
| 							@click=${() => self.set_tab(v)} | ||||
| 						> | ||||
| 							${k} | ||||
| 							<span class=${self.tab == v ? '' : 'w3-hide-small'}>${v.charAt(0).toUpperCase() + v.substring(1)}</span> | ||||
| 							<span class=${self.tab == v ? '' : 'w3-hide-small'} | ||||
| 								>${v.charAt(0).toUpperCase() + v.substring(1)}</span | ||||
| 							> | ||||
| 						</button> | ||||
| 					` | ||||
| 				)} | ||||
| @@ -360,10 +361,12 @@ class TfElement extends LitElement { | ||||
| 		`; | ||||
| 		let contents = !this.loaded | ||||
| 			? this.loading | ||||
| 				? html`<div class="w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge"> | ||||
| 					Loading... | ||||
| 				</div> | ||||
| 				${this.render_tab()}` | ||||
| 				? html`<div | ||||
| 							class="w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge" | ||||
| 						> | ||||
| 							Loading... | ||||
| 						</div> | ||||
| 						${this.render_tab()}` | ||||
| 				: html`<div>Select or create an identity.</div>` | ||||
| 			: this.render_tab(); | ||||
| 		return html` | ||||
|   | ||||
| @@ -295,14 +295,18 @@ class TfComposeElement extends LitElement { | ||||
| 				{ | ||||
| 					values: values, | ||||
| 					selectTemplate: function (item) { | ||||
| 						return item ? `[@${item.original.key}](${item.original.value})` : undefined; | ||||
| 						return item | ||||
| 							? `[@${item.original.key}](${item.original.value})` | ||||
| 							: undefined; | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					trigger: '&', | ||||
| 					values: this.autocomplete, | ||||
| 					selectTemplate: function (item) { | ||||
| 						return item ? `` : undefined; | ||||
| 						return item | ||||
| 							? `` | ||||
| 							: undefined; | ||||
| 					}, | ||||
| 				}, | ||||
| 			], | ||||
| @@ -544,7 +548,7 @@ class TfComposeElement extends LitElement { | ||||
| 							@paste=${this.paste} | ||||
| 							contenteditable | ||||
| 							.innerText=${live(draft.text ?? '')} | ||||
| 							></span> | ||||
| 						></span> | ||||
| 					</div> | ||||
| 					<div class="w3-half w3-padding"> | ||||
| 						${content_warning} | ||||
|   | ||||
| @@ -247,9 +247,7 @@ ${JSON.stringify(mention, null, 2)}</pre | ||||
| 		if (mentions.length) { | ||||
| 			let self = this; | ||||
| 			return html` | ||||
| 				<fieldset | ||||
| 					style="padding: 0.5em; border: 1px solid black" | ||||
| 				> | ||||
| 				<fieldset style="padding: 0.5em; border: 1px solid black"> | ||||
| 					<legend>Mentions</legend> | ||||
| 					${mentions.map((x) => self.render_mention(x))} | ||||
| 				</fieldset> | ||||
|   | ||||
| @@ -195,12 +195,16 @@ class TfTabConnectionsElement extends LitElement { | ||||
| 					${this.identities.map( | ||||
| 						(x) => | ||||
| 							html`<li class="w3-bar"> | ||||
| 								${x == this.server_identity ? | ||||
| 									html`<span class="w3-tag w3-medium w3-round w3-theme-l1">🖥 local server</span>` : | ||||
| 									undefined} | ||||
| 								${this.my_identities.indexOf(x) != -1 ? | ||||
| 									html`<span class="w3-tag w3-medium w3-round w3-theme-d1">😎 you</span>` : | ||||
| 									undefined} | ||||
| 								${x == this.server_identity | ||||
| 									? html`<span class="w3-tag w3-medium w3-round w3-theme-l1" | ||||
| 											>🖥 local server</span | ||||
| 										>` | ||||
| 									: undefined} | ||||
| 								${this.my_identities.indexOf(x) != -1 | ||||
| 									? html`<span class="w3-tag w3-medium w3-round w3-theme-d1" | ||||
| 											>😎 you</span | ||||
| 										>` | ||||
| 									: undefined} | ||||
| 								<tf-user id=${x} .users=${this.users}></tf-user> | ||||
| 							</li>` | ||||
| 					)} | ||||
|   | ||||
| @@ -115,13 +115,17 @@ class TfTabNewsElement extends LitElement { | ||||
| 				></tf-profile>` | ||||
| 			: undefined; | ||||
| 		let edit_profile; | ||||
| 		if (!this.loading && | ||||
| 		if ( | ||||
| 			!this.loading && | ||||
| 			this.users[this.whoami]?.name === undefined && | ||||
| 			this.hash.substring(1) != this.whoami) { | ||||
| 			edit_profile = html` | ||||
| 				<div class="w3-panel w3-padding w3-round w3-card-4 w3-theme-l3"> | ||||
| 					ℹ️ Follow your identity link ☝️ above to edit your profile and set your name. | ||||
| 				</div>`; | ||||
| 			this.hash.substring(1) != this.whoami | ||||
| 		) { | ||||
| 			edit_profile = html` <div | ||||
| 				class="w3-panel w3-padding w3-round w3-card-4 w3-theme-l3" | ||||
| 			> | ||||
| 				ℹ️ Follow your identity link ☝️ above to edit your profile and set your | ||||
| 				name. | ||||
| 			</div>`; | ||||
| 		} | ||||
| 		return html` | ||||
| 			<p class="w3-bar"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user