mirror of
				https://github.com/maxgoedjen/secretive.git
				synced 2025-11-04 09:20:56 +00:00 
			
		
		
		
	Merge branch 'main' into maxgoedjen-patch-1
This commit is contained in:
		
						commit
						6d9b2f9744
					
				
							
								
								
									
										2
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							@ -11,7 +11,7 @@ on:
 | 
			
		||||
jobs:
 | 
			
		||||
  analyze:
 | 
			
		||||
    name: Analyze (${{ matrix.language }})
 | 
			
		||||
    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
 | 
			
		||||
    runs-on: ${{ (matrix.language == 'swift' && 'macos-26') || 'ubuntu-latest' }}
 | 
			
		||||
    permissions:
 | 
			
		||||
      security-events: write
 | 
			
		||||
      packages: read
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							@ -7,7 +7,7 @@ on:
 | 
			
		||||
  
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: macos-15
 | 
			
		||||
    runs-on: macos-26
 | 
			
		||||
    permissions:
 | 
			
		||||
      id-token: write
 | 
			
		||||
      contents: write
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -8,7 +8,7 @@ jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    permissions:
 | 
			
		||||
        contents: read
 | 
			
		||||
    runs-on: macos-15
 | 
			
		||||
    runs-on: macos-26
 | 
			
		||||
    timeout-minutes: 10
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v5
 | 
			
		||||
@ -32,7 +32,7 @@ jobs:
 | 
			
		||||
      id-token: write
 | 
			
		||||
      contents: write
 | 
			
		||||
      attestations: write
 | 
			
		||||
    runs-on: macos-15
 | 
			
		||||
    runs-on: macos-26
 | 
			
		||||
    timeout-minutes: 10
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							@ -5,7 +5,7 @@ jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    permissions:
 | 
			
		||||
        contents: read
 | 
			
		||||
    runs-on: macos-15
 | 
			
		||||
    runs-on: macos-26
 | 
			
		||||
    timeout-minutes: 10
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v5
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -5,16 +5,16 @@ struct EditSecretView<StoreType: SecretStoreModifiable>: View {
 | 
			
		||||
 | 
			
		||||
    let store: StoreType
 | 
			
		||||
    let secret: StoreType.SecretType
 | 
			
		||||
    let dismissalBlock: (_ renamed: Bool) -> ()
 | 
			
		||||
 | 
			
		||||
    @State private var name: String
 | 
			
		||||
    @State private var publicKeyAttribution: String
 | 
			
		||||
    @State var errorText: String?
 | 
			
		||||
 | 
			
		||||
    init(store: StoreType, secret: StoreType.SecretType, dismissalBlock: @escaping (Bool) -> ()) {
 | 
			
		||||
    @Environment(\.dismiss) var dismiss
 | 
			
		||||
 | 
			
		||||
    init(store: StoreType, secret: StoreType.SecretType) {
 | 
			
		||||
        self.store = store
 | 
			
		||||
        self.secret = secret
 | 
			
		||||
        self.dismissalBlock = dismissalBlock
 | 
			
		||||
        name = secret.name
 | 
			
		||||
        publicKeyAttribution = secret.publicKeyAttribution ?? ""
 | 
			
		||||
    }
 | 
			
		||||
@ -39,7 +39,7 @@ struct EditSecretView<StoreType: SecretStoreModifiable>: View {
 | 
			
		||||
            }
 | 
			
		||||
            HStack {
 | 
			
		||||
                Button(.editCancelButton) {
 | 
			
		||||
                    dismissalBlock(false)
 | 
			
		||||
                    dismiss()
 | 
			
		||||
                }
 | 
			
		||||
                .keyboardShortcut(.cancelAction)
 | 
			
		||||
                Button(.editSaveButton, action: rename)
 | 
			
		||||
@ -58,7 +58,7 @@ struct EditSecretView<StoreType: SecretStoreModifiable>: View {
 | 
			
		||||
        Task {
 | 
			
		||||
            do {
 | 
			
		||||
                try await store.update(secret: secret, name: name, attributes: attributes)
 | 
			
		||||
                dismissalBlock(true)
 | 
			
		||||
                dismiss()
 | 
			
		||||
            } catch {
 | 
			
		||||
                errorText = error.localizedDescription
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -41,15 +41,12 @@ struct SecretListItemView: View {
 | 
			
		||||
                deletedSecret(secret)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .sheet(isPresented: $isRenaming) {
 | 
			
		||||
            if let modifiable = store as? AnySecretStoreModifiable {
 | 
			
		||||
                EditSecretView(store: modifiable, secret: secret) { renamed in
 | 
			
		||||
                    isRenaming = false
 | 
			
		||||
                    if renamed {
 | 
			
		||||
        .sheet(isPresented: $isRenaming, onDismiss: {
 | 
			
		||||
            renamedSecret(secret)
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        }, content: {
 | 
			
		||||
            if let modifiable = store as? AnySecretStoreModifiable {
 | 
			
		||||
                EditSecretView(store: modifiable, secret: secret)
 | 
			
		||||
            }
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -12,9 +12,9 @@ struct StoreListView: View {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private func secretRenamed(secret: AnySecret) {
 | 
			
		||||
        // Toggle so name updates in list.
 | 
			
		||||
        // Pull new version from store, so we get all updated attributes
 | 
			
		||||
        activeSecret = nil
 | 
			
		||||
        activeSecret = secret
 | 
			
		||||
        activeSecret = storeList.allSecrets.first(where: { $0.id == secret.id })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    var body: some View {
 | 
			
		||||
@ -28,7 +28,7 @@ struct StoreListView: View {
 | 
			
		||||
                                    store: store,
 | 
			
		||||
                                    secret: secret,
 | 
			
		||||
                                    deletedSecret: secretDeleted,
 | 
			
		||||
                                    renamedSecret: secretRenamed
 | 
			
		||||
                                    renamedSecret: secretRenamed,
 | 
			
		||||
                                )
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user