diff --git a/package.json b/package.json index 1dc4c7c..e0c692b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "plebeian-signer", - "version": "v1.1.3", + "version": "v1.1.4", "custom": { "chrome": { - "version": "v1.1.3" + "version": "v1.1.4" }, "firefox": { - "version": "v1.1.3" + "version": "v1.1.4" } }, "scripts": { diff --git a/projects/chrome/public/manifest.json b/projects/chrome/public/manifest.json index ee98a6f..dabaa96 100644 --- a/projects/chrome/public/manifest.json +++ b/projects/chrome/public/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Plebeian Signer - Nostr Identity Manager & Signer", "description": "Manage and switch between multiple identities while interacting with Nostr apps", - "version": "1.1.3", + "version": "1.1.4", "homepage_url": "https://github.com/PlebeianApp/plebeian-signer", "options_page": "options.html", "permissions": [ diff --git a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html index afc41fe..067cd18 100644 --- a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html +++ b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html @@ -6,16 +6,26 @@ Get ncryptsec -

- Enter a password to encrypt your private key. The resulting ncryptsec can be - used to securely backup or transfer your key. -

+ +@if (ncryptsec) { +
+ +
+}
- -@if (ncryptsec) { -
- -
- ncryptsec QR code -
- -
- - -
- -

Tap the text or button to copy to clipboard

-
-} +

+ Enter a password to encrypt your private key. The resulting ncryptsec can be + used to securely backup or transfer your key. +

diff --git a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss index b0d20f0..741f093 100644 --- a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss +++ b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss @@ -38,52 +38,33 @@ margin-bottom: var(--size); } -.result-section { - display: flex; - flex-direction: column; - align-items: center; - gap: var(--size); - margin-top: var(--size); -} - .qr-container { - background: white; - padding: var(--size); - border-radius: 8px; display: flex; justify-content: center; align-items: center; + margin-bottom: var(--size); +} + +.qr-button { + background: white; + padding: var(--size); + border-radius: 8px; + border: none; + cursor: pointer; + transition: transform 0.15s ease, box-shadow 0.15s ease; + + &:hover { + transform: scale(1.02); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + } + + &:active { + transform: scale(0.98); + } } .qr-code { width: 250px; height: 250px; -} - -.ncryptsec-container { - width: 100%; - display: flex; - flex-direction: column; - gap: var(--size-h); - - .ncryptsec-output { - font-family: monospace; - font-size: 0.75rem; - word-break: break-all; - cursor: pointer; - - &:hover { - background-color: var(--bs-gray-100); - } - } - - button { - width: 100%; - } -} - -.hint { - color: var(--text-muted); - font-size: 0.8rem; - text-align: center; + display: block; } diff --git a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts index 87ce6f3..a787a50 100644 --- a/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts +++ b/projects/chrome/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts @@ -1,4 +1,11 @@ -import { Component, inject, OnInit } from '@angular/core'; +import { + AfterViewInit, + Component, + ElementRef, + inject, + OnInit, + ViewChild, +} from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { IconButtonComponent, @@ -16,7 +23,12 @@ import * as QRCode from 'qrcode'; templateUrl: './ncryptsec.component.html', styleUrl: './ncryptsec.component.scss', }) -export class NcryptsecComponent extends NavComponent implements OnInit { +export class NcryptsecComponent + extends NavComponent + implements OnInit, AfterViewInit +{ + @ViewChild('passwordInput') passwordInput!: ElementRef; + privkeyHex = ''; ncryptsecPassword = ''; ncryptsec = ''; @@ -35,6 +47,10 @@ export class NcryptsecComponent extends NavComponent implements OnInit { this.#initialize(identityId); } + ngAfterViewInit(): void { + this.passwordInput.nativeElement.focus(); + } + async generateNcryptsec() { if (!this.privkeyHex || !this.ncryptsecPassword) { return; diff --git a/projects/firefox/public/manifest.json b/projects/firefox/public/manifest.json index ba3dfeb..d9956e6 100644 --- a/projects/firefox/public/manifest.json +++ b/projects/firefox/public/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Plebeian Signer", "description": "Nostr Identity Manager & Signer", - "version": "1.1.3", + "version": "1.1.4", "homepage_url": "https://github.com/PlebeianApp/plebeian-signer", "options_page": "options.html", "permissions": [ diff --git a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html index afc41fe..067cd18 100644 --- a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html +++ b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.html @@ -6,16 +6,26 @@ Get ncryptsec
-

- Enter a password to encrypt your private key. The resulting ncryptsec can be - used to securely backup or transfer your key. -

+ +@if (ncryptsec) { +
+ +
+}
- -@if (ncryptsec) { -
- -
- ncryptsec QR code -
- -
- - -
- -

Tap the text or button to copy to clipboard

-
-} +

+ Enter a password to encrypt your private key. The resulting ncryptsec can be + used to securely backup or transfer your key. +

diff --git a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss index b0d20f0..741f093 100644 --- a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss +++ b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.scss @@ -38,52 +38,33 @@ margin-bottom: var(--size); } -.result-section { - display: flex; - flex-direction: column; - align-items: center; - gap: var(--size); - margin-top: var(--size); -} - .qr-container { - background: white; - padding: var(--size); - border-radius: 8px; display: flex; justify-content: center; align-items: center; + margin-bottom: var(--size); +} + +.qr-button { + background: white; + padding: var(--size); + border-radius: 8px; + border: none; + cursor: pointer; + transition: transform 0.15s ease, box-shadow 0.15s ease; + + &:hover { + transform: scale(1.02); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + } + + &:active { + transform: scale(0.98); + } } .qr-code { width: 250px; height: 250px; -} - -.ncryptsec-container { - width: 100%; - display: flex; - flex-direction: column; - gap: var(--size-h); - - .ncryptsec-output { - font-family: monospace; - font-size: 0.75rem; - word-break: break-all; - cursor: pointer; - - &:hover { - background-color: var(--bs-gray-100); - } - } - - button { - width: 100%; - } -} - -.hint { - color: var(--text-muted); - font-size: 0.8rem; - text-align: center; + display: block; } diff --git a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts index 87ce6f3..a787a50 100644 --- a/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts +++ b/projects/firefox/src/app/components/edit-identity/ncryptsec/ncryptsec.component.ts @@ -1,4 +1,11 @@ -import { Component, inject, OnInit } from '@angular/core'; +import { + AfterViewInit, + Component, + ElementRef, + inject, + OnInit, + ViewChild, +} from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { IconButtonComponent, @@ -16,7 +23,12 @@ import * as QRCode from 'qrcode'; templateUrl: './ncryptsec.component.html', styleUrl: './ncryptsec.component.scss', }) -export class NcryptsecComponent extends NavComponent implements OnInit { +export class NcryptsecComponent + extends NavComponent + implements OnInit, AfterViewInit +{ + @ViewChild('passwordInput') passwordInput!: ElementRef; + privkeyHex = ''; ncryptsecPassword = ''; ncryptsec = ''; @@ -35,6 +47,10 @@ export class NcryptsecComponent extends NavComponent implements OnInit { this.#initialize(identityId); } + ngAfterViewInit(): void { + this.passwordInput.nativeElement.focus(); + } + async generateNcryptsec() { if (!this.privkeyHex || !this.ncryptsecPassword) { return; diff --git a/releases/plebeian-signer-chrome-v1.1.3.tar.gz b/releases/plebeian-signer-chrome-v1.1.3.tar.gz deleted file mode 100644 index 390546a..0000000 Binary files a/releases/plebeian-signer-chrome-v1.1.3.tar.gz and /dev/null differ diff --git a/releases/plebeian-signer-chrome-v1.1.4.tar.gz b/releases/plebeian-signer-chrome-v1.1.4.tar.gz new file mode 100644 index 0000000..173ec69 Binary files /dev/null and b/releases/plebeian-signer-chrome-v1.1.4.tar.gz differ diff --git a/releases/plebeian-signer-firefox-v1.1.3.tar.gz b/releases/plebeian-signer-firefox-v1.1.3.tar.gz deleted file mode 100644 index 80f05e4..0000000 Binary files a/releases/plebeian-signer-firefox-v1.1.3.tar.gz and /dev/null differ diff --git a/releases/plebeian-signer-firefox-v1.1.4.tar.gz b/releases/plebeian-signer-firefox-v1.1.4.tar.gz new file mode 100644 index 0000000..0f50c44 Binary files /dev/null and b/releases/plebeian-signer-firefox-v1.1.4.tar.gz differ