Custom iconography added for other areas of the app.

Changelog-Added: Custom iconography added for other areas of the app.
This commit is contained in:
Ben Weeks
2023-05-27 04:32:06 +01:00
committed by William Casarin
parent d12281fcc5
commit 973e9fe714
49 changed files with 167 additions and 565 deletions

View File

@@ -60,25 +60,25 @@ struct MenuItems: View {
Button {
UIPasteboard.general.string = event.get_content(keypair.privkey)
} label: {
Label(NSLocalizedString("Copy text", comment: "Context menu option for copying the text from an note."), systemImage: "doc.on.doc")
Label(NSLocalizedString("Copy text", comment: "Context menu option for copying the text from an note."), image: "copy2")
}
Button {
UIPasteboard.general.string = bech32_pubkey(target_pubkey)
} label: {
Label(NSLocalizedString("Copy user public key", comment: "Context menu option for copying the ID of the user who created the note."), systemImage: "person")
Label(NSLocalizedString("Copy user public key", comment: "Context menu option for copying the ID of the user who created the note."), image: "user")
}
Button {
UIPasteboard.general.string = bech32_note_id(event.id) ?? event.id
} label: {
Label(NSLocalizedString("Copy note ID", comment: "Context menu option for copying the ID of the note."), systemImage: "note.text")
Label(NSLocalizedString("Copy note ID", comment: "Context menu option for copying the ID of the note."), image: "note-book")
}
Button {
UIPasteboard.general.string = event_to_json(ev: event)
} label: {
Label(NSLocalizedString("Copy note JSON", comment: "Context menu option for copying the JSON text from the note."), systemImage: "square.on.square")
Label(NSLocalizedString("Copy note JSON", comment: "Context menu option for copying the JSON text from the note."), image: "code.on.square")
}
Button {
@@ -88,7 +88,7 @@ struct MenuItems: View {
let imageName = isBookmarked ? "bookmark.fill" : "bookmark"
let removeBookmarkString = NSLocalizedString("Remove bookmark", comment: "Context menu option for removing a note bookmark.")
let addBookmarkString = NSLocalizedString("Add bookmark", comment: "Context menu option for adding a note bookmark.")
Label(isBookmarked ? removeBookmarkString : addBookmarkString, systemImage: imageName)
Label(isBookmarked ? removeBookmarkString : addBookmarkString, image: imageName)
}
if event.known_kind != .dm {
@@ -97,17 +97,17 @@ struct MenuItems: View {
let muted = self.muted_threads.isMutedThread(event, privkey: self.keypair.privkey)
isMutedThread = muted
} label: {
let imageName = isMutedThread ? "speaker" : "speaker.slash"
let imageName = isMutedThread ? "mute" : "mute"
let unmuteThreadString = NSLocalizedString("Unmute conversation", comment: "Context menu option for unmuting a conversation.")
let muteThreadString = NSLocalizedString("Mute conversation", comment: "Context menu option for muting a conversation.")
Label(isMutedThread ? unmuteThreadString : muteThreadString, systemImage: imageName)
Label(isMutedThread ? unmuteThreadString : muteThreadString, image: imageName)
}
}
Button {
NotificationCenter.default.post(name: .broadcast_event, object: event)
} label: {
Label(NSLocalizedString("Broadcast", comment: "Context menu option for broadcasting the user's note to all of the user's connected relay servers."), systemImage: "globe")
Label(NSLocalizedString("Broadcast", comment: "Context menu option for broadcasting the user's note to all of the user's connected relay servers."), image: "globe")
}
// Only allow reporting if logged in with private key and the currently viewed profile is not the logged in profile.
@@ -116,13 +116,13 @@ struct MenuItems: View {
let target: ReportTarget = .note(ReportNoteTarget(pubkey: target_pubkey, note_id: event.id))
notify(.report, target)
} label: {
Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), systemImage: "exclamationmark.bubble")
Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), image: "raising-hand")
}
Button(role: .destructive) {
notify(.mute, target_pubkey)
} label: {
Label(NSLocalizedString("Mute user", comment: "Context menu option for muting users."), systemImage: "exclamationmark.octagon")
Label(NSLocalizedString("Mute user", comment: "Context menu option for muting users."), image: "mute")
}
}
}

View File

@@ -19,7 +19,7 @@ struct ZapEvent: View {
.padding([.top], 2)
if zap.is_private {
Image(systemName: "lock.fill")
Image("lock")
.foregroundColor(DamusColors.green)
.help(NSLocalizedString("Only you can see this message and who sent it.", comment: "Help text on green lock icon that explains that only the current user can see the message of a zap event and who sent the zap."))
}