Skip to content

Commit 7a1531b

Browse files
committed
feat: Profile read view, QR PNG copy, permission styling, Safari/iOS builds, GitHub Pages
- Add profile read-only view with npub/nsec display and toggle - Add QR code Copy as PNG button (creates card with profile name) - Fix Chrome MV3 async message passing (getNpub, getNsec, generatePrivateKey) - Fix savePrivateKey bytesToHex error for nsec keys - Fix CSP violations - remove inline onclick handlers - Fix vault/api-keys relayInfo undefined error - Improve permission page styling with modern card layout - Make options pages open in same tab (no tab clutter) - Add close buttons to all options pages - Rename options.html to full_settings.html - Rename default profile to 'Default Nostr Profile' - Add bottom sheet permission UI (falls back to tab) - Update build.js to copy source files for Xcode - Create GitHub Pages landing page in docs/ - Update README with new features and planned TODOs - Transfer repo to HumanjavaEnterprises org
1 parent d8782d1 commit 7a1531b

133 files changed

Lines changed: 112101 additions & 908 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,22 @@ See [docs/PROJECT-VISION.md](docs/PROJECT-VISION.md) for the full roadmap.
5757
- [x] Encrypted .md vault (NIP-78)
5858
- [x] API key vault (encrypted, relay-synced)
5959
- [x] Master password (keys encrypted at rest, auto-lock)
60+
- [x] Profile read-only view with npub/nsec display
61+
- [x] QR code generation for npub (with Copy as PNG)
62+
- [x] Modern permission page styling
63+
- [x] Options pages open in same tab (no tab clutter)
64+
- [x] Close buttons on all options pages
6065

6166
### Planned
6267
- [ ] P2P room sharing (NIP-59 gift wrap)
6368
- [ ] PWA at nostrkey.app
6469
- [ ] Login with Nostr auth flow
70+
- [ ] Bottom sheet permission UI (overlay instead of new tab)
71+
- [ ] App Group + Keychain sharing for iOS native app integration
72+
- [ ] Enhanced Vault integration with file attachments
73+
- [ ] API key auto-fill for supported services
74+
- [ ] Backup/restore profiles to encrypted file
75+
- [ ] Multiple relay sets per profile
6576

6677
## NIPs Implemented
6778

@@ -86,7 +97,7 @@ See [docs/PROJECT-VISION.md](docs/PROJECT-VISION.md) for the full roadmap.
8697

8798
### Setup
8899
```bash
89-
git clone https://github.com/vveerrgg/nostrkey.browser.plugin.src.git
100+
git clone https://github.com/HumanjavaEnterprises/nostrkey.browser.plugin.src.git
90101
cd nostrkey.browser.plugin.src
91102
npm install
92103
```

apple/.DS_Store

6 KB
Binary file not shown.

