Skip to content

Commit 49d70a3

Browse files
authored
Merge pull request #12 from lucor/release/0.22.2
Release 0.22.2
2 parents 67dbf53 + 091cb79 commit 49d70a3

6 files changed

Lines changed: 36 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog - Paw
22

3+
## 0.22.2 - 17 February 2024
4+
5+
- sshagent: fix SignWithFlags implementation
6+
- ui: update website info into about view
7+
- ui: update SSH key filter label
8+
9+
- deps remove:
10+
- golang.org/x/text
11+
312
## 0.22.1 - 15 February 2024
413

514
- ui: detail view could not show multiline label correctly

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ require (
1111
golang.org/x/image v0.15.0
1212
golang.org/x/sync v0.6.0
1313
golang.org/x/term v0.16.0
14-
golang.org/x/text v0.14.0
1514
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
1615
)
1716

@@ -40,6 +39,7 @@ require (
4039
golang.org/x/mobile v0.0.0-20230531173138-3c911d8e3eda // indirect
4140
golang.org/x/net v0.17.0 // indirect
4241
golang.org/x/sys v0.16.0 // indirect
42+
golang.org/x/text v0.14.0 // indirect
4343
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
4444
gopkg.in/yaml.v3 v3.0.1 // indirect
4545
honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2 // indirect

internal/agent/agent.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ func (a *Agent) Unlock(passphrase []byte) error {
122122
}
123123

124124
func (a *Agent) SignWithFlags(key ssh.PublicKey, data []byte, flags sshagent.SignatureFlags) (*ssh.Signature, error) {
125-
return nil, ErrOperationUnsupported
125+
if v, ok := a.sshagent.(sshagent.ExtendedAgent); ok {
126+
return v.SignWithFlags(key, data, flags)
127+
}
128+
return nil, sshagent.ErrExtensionUnsupported
126129
}
127130

128131
func (a *Agent) Extension(extensionType string, contents []byte) ([]byte, error) {

internal/paw/item.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@ const (
2525
SSHKeyItemType
2626
)
2727

28+
// Label returns the item type label used in the UI
29+
func (it ItemType) Label() string {
30+
switch it {
31+
case MetadataItemType:
32+
return "Metadata"
33+
case NoteItemType:
34+
return "Note"
35+
case PasswordItemType:
36+
return "Password"
37+
case LoginItemType:
38+
return "Login"
39+
case SSHKeyItemType:
40+
return "SSH key"
41+
}
42+
return "Invalid item type"
43+
}
44+
45+
// String returns the item type string representation
2846
func (it ItemType) String() string {
2947
switch it {
3048
case MetadataItemType:
@@ -41,6 +59,7 @@ func (it ItemType) String() string {
4159
return "invalid"
4260
}
4361

62+
// ItemTypeFromString returns the item type from a string
4463
func ItemTypeFromString(v string) (ItemType, error) {
4564
var itemType ItemType
4665
var err error

internal/ui/menu.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ func (a *app) makeMainMenu() *fyne.MainMenu {
5555
}
5656

5757
func (a *app) about() {
58-
u, _ := url.Parse("https://lucor.dev/paw")
58+
u, _ := url.Parse("https://paw.pm")
5959
l := widget.NewLabel("Paw - " + paw.Version())
6060
l.Alignment = fyne.TextAlignCenter
61-
link := widget.NewHyperlink("https://lucor.dev/paw", u)
61+
link := widget.NewHyperlink("https://paw.pm", u)
6262
link.Alignment = fyne.TextAlignCenter
6363
co := container.NewCenter(
6464
container.NewVBox(

internal/ui/vault.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import (
1515
"fyne.io/fyne/v2/dialog"
1616
"fyne.io/fyne/v2/theme"
1717
"fyne.io/fyne/v2/widget"
18-
"golang.org/x/text/cases"
19-
"golang.org/x/text/language"
2018
"lucor.dev/paw/internal/icon"
2119
"lucor.dev/paw/internal/paw"
2220
)
@@ -154,11 +152,10 @@ func (a *app) makeCurrentVaultView() fyne.CanvasObject {
154152
// filter entries
155153
itemTypeMap := map[string]paw.ItemType{}
156154
options := []string{fmt.Sprintf("All items (%d)", vault.Size())}
157-
ca := cases.Title(language.Und)
158155
for _, item := range a.makeEmptyItems() {
159156
i := item
160157
t := i.GetMetadata().Type
161-
name := fmt.Sprintf("%s (%d)", ca.String(t.String()), vault.SizeByType(t))
158+
name := fmt.Sprintf("%s (%d)", t.Label(), vault.SizeByType(t))
162159
options = append(options, name)
163160
itemTypeMap[name] = t
164161
}

0 commit comments

Comments
 (0)