## Description
Implement a user-friendly interface for managing GPG keys in the user settings panel, similar to the SSH keys management page.
## Implementation Plan
### 1. Create Template
- File: `templates/user/settings/gpgkeys.tmpl`
- Based on: `templates/user/settings/sshkeys.tmpl`
- Features:
- List all user's GPG keys with key ID, fingerprint, emails
- Add new GPG key form (paste armored public key)
- Delete key button for each key
- Display key capabilities (can sign, can encrypt)
- Show expiration status
### 2. Add Route Handlers
- File: `internal/route/user/setting.go`
- Functions:
- `GPGKeys()` - Display GPG keys page
- `GPGKeysPost()` - Handle adding new key
- `DeleteGPGKey()` - Handle key deletion
### 3. Update Navigation
- File: `templates/user/settings/navbar.tmpl`
- Add "GPG Keys" menu item
### 4. Add Form Structures
- File: `internal/form/user.go`
- Add `AddGPGKeyForm` struct
## Acceptance Criteria
- [ ] User can view all their GPG keys
- [ ] User can add new GPG key by pasting armored public key
- [ ] User can delete GPG keys
- [ ] Key information displayed: ID, fingerprint, emails, capabilities
- [ ] Expiration warnings shown for expired keys
- [ ] Error handling for invalid keys
## Related
Part of GPG verification feature (issue #1)
ec28d561: Add GPG Keys Management UI in User Settings
96220972: Add i18n translations for GPG Keys management
All acceptance criteria from the issue have been met!
Implementation completed! ✅
The GPG Keys Management UI has been successfully implemented with all requested features:
**Completed:**
- ✅ Created GPG keys settings page template (templates/user/settings/gpgkeys.tmpl)
- ✅ Displays list of user's GPG keys with details (ID, fingerprint, emails, capabilities)
- ✅ Shows expiration status with visual indicators
- ✅ Form to add new GPG keys
- ✅ Delete functionality with confirmation modal
- ✅ Added GPG Keys menu item to settings navbar
- ✅ Implemented route handlers (SettingsGPGKeys, SettingsGPGKeysPost, DeleteGPGKey)
- ✅ Added form validation (AddGPGKey)
- ✅ Registered routes in web.go
- ✅ Added i18n translations for English locale
**Commits:**
- `ec28d561`: Add GPG Keys Management UI in User Settings
- `96220972`: Add i18n translations for GPG Keys management
All acceptance criteria from the issue have been met!
Description
Implement a user-friendly interface for managing GPG keys in the user settings panel, similar to the SSH keys management page.
Implementation Plan
1. Create Template
templates/user/settings/gpgkeys.tmpltemplates/user/settings/sshkeys.tmpl2. Add Route Handlers
internal/route/user/setting.goGPGKeys()- Display GPG keys pageGPGKeysPost()- Handle adding new keyDeleteGPGKey()- Handle key deletion3. Update Navigation
templates/user/settings/navbar.tmpl4. Add Form Structures
internal/form/user.goAddGPGKeyFormstructAcceptance Criteria
Related
Part of GPG verification feature (issue #1)
Implementation completed! ✅
The GPG Keys Management UI has been successfully implemented with all requested features:
Completed:
Commits:
ec28d561: Add GPG Keys Management UI in User Settings96220972: Add i18n translations for GPG Keys managementAll acceptance criteria from the issue have been met!