apple/NostrKey.xcodeproj/project.pbxproj

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@
6969
944A6E04299F2FBB0032C2E3 /* experimental in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E02299F2FBB0032C2E3 /* experimental */; };
7070
944A6E05299F2FBB0032C2E3 /* experimental in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E02299F2FBB0032C2E3 /* experimental */; };
7171
944A6E06299F2FBB0032C2E3 /* experimental in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E02299F2FBB0032C2E3 /* experimental */; };
72-
944A6E0E299F32070032C2E3 /* wizards in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E0D299F32070032C2E3 /* wizards */; };
73-
944A6E0F299F32070032C2E3 /* wizards in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E0D299F32070032C2E3 /* wizards */; };
74-
944A6E10299F32070032C2E3 /* wizards in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E0D299F32070032C2E3 /* wizards */; };
75-
944A6E11299F32070032C2E3 /* wizards in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E0D299F32070032C2E3 /* wizards */; };
7672
944A6E13299F39D30032C2E3 /* permission in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E12299F39D30032C2E3 /* permission */; };
7773
944A6E14299F39D30032C2E3 /* permission in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E12299F39D30032C2E3 /* permission */; };
7874
944A6E15299F39D30032C2E3 /* permission in Resources */ = {isa = PBXBuildFile; fileRef = 944A6E12299F39D30032C2E3 /* permission */; };
@@ -290,7 +286,6 @@
290286
};
291287
941B03A2296FA90400CA291E /* src */ = {
292288
isa = PBXGroup;
293-
name = src;
294289
children = (
295290
9471E91E29A470C700EA623B /* event_history */,
296291
944A6E12299F39D30032C2E3 /* permission */,
@@ -315,6 +310,7 @@
315310
941B03AA296FA90400CA291E /* popup.js */,
316311
948C69E72982DFE900FB3574 /* background.html */,
317312
);
313+
name = src;
318314
path = ../distros/safari;
319315
sourceTree = "<group>";
320316
};
@@ -794,7 +790,7 @@
794790
buildSettings = {
795791
CODE_SIGN_STYLE = Automatic;
796792
CURRENT_PROJECT_VERSION = 4.0.0;
797-
DEVELOPMENT_TEAM = 5SD834TD9W;
793+
DEVELOPMENT_TEAM = H48PW6TC25;
798794
GENERATE_INFOPLIST_FILE = YES;
799795
INFOPLIST_FILE = "iOS (Extension)/Info.plist";
800796
INFOPLIST_KEY_CFBundleDisplayName = "nostrkey Extension";
@@ -825,7 +821,7 @@
825821
buildSettings = {
826822
CODE_SIGN_STYLE = Automatic;
827823
CURRENT_PROJECT_VERSION = 4.0.0;
828-
DEVELOPMENT_TEAM = 5SD834TD9W;
824+
DEVELOPMENT_TEAM = H48PW6TC25;
829825
GENERATE_INFOPLIST_FILE = YES;
830826
INFOPLIST_FILE = "iOS (Extension)/Info.plist";
831827
INFOPLIST_KEY_CFBundleDisplayName = "nostrkey Extension";
@@ -859,7 +855,7 @@
859855
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
860856
CODE_SIGN_STYLE = Automatic;
861857
CURRENT_PROJECT_VERSION = 4.0.0;
862-
DEVELOPMENT_TEAM = 5SD834TD9W;
858+
DEVELOPMENT_TEAM = H48PW6TC25;
863859
GENERATE_INFOPLIST_FILE = YES;
864860
INFOPLIST_FILE = "iOS (App)/Info.plist";
865861
INFOPLIST_KEY_CFBundleDisplayName = NostrKey;
@@ -900,7 +896,7 @@
900896
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
901897
CODE_SIGN_STYLE = Automatic;
902898
CURRENT_PROJECT_VERSION = 4.0.0;
903-
DEVELOPMENT_TEAM = 5SD834TD9W;
899+
DEVELOPMENT_TEAM = H48PW6TC25;
904900
GENERATE_INFOPLIST_FILE = YES;
905901
INFOPLIST_FILE = "iOS (App)/Info.plist";
906902
INFOPLIST_KEY_CFBundleDisplayName = NostrKey;
@@ -942,7 +938,7 @@
942938
CODE_SIGN_STYLE = Automatic;
943939
CURRENT_PROJECT_VERSION = 4.0.0;
944940
DEAD_CODE_STRIPPING = YES;
945-
DEVELOPMENT_TEAM = 5SD834TD9W;
941+
DEVELOPMENT_TEAM = H48PW6TC25;
946942
ENABLE_HARDENED_RUNTIME = YES;
947943
GENERATE_INFOPLIST_FILE = YES;
948944
INFOPLIST_FILE = "macOS (Extension)/Info.plist";
@@ -975,7 +971,7 @@
975971
CODE_SIGN_STYLE = Automatic;
976972
CURRENT_PROJECT_VERSION = 4.0.0;
977973
DEAD_CODE_STRIPPING = YES;
978-
DEVELOPMENT_TEAM = 5SD834TD9W;
974+
DEVELOPMENT_TEAM = H48PW6TC25;
979975
ENABLE_HARDENED_RUNTIME = YES;
980976
GENERATE_INFOPLIST_FILE = YES;
981977
INFOPLIST_FILE = "macOS (Extension)/Info.plist";
@@ -1007,10 +1003,11 @@
10071003
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
10081004
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
10091005
CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostrkey.entitlements";
1006+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
10101007
CODE_SIGN_STYLE = Automatic;
10111008
CURRENT_PROJECT_VERSION = 4.0.0;
10121009
DEAD_CODE_STRIPPING = YES;
1013-
DEVELOPMENT_TEAM = 5SD834TD9W;
1010+
DEVELOPMENT_TEAM = H48PW6TC25;
10141011
ENABLE_HARDENED_RUNTIME = YES;
10151012
GENERATE_INFOPLIST_FILE = YES;
10161013
INFOPLIST_FILE = "NostrKey--macOS--Info.plist";
@@ -1043,10 +1040,11 @@
10431040
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
10441041
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
10451042
CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostrkey.entitlements";
1043+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
10461044
CODE_SIGN_STYLE = Automatic;
10471045
CURRENT_PROJECT_VERSION = 4.0.0;
10481046
DEAD_CODE_STRIPPING = YES;
1049-
DEVELOPMENT_TEAM = 5SD834TD9W;
1047+
DEVELOPMENT_TEAM = H48PW6TC25;
10501048
ENABLE_HARDENED_RUNTIME = YES;
10511049
GENERATE_INFOPLIST_FILE = YES;
10521050
INFOPLIST_FILE = "NostrKey--macOS--Info.plist";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>NostrKey (iOS).xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>1</integer>
11+
</dict>
12+
<key>NostrKey (macOS).xcscheme_^#shared#^_</key>
13+
<dict>
14+
<key>orderHint</key>
15+
<integer>0</integer>
16+
</dict>
17+
</dict>
18+
</dict>
19+
</plist>

build.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const entryPoints = {
1616
'content.build': `${SRC}/content.js`,
1717
'nostr.build': `${SRC}/nostr.js`,
1818
'popup.build': `${SRC}/popup.js`,
19+
'sidepanel.build': `${SRC}/sidepanel.js`,
1920
'options.build': `${SRC}/options.js`,
2021
'permission/permission.build': `${SRC}/permission/permission.js`,
2122
'experimental/experimental.build': `${SRC}/experimental/experimental.js`,
@@ -38,7 +39,8 @@ const shared = {
3839
const staticFiles = [
3940
'popup.html',
4041
'popup.css',
41-
'options.html',
42+
'sidepanel.html',
43+
'full_settings.html',
4244
'options.css',
4345
'background.html',
4446
'permission/permission.html',
@@ -108,6 +110,16 @@ async function buildSafari(opts = {}) {
108110
// Safari manifest
109111
fs.copyFileSync(path.join(SRC, 'manifest.json'), path.join(SAFARI_DIST, 'manifest.json'));
110112

113+
// Copy source files that Xcode project expects
114+
const xcodeSourceFiles = ['popup.js', 'options.js', 'nostr.js', 'content.js', 'background.js'];
115+
xcodeSourceFiles.forEach(file => {
116+
const src = path.join(SRC, file);
117+
const dest = path.join(SAFARI_DIST, file);
118+
if (fs.existsSync(src)) {
119+
fs.copyFileSync(src, dest);
120+
}
121+
});
122+
111123
console.log(`Safari build complete → ${SAFARI_DIST}/`);
112124
}
113125

distros/chrome/api-keys/api-keys.build.js

Lines changed: 4648 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

distros/chrome/api-keys/api-keys.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
<title>API Key Vault</title>
99
</head>
1010

11-
<body class="text-fuchsia-900 p-3.5 lg:p-32" x-data="apiKeyManager" x-cloak>
12-
<p>
13-
<a href="/options.html" class="border-none hover:underline"
14-
>&larr; Back</a
15-
>
16-
</p>
17-
18-
<h1 class="section-header">API Key Vault</h1>
11+
<body class="p-4 md:p-8 lg:p-16 max-w-5xl mx-auto" x-data="apiKeyManager" x-cloak>
12+
<div class="flex items-start justify-between mb-4">
13+
<h1 class="section-header">API Key Vault</h1>
14+
<button id="close-btn" class="button" title="Close" style="min-width:auto;padding:8px 12px;">
15+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
16+
<path d="M18 6L6 18M6 6l12 12"></path>
17+
</svg>
18+
</button>
19+
</div>
1920
<p class="text-sm italic">
2021
Store API keys encrypted to your Nostr key. Synced via NIP-78 relays
2122
or kept local-only.
@@ -52,23 +53,23 @@ <h1 class="section-header">API Key Vault</h1>
5253
</label>
5354
<span
5455
class="text-xs text-gray-500"
55-
x-text="`${keys.length} key${keys.length !== 1 ? 's' : ''}`"
56+
x-text="keys.length + ' key' + (keys.length !== 1 ? 's' : '')"
5657
></span>
5758
</div>
5859

5960
<!-- Key table -->
6061
<div class="mt-4" x-show="keys.length > 0">
6162
<table class="w-full text-sm table-auto">
6263
<thead class="text-left">
63-
<tr class="border-b border-fuchsia-200">
64+
<tr class="border-b border-monokai-bg-lighter">
6465
<th class="p-2">Label</th>
6566
<th class="p-2">Secret</th>
6667
<th class="p-2 text-right">Actions</th>
6768
</tr>
6869
</thead>
6970
<tbody>
7071
<template x-for="key in sortedKeys" :key="key.id">
71-
<tr class="border-b border-fuchsia-100 hover:bg-fuchsia-50">
72+
<tr class="border-b border-monokai-bg-lighter hover:bg-monokai-bg-lighter">
7273
<!-- Label cell -->
7374
<td class="p-2">
7475
<template x-if="editingId === key.id">
@@ -148,7 +149,7 @@ <h1 class="section-header">API Key Vault</h1>
148149
</div>
149150

150151
<!-- Add key form -->
151-
<div class="mt-4 p-3 border border-fuchsia-200 rounded">
152+
<div class="mt-4 p-4 border border-monokai-bg-lighter rounded-lg bg-monokai-bg-light">
152153
<h3 class="text-sm font-bold mb-2">Add Key</h3>
153154
<div class="flex flex-col md:flex-row gap-2">
154155
<input
@@ -191,7 +192,7 @@ <h3 class="text-sm font-bold mb-2">Add Key</h3>
191192

192193
<!-- Toast -->
193194
<div
194-
class="fixed top-0 right-0 bg-fuchsia-800 rounded-md p-4 text-white m-8 drop-shadow-md"
195+
class="fixed top-0 right-0 bg-monokai-accent text-monokai-bg rounded-md p-4 m-8 drop-shadow-md font-medium"
195196
x-show="toast.length > 0"
196197
x-transition:enter.opacity.delay.75ms
197198
x-transition:leave.opacity

distros/chrome/background-sw.build.js

Lines changed: 8678 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)