mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-27 20:36:29 -04:00
Adjust input spacing in many areas for a more consistent look
This commit is contained in:
@@ -22,7 +22,7 @@ This release adds password age-tracking support, a new interactive copy menu, an
|
|||||||
- gopkg.in/ini.v1
|
- gopkg.in/ini.v1
|
||||||
- Bumped
|
- Bumped
|
||||||
- Go: v1.25.4 => 1.25.5
|
- Go: v1.25.4 => 1.25.5
|
||||||
- github.com/rwinkhart/go-boilerplate: v0.1.0 => v0.1.1
|
- github.com/rwinkhart/go-boilerplate: v0.1.0 => v0.2.2
|
||||||
- github.com/rwinkhart/libmutton: v0.4.4 => v0.5.0
|
- github.com/rwinkhart/libmutton: v0.4.4 => v0.5.0
|
||||||
- golang.org/x/term: v0.37.0 => v0.38.0
|
- golang.org/x/term: v0.37.0 => v0.38.0
|
||||||
- golang.org/x/sys: v0.38.0 => v0.40.0
|
- golang.org/x/sys: v0.38.0 => v0.40.0
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ go 1.25.5
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/charmbracelet/glamour v0.7.0
|
github.com/charmbracelet/glamour v0.7.0
|
||||||
github.com/rwinkhart/go-boilerplate v0.1.1
|
github.com/rwinkhart/go-boilerplate v0.2.2
|
||||||
github.com/rwinkhart/libmutton v0.4.3-0.20260109022300-a54d15e33111
|
github.com/rwinkhart/libmutton v0.4.3-0.20260109040506-4467a8c7421b
|
||||||
golang.org/x/term v0.38.0
|
golang.org/x/term v0.38.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -42,14 +42,14 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
|||||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/rwinkhart/glamour-temp-MUTN v0.7.2 h1:/CBexwkGdL8HuZjO7M0zzjGHaHCr9/r4XTOtUJa+pPE=
|
github.com/rwinkhart/glamour-temp-MUTN v0.7.2 h1:/CBexwkGdL8HuZjO7M0zzjGHaHCr9/r4XTOtUJa+pPE=
|
||||||
github.com/rwinkhart/glamour-temp-MUTN v0.7.2/go.mod h1:DN/eJaNQ5h7dgxzfmWFo7By+b82CKEUdNaY6z4R4v3c=
|
github.com/rwinkhart/glamour-temp-MUTN v0.7.2/go.mod h1:DN/eJaNQ5h7dgxzfmWFo7By+b82CKEUdNaY6z4R4v3c=
|
||||||
github.com/rwinkhart/go-boilerplate v0.1.1 h1:C+yyscGWeqvNpR91iw0i91zqX0LcxnCr1VOyT7iM4JY=
|
github.com/rwinkhart/go-boilerplate v0.2.2 h1:SVHTAQU+HWFivtUnDBcfrgClJV5ZmHyFS7/uERh7NKU=
|
||||||
github.com/rwinkhart/go-boilerplate v0.1.1/go.mod h1:/NVRKGslU20E5xU5YOgXzWxA6aa94BMtv5MtHRTb5Ek=
|
github.com/rwinkhart/go-boilerplate v0.2.2/go.mod h1:/NVRKGslU20E5xU5YOgXzWxA6aa94BMtv5MtHRTb5Ek=
|
||||||
github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNMXHodT0=
|
github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNMXHodT0=
|
||||||
github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
|
github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
|
||||||
github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg=
|
github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg=
|
||||||
github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
|
github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
|
||||||
github.com/rwinkhart/libmutton v0.4.3-0.20260109022300-a54d15e33111 h1:nxQHhtdRVIUhRAc/5oYTli30tive65c8N7u75dENVWE=
|
github.com/rwinkhart/libmutton v0.4.3-0.20260109040506-4467a8c7421b h1:ZHOGUddwoUEGC+7eUl+GvOde3S8UjQqddKv2TERTk1k=
|
||||||
github.com/rwinkhart/libmutton v0.4.3-0.20260109022300-a54d15e33111/go.mod h1:qInUv19lzX1adFNI6Ih/IEVy+pktSTh/yA7cRTdVPH8=
|
github.com/rwinkhart/libmutton v0.4.3-0.20260109040506-4467a8c7421b/go.mod h1:qInUv19lzX1adFNI6Ih/IEVy+pktSTh/yA7cRTdVPH8=
|
||||||
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
|
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
|
||||||
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
|
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
|
||||||
github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0=
|
github.com/rwinkhart/rcw v0.2.4 h1:FrRSsl+ui1WLmDwqjLSROtFPKqSeGLEfF2SPENt4qP0=
|
||||||
|
|||||||
@@ -48,5 +48,4 @@ func AddEntry(realPath string, entryType uint8) {
|
|||||||
} else {
|
} else {
|
||||||
writeEntryCLI(realPath, decSlice, false, "")
|
writeEntryCLI(realPath, decSlice, false, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-9
@@ -17,9 +17,10 @@ import (
|
|||||||
"github.com/rwinkhart/libmutton/syncclient"
|
"github.com/rwinkhart/libmutton/syncclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CopyMenu decrypts an entry and allows the user to
|
// CopyMenu decrypts an entry and allows the user to interactively copy
|
||||||
// interactively copy fields without having to re-decrypt each time.
|
// fields without having to re-decrypt each time. decSlice can be left nil
|
||||||
// decSlice can be left nil to decrypt the entry specified by vanityPath.
|
// to decrypt the entry specified by vanityPath. If the entry was provided
|
||||||
|
// decrypted, CopyMenu assumes it was edited and triggers a sync.
|
||||||
func CopyMenu(vanityPath string, decSlice []string, oldPassword string) {
|
func CopyMenu(vanityPath string, decSlice []string, oldPassword string) {
|
||||||
realPath := global.GetRealPath(vanityPath)
|
realPath := global.GetRealPath(vanityPath)
|
||||||
var err error
|
var err error
|
||||||
@@ -30,7 +31,7 @@ func CopyMenu(vanityPath string, decSlice []string, oldPassword string) {
|
|||||||
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption)
|
other.PrintError("Failed to decrypt entry: "+err.Error(), global.ErrorDecryption)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fmt.Print("\n\n")
|
fmt.Print("\n")
|
||||||
_, err := syncclient.RunJob()
|
_, err := syncclient.RunJob()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
other.PrintError("Failed to sync on copy menu entry: "+err.Error(), global.ErrorSyncProcess)
|
other.PrintError("Failed to sync on copy menu entry: "+err.Error(), global.ErrorSyncProcess)
|
||||||
@@ -50,11 +51,13 @@ func CopyMenu(vanityPath string, decSlice []string, oldPassword string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no copyable lines are populated, render notes and exit
|
// if notes are included, preview them
|
||||||
if len(fieldOptions) < 1 {
|
if len(decSlice) > 4 {
|
||||||
EntryReader(vanityPath, decSlice, true)
|
EntryReader(vanityPath, append([]string{"", "", "", ""}, decSlice[4:]...), true)
|
||||||
fmt.Printf("\r%sNo copyable fields present, exiting copy menu...%s\n", back.AnsiWarning, back.AnsiReset)
|
if len(fieldOptions) < 1 { // if notes are the only thing included, exit
|
||||||
os.Exit(0)
|
fmt.Printf("\r%sNo copyable fields present, exiting copy menu...%s\n", back.AnsiWarning, back.AnsiReset)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up signal handling for ctrl+c to clear clipboard
|
// set up signal handling for ctrl+c to clear clipboard
|
||||||
|
|||||||
Reference in New Issue
Block a user