refine i18n, fill in miss parts

fix resetTrust cant recover send button in UI
This commit is contained in:
2026-02-07 14:11:57 +08:00
parent 4b5d2b656b
commit 20a25e8c49
12 changed files with 140 additions and 38 deletions

View File

@@ -254,7 +254,7 @@ func (c *Config) GetWindowState() WindowState {
return c.WindowState
}
func (c *Config) AddTrustedPeer(peerID string, publicKey string) {
func (c *Config) AddTrust(peerID string, publicKey string) {
c.mu.Lock()
defer c.mu.Unlock()
if c.TrustedPeer == nil {
@@ -265,13 +265,13 @@ func (c *Config) AddTrustedPeer(peerID string, publicKey string) {
_ = c.save()
}
func (c *Config) GetTrustedPeer() map[string]string {
func (c *Config) GetTrusted() map[string]string {
c.mu.RLock()
defer c.mu.RUnlock()
return c.TrustedPeer
}
func (c *Config) RemoveTrustedPeer(peerID string) {
func (c *Config) RemoveTrust(peerID string) {
c.mu.Lock()
defer c.mu.Unlock()
delete(c.TrustedPeer, peerID)
@@ -279,7 +279,7 @@ func (c *Config) RemoveTrustedPeer(peerID string) {
_ = c.save()
}
func (c *Config) IsTrustedPeer(peerID string) bool {
func (c *Config) IsTrusted(peerID string) bool {
c.mu.RLock()
defer c.mu.RUnlock()
_, exists := c.TrustedPeer[peerID]