feat: add KeysModal for managing private key accounts

- Introduced a new KeysModal component to display and manage nsec/npub for accounts with local private keys.
- Updated AppHeader and Profile views to include a "My Keys" button, conditionally rendered based on the presence of a private key.
- Enhanced the useAccounts composable to determine if the active account holds a local private key, enabling key management functionality.

These changes improve user access to their private key information and enhance the overall account management experience.
This commit is contained in:
Dorian
2026-02-14 12:18:48 +00:00
parent d1ac281ad9
commit 2a16802404
6 changed files with 375 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddPaymentMethodIdToPayments1776400000000
implements MigrationInterface
{
name = 'AddPaymentMethodIdToPayments1776400000000';
public async up(queryRunner: QueryRunner): Promise<void> {
// Add the missing payment_method_id column
await queryRunner.query(
`ALTER TABLE "payments" ADD "payment_method_id" character varying`,
);
// Add foreign key constraint to payment_methods
await queryRunner.query(
`ALTER TABLE "payments" ADD CONSTRAINT "FK_payments_payment_method_id" FOREIGN KEY ("payment_method_id") REFERENCES "payment_methods"("id") ON DELETE SET NULL ON UPDATE NO ACTION`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "payments" DROP CONSTRAINT "FK_payments_payment_method_id"`,
);
await queryRunner.query(
`ALTER TABLE "payments" DROP COLUMN "payment_method_id"`,
);
}
}