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

@@ -43,7 +43,7 @@ struct EventActionBar: View {
HStack {
if damus_state.keypair.privkey != nil {
HStack(spacing: 4) {
EventActionButton(img: "bubble.left", col: bar.replied ? DamusColors.purple : Color.gray) {
EventActionButton(img: "bubble2", col: bar.replied ? DamusColors.purple : Color.gray) {
notify(.compose, PostAction.replying_to(event))
}
.accessibilityLabel(NSLocalizedString("Reply", comment: "Accessibility label for reply button"))
@@ -55,7 +55,7 @@ struct EventActionBar: View {
Spacer()
HStack(spacing: 4) {
EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) {
EventActionButton(img: "repost", col: bar.boosted ? Color.green : nil) {
if bar.boosted {
notify(.delete, bar.our_boost)
} else {
@@ -92,7 +92,7 @@ struct EventActionBar: View {
}
Spacer()
EventActionButton(img: "square.and.arrow.up", col: Color.gray) {
EventActionButton(img: "upload", col: Color.gray) {
show_share_action = true
}
.accessibilityLabel(NSLocalizedString("Share", comment: "Button to share a post"))
@@ -161,9 +161,12 @@ struct EventActionBar: View {
func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) -> some View {
Button(action: action) {
Image(systemName: img)
Image(img)
.resizable()
.foregroundColor(col == nil ? Color.gray : col!)
.font(.footnote.weight(.medium))
.aspectRatio(contentMode: .fit)
.frame(width: 15, height: 15)
}
}
@@ -188,11 +191,16 @@ struct LikeButton: View {
}) {
if liked {
LINEAR_GRADIENT
.mask(Image("shaka-full")
.mask(Image("shaka.fill")
.resizable()
).frame(width: 14, height: 14)
.aspectRatio(contentMode: .fit)
)
.frame(width: 15, height: 15)
} else {
Image("shaka-line")
Image("shaka")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 15, height: 15)
.foregroundColor(.gray)
}
}

View File

@@ -28,7 +28,7 @@ struct RepostAction: View {
damus_state.postbox.send(boost)
} label: {
Label(NSLocalizedString("Repost", comment: "Button to repost a note"), systemImage: "arrow.2.squarepath")
Label(NSLocalizedString("Repost", comment: "Button to repost a note"), image: "repost")
.frame(maxWidth: .infinity, minHeight: 50, maxHeight: 50, alignment: .leading)
}

View File

@@ -41,7 +41,7 @@ struct ShareAction: View {
UIPasteboard.general.string = "https://damus.io/" + (bech32_note_id(event.id) ?? event.id)
}
let bookmarkImg = isBookmarked ? "bookmark.slash" : "bookmark"
let bookmarkImg = isBookmarked ? "bookmark.fill" : "bookmark"
let bookmarkTxt = isBookmarked ? NSLocalizedString("Remove Bookmark", comment: "Button text to remove bookmark from a note.") : NSLocalizedString("Add Bookmark", comment: "Button text to add bookmark to a note.")
ShareActionButton(img: bookmarkImg, text: bookmarkTxt) {
dismiss()
@@ -54,7 +54,7 @@ struct ShareAction: View {
NotificationCenter.default.post(name: .broadcast_event, object: event)
}
ShareActionButton(img: "square.and.arrow.up", text: NSLocalizedString("Share Via...", comment: "Button to present iOS share sheet")) {
ShareActionButton(img: "upload", text: NSLocalizedString("Share Via...", comment: "Button to present iOS share sheet")) {
show_share = true
dismiss()
}

View File

@@ -27,7 +27,7 @@ struct ShareActionButton: View {
var body: some View {
Button(action: action) {
VStack() {
Image(systemName: img)
Image(img)
.foregroundColor(col)
.font(.system(size: 23, weight: .bold))
.overlay {
@@ -48,6 +48,6 @@ struct ShareActionButton: View {
struct ShareActionButton_Previews: PreviewProvider {
static var previews: some View {
ShareActionButton(img: "figure.flexibility", text: "Stretch", action: {})
ShareActionButton(img: "link", text: "Stretch", action: {})
}
}