This commit is contained in:
Max Goedjen 2024-01-04 18:16:59 -08:00
parent 116569d072
commit 6d87dbd9e4
No known key found for this signature in database
6 changed files with 103 additions and 40 deletions

View File

@ -45,18 +45,18 @@ struct Secretive: App {
}
.commands {
CommandGroup(after: CommandGroupPlacement.newItem) {
Button("New Secret") {
Button("app_menu_new_secret_button") {
showingCreation = true
}
.keyboardShortcut(KeyboardShortcut(KeyEquivalent("N"), modifiers: [.command, .shift]))
}
CommandGroup(replacing: .help) {
Button("Help") {
Button("app_menu_help_button") {
NSWorkspace.shared.open(Constants.helpURL)
}
}
CommandGroup(after: .help) {
Button("Setup Secretive") {
Button("app_menu_setup_button") {
showingSetup = true
}
}

View File

@ -10,12 +10,12 @@
"\n\n" : {
},
"" : {
"agent_not_running_notice_title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : ""
"value" : "Secret Agent Is Not Running"
}
}
}
@ -50,6 +50,46 @@
}
}
},
"agent_setup_notice_title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Setup Secretive"
}
}
}
},
"app_menu_help_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Help"
}
}
}
},
"app_menu_new_secret_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "New Secret"
}
}
}
},
"app_menu_setup_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Setup Secretive"
}
}
}
},
"app_not_in_applications_notice_detail_description" : {
"localizations" : {
"en" : {
@ -294,15 +334,6 @@
}
}
}
},
"Help" : {
},
"Ignore" : {
},
"New Secret" : {
},
"no_secure_storage_description" : {
"localizations" : {
@ -333,9 +364,6 @@
}
}
}
},
"Release Notes" : {
},
"rename_cancel_button" : {
"localizations" : {
@ -366,9 +394,6 @@
}
}
}
},
"Secret Agent Is Not Running" : {
},
"secret_detail_md5_fingerprint_label" : {
"localizations" : {
@ -429,12 +454,6 @@
}
}
}
},
"Secretive %@" : {
},
"Setup Secretive" : {
},
"setup_agent_activity_monitor_description" : {
"localizations" : {
@ -534,6 +553,16 @@
}
}
},
"setup_step_complete_symbol" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "✓"
}
}
}
},
"setup_third_party_faq_link" : {
"extractionState" : "manual",
"localizations" : {
@ -585,11 +614,45 @@
}
}
},
"Title" : {
"update_ignore_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ignore"
}
}
}
},
"Update" : {
"update_release_notes_title" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Release Notes"
}
}
}
},
"update_update_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Update"
}
}
}
},
"update_version_name_%@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Secretive %1$@"
}
}
}
}
},
"version" : "1.0"

View File

@ -121,9 +121,9 @@ extension ContentView {
}, label: {
Group {
if hasRunSetup && !agentStatusChecker.running {
Text("Secret Agent Is Not Running")
Text("agent_not_running_notice_title")
} else {
Text("Setup Secretive")
Text("agent_setup_notice_title")
}
}
.font(.headline)

View File

@ -122,9 +122,9 @@ struct CopyableView: View {
struct CopyableView_Previews: PreviewProvider {
static var previews: some View {
Group {
CopyableView(title: "Title", image: Image(systemName: "figure.wave"), text: "Hello world.")
CopyableView(title: "secret_detail_sha256_fingerprint_label", image: Image(systemName: "figure.wave"), text: "Hello world.")
.padding()
CopyableView(title: "Title", image: Image(systemName: "figure.wave"), text: "Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. ")
CopyableView(title: "secret_detail_sha256_fingerprint_label", image: Image(systemName: "figure.wave"), text: "Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. Long text. ")
.padding()
}
}

View File

@ -61,7 +61,7 @@ struct StepView: View {
Circle()
.foregroundColor(.green)
.frame(width: Constants.circleWidth, height: Constants.circleWidth)
Text("")
Text("setup_step_complete_symbol")
.foregroundColor(.white)
.bold()
} else {

View File

@ -9,20 +9,20 @@ struct UpdateDetailView<UpdaterType: Updater>: View {
var body: some View {
VStack {
Text("Secretive \(update.name)").font(.title)
GroupBox(label: Text("Release Notes")) {
Text("update_version_name_\(update.name)").font(.title)
GroupBox(label: Text("update_release_notes_title")) {
ScrollView {
attributedBody
}
}
HStack {
if !update.critical {
Button("Ignore") {
Button("update_ignore_button") {
updater.ignore(release: update)
}
Spacer()
}
Button("Update") {
Button("update_update_button") {
NSWorkspace.shared.open(update.html_url)
}
.keyboardShortcut(.defaultAction)
@ -34,7 +34,7 @@ struct UpdateDetailView<UpdaterType: Updater>: View {
}
var attributedBody: Text {
var text = Text("")
var text = Text(verbatim: "")
for line in update.body.split(whereSeparator: \.isNewline) {
let attributed: Text
let split = line.split(separator: " ")