#2 Add GPG Keys Management UI in User Settings

Zamknięty
otworzone 3 miesięcy temu przez fszontagh · 1 komentarzy

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)

## 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)
Szontágh Ferenc skomentował 3 miesięcy temu
Właściciel

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!

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!
Zaloguj się, aby dołączyć do tej rozmowy.
Brak etykiety
gpg
ui
Brak kamienia milowego
Brak przypisania
1 uczestników
Ładowanie...
Anuluj
Zapisz
Nie ma jeszcze treści.