Compare commits
No commits in common. "24e1356bbcd15fa59802a179e7196c4adb20dfcb" and "fbb5b5575ce0d9d45f50b5e786e1a5ac36675aa7" have entirely different histories.
24e1356bbc
...
fbb5b5575c
2 changed files with 12 additions and 14 deletions
|
@ -191,9 +191,9 @@ export default class Sidebar extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-avatar {
|
.profile-avatar {
|
||||||
max-width: 64px;
|
width: 64px;
|
||||||
max-height: 64px;
|
height: 64px;
|
||||||
border-radius: 100%;
|
border-radius: 50%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
border: 2px solid var(--color-base-300);
|
border: 2px solid var(--color-base-300);
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import { getSigner, getUserProfile, ndk } from '@/ndk';
|
import { getSigner, getUserProfile, ndk } from '@/ndk';
|
||||||
// @ts-ignore
|
|
||||||
import defaultAvatar from '@assets/default-avatar.png';
|
import defaultAvatar from '@assets/default-avatar.png';
|
||||||
import type { ArxInputChangeEvent } from '@components/General/Input';
|
import type { ArxInputChangeEvent } from '@components/General/Input';
|
||||||
import { NDKEvent, type NDKUserProfile } from '@nostr-dev-kit/ndk';
|
import { NDKEvent, type NDKUserProfile } from '@nostr-dev-kit/ndk';
|
||||||
import { LitElement, css, html } from 'lit';
|
import { LitElement, css, html } from 'lit';
|
||||||
import { customElement, state } from 'lit/decorators.js';
|
import { customElement, state } from 'lit/decorators.js';
|
||||||
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
||||||
import { when } from 'lit/directives/when.js';
|
import { when } from 'lit/directives/when.js';
|
||||||
|
|
||||||
import '@components/Breadcrumbs';
|
import '@components/Breadcrumbs';
|
||||||
|
@ -29,8 +27,8 @@ export class EveSettings extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-image {
|
.profile-image {
|
||||||
max-width: 140px;
|
width: 140px;
|
||||||
max-height: 140px;
|
height: 140px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border: calc(var(--border) * 2) solid var(--color-base-100);
|
border: calc(var(--border) * 2) solid var(--color-base-100);
|
||||||
|
@ -157,12 +155,12 @@ export class EveSettings extends LitElement {
|
||||||
</arx-fieldset>
|
</arx-fieldset>
|
||||||
<arx-fieldset legend="Profile">
|
<arx-fieldset legend="Profile">
|
||||||
${when(
|
${when(
|
||||||
this.profile?.picture,
|
this.profile!.picture,
|
||||||
() => html`
|
() => html`
|
||||||
<div class="profile-header">
|
<div class="profile-header">
|
||||||
<img
|
<img
|
||||||
class="profile-image"
|
class="profile-image"
|
||||||
src=${ifDefined(this.profile?.picture)}
|
src=${this.profile!.picture}
|
||||||
alt="Profile"
|
alt="Profile"
|
||||||
@error=${(e: Event) => {
|
@error=${(e: Event) => {
|
||||||
(e.target as HTMLImageElement).src = defaultAvatar;
|
(e.target as HTMLImageElement).src = defaultAvatar;
|
||||||
|
@ -176,7 +174,7 @@ export class EveSettings extends LitElement {
|
||||||
label="Name"
|
label="Name"
|
||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
.value=${this.profile?.name ?? ''}
|
.value=${this.profile!.name}
|
||||||
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('name', e)}
|
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('name', e)}
|
||||||
placeholder="Your display name"
|
placeholder="Your display name"
|
||||||
></arx-input>
|
></arx-input>
|
||||||
|
@ -185,7 +183,7 @@ export class EveSettings extends LitElement {
|
||||||
label="Profile Image URL"
|
label="Profile Image URL"
|
||||||
type="text"
|
type="text"
|
||||||
name="image"
|
name="image"
|
||||||
.value=${this.profile?.picture ?? ''}
|
.value=${this.profile!.picture}
|
||||||
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('picture', e)}
|
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('picture', e)}
|
||||||
placeholder="https://example.com/your-image.jpg"
|
placeholder="https://example.com/your-image.jpg"
|
||||||
></arx-input>
|
></arx-input>
|
||||||
|
@ -194,7 +192,7 @@ export class EveSettings extends LitElement {
|
||||||
label="Banner URL"
|
label="Banner URL"
|
||||||
type="text"
|
type="text"
|
||||||
name="banner"
|
name="banner"
|
||||||
.value=${this.profile?.banner ?? ''}
|
.value=${this.profile!.banner}
|
||||||
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('banner', e)}
|
@change=${(e: ArxInputChangeEvent) => this.handleInputChange('banner', e)}
|
||||||
placeholder="https://example.com/your-image.jpg"
|
placeholder="https://example.com/your-image.jpg"
|
||||||
></arx-input>
|
></arx-input>
|
||||||
|
@ -217,8 +215,8 @@ export class EveSettings extends LitElement {
|
||||||
<arx-relay-logs .logs=${this.relayStatus.logs}></arx-relay-logs>
|
<arx-relay-logs .logs=${this.relayStatus.logs}></arx-relay-logs>
|
||||||
</arx-fieldset>
|
</arx-fieldset>
|
||||||
</arx-card>
|
</arx-card>
|
||||||
<arx-card>
|
<arx-card >
|
||||||
<arx-fieldset legend="Reset">
|
<arx-fieldset legend="Reset">
|
||||||
<p>
|
<p>
|
||||||
This will delete all the data stored on this device, and you will be sent back to the setup
|
This will delete all the data stored on this device, and you will be sent back to the setup
|
||||||
screen.
|
screen.
|
||||||
|
|
Loading…
Add table
Reference in a new issue