Skip to content

Commit

Permalink
~ Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
buresdv committed Nov 2, 2023
1 parent 940d5a2 commit f9b3522
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Klic/App State.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class AppState: ObservableObject
{
@Published var isShowingSSHKeyAdditionSheet: Bool = false

@Published var isCreatingKey: Bool = false

@Published var isLoadingKeys: Bool = true

@Published var navigationSelection: UUID?
Expand Down
35 changes: 28 additions & 7 deletions Klic/Views/Create Key/Create Key Sheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,54 @@ import SwiftUI

struct CreateKeySheet: View {

@EnvironmentObject var appState: AppState
@EnvironmentObject var keyTracker: KeyTracker

@State private var passphrase: String = ""
@State private var keyName: String = ""

var body: some View {
VStack(alignment: .leading, spacing: 10)
{
Form {
TextField("Name:", text: $keyName)
TextField("Passphrase:", text: $passphrase)
LabeledContent {
TextField("", text: $keyName)
} label: {
Text("Name:")
}

LabeledContent {
TextField("", text: $passphrase)
} label: {
VStack(alignment: .trailing, spacing: 3, content: {
Text("Passphrase:")
Text("Optional")
.font(.subheadline)
.foregroundColor(.gray)
})
}
}

HStack
{
DismissSheetButton()
.disabled(appState.isCreatingKey)

Spacer()

if appState.isCreatingKey
{
ProgressView()
.frame(width: 10, height: 10)
.scaleEffect(0.5)
}

CreateKeyButton(labelStyle: .textOnly, keyName: keyName, passphrase: passphrase)
.keyboardShortcut(.defaultAction)
.disabled(keyName.isEmpty)
.disabled(keyName.isEmpty || keyTracker.keys.contains(where: { $0.name == keyName }))
}
}
.padding()
.frame(width: 250)
}
}

#Preview {
CreateKeySheet()
}
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
![Icon](https://i.imgur.com/Vo86TjT.png)

# Kei - The Simple SSH Key Manager

Key is a FOSS manager for your SSH keys.
Key is a simple, FOSS manager for your SSH keys.

## Why Kei?
Kei is the simplest, most performant SSH key manager. It's not designed to be full of features, and instead does one thing only, and does it well: showing your SSH keys and allowing you to create and delete them quickly.

## Features
- Seeing your existing SSH key
- Quickly adding new SSH keys
- Convenience features, such as:
- Copying public and private keys with simple buttons
- Full keyboard control
- Full keyboard control

## Screenshots
### Key Detail
![SSH key detail](https://i.imgur.com/kTITKjh.jpg)

### Key Addition Sheet
![SSH key addition sheet](https://i.imgur.com/R8LwwrV.jpg)

0 comments on commit f9b3522

Please sign in to comment.