Skip to content

Commit

Permalink
Attempt to use autocomplete off for external identities
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Dec 22, 2024
1 parent 25d62cd commit a69c519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
14 changes: 3 additions & 11 deletions src/app/pages/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ interface MediaItem {
<div class="links-container">
<div *ngFor="let link of profile.identityTags; let i = index" class="link-item">
<div class="link-inputs">
<select [(ngModel)]="link.platform" class="platform-select">
<select [(ngModel)]="link.platform" class="platform-select" autocomplete="off">
<option value="">Select Platform</option>
<option *ngFor="let platform of platformSuggestions" [value]="platform">
{{platform}}
Expand All @@ -341,13 +341,15 @@ interface MediaItem {
[(ngModel)]="link.identity"
placeholder="Username or ID"
class="identity-input"
autocomplete="off"
/>
<input
type="text"
[(ngModel)]="link.proof"
placeholder="Proof URL or identifier"
class="proof-input"
autocomplete="off"
/>
</div>
Expand Down Expand Up @@ -936,14 +938,10 @@ export class ProfileComponent implements OnInit {
identityTags: []
};

debugger;

// Extract identity tags from the event tags
const identityTags: IdentityLink[] = [];
const event = await this.relayService.getProfileEvent(pubkey);

debugger;

if (event && event.tags) {
event.tags.forEach(tag => {
if (tag[0] === 'i' && tag.length >= 3) {
Expand All @@ -957,8 +955,6 @@ export class ProfileComponent implements OnInit {
});
}

debugger;

this.profile.identityTags = identityTags;
}

Expand Down Expand Up @@ -1100,8 +1096,6 @@ export class ProfileComponent implements OnInit {
media: this.mediaItems
};

debugger;

this.showSigningDialog = true;
}

Expand All @@ -1118,8 +1112,6 @@ export class ProfileComponent implements OnInit {
const nip07signer = new NDKNip07Signer();
this.relayService.ndk!.signer = nip07signer;

debugger;

const events = this.relayService.createEventsFromData(
this.pubkey!,
this.dataToSign
Expand Down
5 changes: 0 additions & 5 deletions src/app/services/relay.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ export class RelayService {
}

if (latestEvent) {
debugger;
try {
const profileData = JSON.parse(latestEvent.content);
const profile = {
Expand Down Expand Up @@ -534,8 +533,6 @@ export class RelayService {
const ndkEvent = new NDKEvent();
ndkEvent.kind = NDKKind.Metadata;

debugger;

// Create metadata object without identityTags
const metadata = {
name: data.profile.name,
Expand All @@ -551,8 +548,6 @@ export class RelayService {
ndkEvent.content = JSON.stringify(metadata);
ndkEvent.tags = []; // Initialize tags array

debugger;

// Add identity tags if present
if (data.profile.identityTags) {
data.profile.identityTags.forEach((link: any) => {
Expand Down

0 comments on commit a69c519

Please sign in to comment.