@@ -9,18 +9,19 @@ const (
99 selectDetachedSignatureFileInput = "select-detached-signature-file-input"
1010)
1111
12+ // DecryptAndVerifyModal is a modal to provide the information needed to decrypt/verify something
1213type DecryptAndVerifyModal struct {
1314 app.Compo
1415
15- Keys []GPGKey
16+ Keys []GPGKey // GPG keys to be available for decryption/verification
1617
1718 OnSubmit func (
1819 file []byte ,
1920 publicKeyID string ,
2021 privateKeyID string ,
2122 detachedSignature []byte ,
22- )
23- OnCancel func (dirty bool , clear chan struct {})
23+ ) // Handler to call to decrypt/verify
24+ OnCancel func (dirty bool , clear chan struct {}) // Handler to call when closing/cancelling the modal
2425
2526 fileContents []byte
2627
@@ -73,12 +74,12 @@ func (c *DecryptAndVerifyModal) Render() app.UI {
7374 Class ("pf-c-form__group" ).
7475 Body (
7576 & FileUpload {
76- ID : selectDecryptionFileInput ,
77- FileSelectionLabel : "Drag and drop a file or select one" ,
78- ClearLabel : "Clear" ,
79- TextEntryLabel : "Or enter text here" ,
80- TextEntryBlockedLabel : "File has been selected." ,
81- FileContents : c .fileContents ,
77+ ID : selectDecryptionFileInput ,
78+ FileSelectionLabel : "Drag and drop a file or select one" ,
79+ ClearLabel : "Clear" ,
80+ TextEntryInputPlaceholder : "Or enter text here" ,
81+ TextEntryInputBlockedLabel : "File has been selected." ,
82+ FileContents : c .fileContents ,
8283
8384 OnChange : func (fileContents []byte ) {
8485 c .fileContents = fileContents
@@ -282,12 +283,12 @@ func (c *DecryptAndVerifyModal) Render() app.UI {
282283 Class ("pf-c-check__body pf-u-w-100" ).
283284 Body (
284285 & FileUpload {
285- ID : selectDetachedSignatureFileInput ,
286- FileSelectionLabel : "Drag and drop a detached signature or select one" ,
287- ClearLabel : "Clear" ,
288- TextEntryLabel : "Or enter the detached signature's content here" ,
289- TextEntryBlockedLabel : "File has been selected." ,
290- FileContents : []byte (c .detachedSignature ),
286+ ID : selectDetachedSignatureFileInput ,
287+ FileSelectionLabel : "Drag and drop a detached signature or select one" ,
288+ ClearLabel : "Clear" ,
289+ TextEntryInputPlaceholder : "Or enter the detached signature's content here" ,
290+ TextEntryInputBlockedLabel : "File has been selected." ,
291+ FileContents : []byte (c .detachedSignature ),
291292
292293 OnChange : func (fileContents []byte ) {
293294 c .detachedSignature = fileContents
0 commit comments