#2 Add GPG Keys Management UI in User Settings

Đã đóng
%! (template.HTML=3 tháng trước cách đây)đang mở bởi fszontagh · 1 ý kiến

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 đã nhận xét 3 tháng trước cách đây
Chủ sở hữu

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!
Đăng nhập để tham gia bình luận.
Không có nhãn
gpg
ui
Không có Milestone
Không có người được phân công
1 tham gia
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.