From 21de663f1d51a75aa96e79fc68d34d6343c9b53f Mon Sep 17 00:00:00 2001 From: Eric Andrews Date: Thu, 21 Sep 2023 19:52:20 -0400 Subject: [PATCH] refactored all names --- .../xcshareddata/swiftpm/Package.resolved | 77 +++++++++ Mlem/API/Models/ScoringOperation.swift | 18 ++ Mlem/Enums/FeedType.swift | 12 +- Mlem/Enums/Settings/PostSize.swift | 12 +- Mlem/Enums/Settings/PostSortType.swift | 28 +-- Mlem/Extensions/NSFW Overlay.swift | 2 +- Mlem/Icons.swift | 161 +++++++++--------- .../Views/Shared/Accounts/Accounts Page.swift | 2 +- .../Components/Instance Summary.swift | 4 +- Mlem/Views/Shared/Cached Image.swift | 2 +- .../Shared/Comments/Comment Item Logic.swift | 4 +- .../Comments/Components/CommentBodyView.swift | 6 +- .../Components/DownvoteButtonView.swift | 2 +- .../Components/DownvoteCounterView.swift | 2 +- .../Components/Components/Ellipsis Menu.swift | 2 +- .../Components/Components/InfoStackView.swift | 10 +- .../Components/ReplyButtonView.swift | 2 +- .../Components/SaveButtonView.swift | 2 +- .../Components/ShareButtonView.swift | 2 +- .../Components/UpvoteButtonView.swift | 2 +- .../Components/UpvoteCounterView.swift | 2 +- .../Composer/PostDetailEditorView.swift | 2 +- .../Shared/Composer/ResponseEditorView.swift | 2 +- Mlem/Views/Shared/Links/AvatarView.swift | 40 +---- .../Shared/Posts/ExpandedPostLogic.swift | 4 +- Mlem/Views/Shared/Posts/Feed Post.swift | 18 +- .../Shared/Posts/Post Sizes/Large Post.swift | 2 +- .../Community List/Community List View.swift | 43 +++-- .../Tabs/Feeds/Components/PostSortMenu.swift | 2 +- Mlem/Views/Tabs/Feeds/Feed View Logic.swift | 14 +- Mlem/Views/Tabs/Feeds/Feed View.swift | 4 +- .../Feed/InteractionSwipeAndMenuHelpers.swift | 46 ++--- .../Feed/Item Types/Inbox Mention View.swift | 6 +- .../Feed/Item Types/Inbox Reply View.swift | 6 +- Mlem/Views/Tabs/Inbox/Inbox View Logic.swift | 4 +- Mlem/Views/Tabs/Profile/User View.swift | 2 +- .../AccessibilitySettingsView.swift | 4 +- .../Comment/CommentSettingsView.swift | 8 +- .../Community/CommunitySettingsView.swift | 4 +- .../Appearance/Post/PostSettingsView.swift | 10 +- .../Appearance/Shared/LayoutWidgetView.swift | 18 +- .../Appearance/User/UserSettingsView.swift | 2 +- .../Views/General/GeneralSettingsView.swift | 6 +- 43 files changed, 328 insertions(+), 273 deletions(-) create mode 100644 Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..539397da1 --- /dev/null +++ b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,77 @@ +{ + "pins" : [ + { + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "ec62f32d21584214a4b27c8cee2b2ad70ab2c38a", + "version" : "0.11.0" + } + }, + { + "identity" : "keychainaccess", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kishikawakatsumi/KeychainAccess.git", + "state" : { + "branch" : "master", + "revision" : "ecb18d8ce4d88277cc4fb103973352d91e18c535" + } + }, + { + "identity" : "nuke", + "kind" : "remoteSourceControl", + "location" : "https://github.com/kean/Nuke", + "state" : { + "revision" : "989586f86b683680f7bd5765d6a5683edbea0c1b", + "version" : "12.1.4" + } + }, + { + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "0fbaebfc013715dab44d715a4d350ba37f297e4d", + "version" : "0.4.0" + } + }, + { + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "479750bd98fac2e813fffcf2af0728b5b0085795", + "version" : "0.1.1" + } + }, + { + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "16fd42ae04c6e7f74a6a86395d04722c641cccee", + "version" : "0.6.0" + } + }, + { + "identity" : "swift-markdown-ui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gonzalezreal/swift-markdown-ui.git", + "state" : { + "revision" : "12b351a75201a8124c2f2e1f9fc6ef5cd812c0b9", + "version" : "2.1.0" + } + }, + { + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "50843cbb8551db836adec2290bb4bc6bac5c1865", + "version" : "0.9.0" + } + } + ], + "version" : 2 +} diff --git a/Mlem/API/Models/ScoringOperation.swift b/Mlem/API/Models/ScoringOperation.swift index 5753f1c46..c14f652f9 100644 --- a/Mlem/API/Models/ScoringOperation.swift +++ b/Mlem/API/Models/ScoringOperation.swift @@ -13,3 +13,21 @@ enum ScoringOperation: Int, Decodable { case downvote = -1 case resetVote = 0 } + +extension ScoringOperation: AssociatedIcon { + var iconName: String { + switch self { + case .upvote: return Icons.upvoteSquare + case .downvote: return Icons.downvoteSquare + case .resetVote: return Icons.resetVoteSquare + } + } + + var iconNameFill: String { + switch self { + case .upvote: return Icons.upvoteSquareFill + case .downvote: return Icons.downvoteSquareFill + case .resetVote: return Icons.resetVoteSquareFill + } + } +} diff --git a/Mlem/Enums/FeedType.swift b/Mlem/Enums/FeedType.swift index 5f817d0a2..ef8e5dc67 100644 --- a/Mlem/Enums/FeedType.swift +++ b/Mlem/Enums/FeedType.swift @@ -26,17 +26,17 @@ enum FeedType: String, Encodable, SettingsOptions { extension FeedType: AssociatedIcon { var iconName: String { switch self { - case .all: return Icons.federatedFeedSymbolName - case .local: return Icons.localFeedSymbolName - case .subscribed: return Icons.subscribedFeedSymbolName + case .all: return Icons.federatedFeed + case .local: return Icons.localFeed + case .subscribed: return Icons.subscribedFeed } } var iconNameFill: String { switch self { - case .all: return Icons.federatedFeedSymbolName - case .local: return Icons.localFeedSymbolNameFill - case .subscribed: return Icons.subscribedFeedSymbolNameFill + case .all: return Icons.federatedFeed + case .local: return Icons.localFeedFill + case .subscribed: return Icons.subscribedFeedFill } } diff --git a/Mlem/Enums/Settings/PostSize.swift b/Mlem/Enums/Settings/PostSize.swift index 1fe048981..fef6d99be 100644 --- a/Mlem/Enums/Settings/PostSize.swift +++ b/Mlem/Enums/Settings/PostSize.swift @@ -22,17 +22,17 @@ extension PostSize: SettingsOptions { extension PostSize: AssociatedIcon { var iconName: String { switch self { - case .compact: return Icons.compactSymbolName - case .headline: return Icons.headlineSymbolName - case .large: return Icons.largeSymbolName + case .compact: return Icons.compactPost + case .headline: return Icons.headlinePost + case .large: return Icons.largePost } } var iconNameFill: String { switch self { - case .compact: return Icons.compactSymbolNameFill - case .headline: return Icons.headlineSymbolNameFill - case .large: return Icons.largeSymbolNameFill + case .compact: return Icons.compactPostFill + case .headline: return Icons.headlinePostFill + case .large: return Icons.largePostFill } } } diff --git a/Mlem/Enums/Settings/PostSortType.swift b/Mlem/Enums/Settings/PostSortType.swift index 2635acbd2..3935bb840 100644 --- a/Mlem/Enums/Settings/PostSortType.swift +++ b/Mlem/Enums/Settings/PostSortType.swift @@ -84,25 +84,25 @@ extension PostSortType: SettingsOptions { extension PostSortType: AssociatedIcon { var iconName: String { switch self { - case .active: return Icons.activeSortSymbolName - case .hot: return Icons.hotSortSymbolName - case .new: return Icons.newSortSymbolName - case .old: return Icons.oldSortSymbolName - case .newComments: return Icons.newCommentsSymbolName - case .mostComments: return Icons.mostCommentsSymbolName - default: return Icons.timeSymbolName + case .active: return Icons.activeSort + case .hot: return Icons.hotSort + case .new: return Icons.newSort + case .old: return Icons.oldSort + case .newComments: return Icons.newCommentsSort + case .mostComments: return Icons.mostCommentsSort + default: return Icons.timeSort } } var iconNameFill: String { switch self { - case .active: return Icons.activeSortSymbolNameFill - case .hot: return Icons.hotSortSymbolNameFill - case .new: return Icons.newSortSymbolNameFill - case .old: return Icons.oldSortSymbolNameFill - case .newComments: return Icons.newCommentsSymbolNameFill - case .mostComments: return Icons.mostCommentsSymbolNameFill - default: return Icons.timeSymbolNameFill + case .active: return Icons.activeSortFill + case .hot: return Icons.hotSortFill + case .new: return Icons.newSortFill + case .old: return Icons.oldSortFill + case .newComments: return Icons.newCommentsSortFill + case .mostComments: return Icons.mostCommentsSortFill + default: return Icons.timeSortFill } } } diff --git a/Mlem/Extensions/NSFW Overlay.swift b/Mlem/Extensions/NSFW Overlay.swift index 88a33a144..4b005bfa2 100644 --- a/Mlem/Extensions/NSFW Overlay.swift +++ b/Mlem/Extensions/NSFW Overlay.swift @@ -50,7 +50,7 @@ struct NSFWOverlay: ViewModifier { .background(.thinMaterial) .cornerRadius(AppConstants.largeItemCornerRadius) } else if isNsfw, shouldBlurNsfw { - Image(systemName: Icons.nsfw) + Image(systemName: Icons.hide) .foregroundColor(.white) .padding(4) .background(.thinMaterial) diff --git a/Mlem/Icons.swift b/Mlem/Icons.swift index 7563030a9..c3039092e 100644 --- a/Mlem/Icons.swift +++ b/Mlem/Icons.swift @@ -11,43 +11,38 @@ import SwiftUI /// SFSymbol names for icons struct Icons { // votes - static let generalVoteSymbolName: String = "arrow.up.arrow.down.square" - - static let plainUpvoteSymbolName: String = "arrow.up" - static let emptyUpvoteSymbolName: String = "arrow.up.square" - static let fullUpvoteSymbolName: String = "arrow.up.square.fill" - - static let plainDownvoteSymbolName: String = "arrow.down" - static let emptyDownvoteSymbolName: String = "arrow.down.square" - static let fullDownvoteSymbolName: String = "arrow.down.square.fill" - - static let emptyResetVoteSymbolName: String = "minus.square" - static let fullResetVoteSymbolName: String = "minus.square.fill" - static let scoringOpToVoteImage: [ScoringOperation?: String] = [.upvote: "arrow.up.square.fill", - .resetVote: "arrow.up.square", - .downvote: "arrow.down.square.fill"] + static let votes: String = "arrow.up.arrow.down.square" + static let upvote: String = "arrow.up" + static let upvoteSquare: String = "arrow.up.square" + static let upvoteSquareFill: String = "arrow.up.square.fill" + static let downvote: String = "arrow.down" + static let downvoteSquare: String = "arrow.down.square" + static let downvoteSquareFill: String = "arrow.down.square.fill" + static let resetVoteSquare: String = "minus.square" + static let resetVoteSquareFill: String = "minus.square.fill" // reply/send - static let emptyReplySymbolName: String = "arrowshape.turn.up.left" - static let fullReplySymbolName: String = "arrowshape.turn.up.left.fill" - static let sendSymbolName: String = "paperplane" - static let sendSymbolNameFill: String = "paperplane.fill" + static let reply: String = "arrowshape.turn.up.left" + static let replyFill: String = "arrowshape.turn.up.left.fill" + static let send: String = "paperplane" + static let sendFill: String = "paperplane.fill" // save - static let emptySaveSymbolName: String = "bookmark" - static let fullSaveSymbolName: String = "bookmark.fill" - static let emptyUndoSaveSymbolName: String = "bookmark.slash" - static let fullUndoSaveSymbolName: String = "bookmark.slash.fill" + static let save: String = "bookmark" + static let saveFill: String = "bookmark.fill" + static let unsave: String = "bookmark.slash" + static let unsaveFill: String = "bookmark.slash.fill" // mark read - static let emptyMarkReadSymbolName: String = "envelope" - static let fullMarkReadSymbolName: String = "envelope.open.fill" - static let emptyMarkUnreadSymbolName: String = "envelope.open" - static let fullMarkUnreadSymbolName: String = "envelope.fill" + static let markRead: String = "envelope" + static let markReadFill: String = "envelope.open.fill" + static let markUnread: String = "envelope.open" + static let markUnreadFill: String = "envelope.fill" - // report/block - static let reportSymbolName: String = "exclamationmark.shield" - static let blockUserSymbolName: String = "person.fill.xmark" + // moderation + static let moderation: String = "shield" + static let moderationFill: String = "shield.fill" + static let moderationReport: String = "exclamationmark.shield" // misc post static let replies: String = "bubble.right" @@ -57,42 +52,40 @@ struct Icons { static let websiteIcon: String = "globe" // post sizes - static let postSizeSettingsSymbolName: String = "rectangle.expand.vertical" - static let compactSymbolName: String = "rectangle.grid.1x2" - static let compactSymbolNameFill: String = "rectangle.grid.1x2.fill" - static let headlineSymbolName: String = "rectangle" - static let headlineSymbolNameFill: String = "rectangle.fill" - static let largeSymbolName: String = "text.below.photo" - static let largeSymbolNameFill: String = "text.below.photo.fill" - static let blurNsfwSymbolName: String = "eye.trianglebadge.exclamationmark" + static let postSizeSetting: String = "rectangle.expand.vertical" + static let compactPost: String = "rectangle.grid.1x2" + static let compactPostFill: String = "rectangle.grid.1x2.fill" + static let headlinePost: String = "rectangle" + static let headlinePostFill: String = "rectangle.fill" + static let largePost: String = "text.below.photo" + static let largePostFill: String = "text.below.photo.fill" // feeds - static let federatedFeedSymbolName: String = "circle.hexagongrid.circle" - static let federatedFeedSymbolNameFill: String = "circle.hexagongrid.circle.fill" - static let localFeedSymbolName: String = "house.circle" - static let localFeedSymbolNameFill: String = "house.circle.fill" - static let subscribedFeedSymbolName: String = "newspaper.circle" - static let subscribedFeedSymbolNameFill: String = "newspaper.circle.fill" - static let limitImageHeightInFeedSymbolName: String = "rectangle.compress.vertical" + static let federatedFeed: String = "circle.hexagongrid.circle" + static let federatedFeedFill: String = "circle.hexagongrid.circle.fill" + static let localFeed: String = "house.circle" + static let localFeedFill: String = "house.circle.fill" + static let subscribedFeed: String = "newspaper.circle" + static let subscribedFeedFill: String = "newspaper.circle.fill" // sort types - static let activeSortSymbolName: String = "popcorn" - static let activeSortSymbolNameFill: String = "popcorn.fill" - static let hotSortSymbolName: String = "flame" - static let hotSortSymbolNameFill: String = "flame.fill" - static let newSortSymbolName: String = "hare" - static let newSortSymbolNameFill: String = "hare.fill" - static let oldSortSymbolName: String = "tortoise" - static let oldSortSymbolNameFill: String = "tortoise.fill" - static let newCommentsSymbolName: String = "exclamationmark.bubble" - static let newCommentsSymbolNameFill: String = "exclamationmark.bubble.fill" - static let mostCommentsSymbolName: String = "bubble.left.and.bubble.right" - static let mostCommentsSymbolNameFill: String = "bubble.left.and.bubble.right.fill" - static let topMenu: String = "text.line.first.and.arrowtriangle.forward" - static let topSymbolName: String = "trophy" - static let topSymbolNameFill: String = "trophy.fill" - static let timeSymbolName: String = "calendar.day.timeline.leading" - static let timeSymbolNameFill: String = "calendar.day.timeline.leading.fill" + static let activeSort: String = "popcorn" + static let activeSortFill: String = "popcorn.fill" + static let hotSort: String = "flame" + static let hotSortFill: String = "flame.fill" + static let newSort: String = "hare" + static let newSortFill: String = "hare.fill" + static let oldSort: String = "tortoise" + static let oldSortFill: String = "tortoise.fill" + static let newCommentsSort: String = "exclamationmark.bubble" + static let newCommentsSortFill: String = "exclamationmark.bubble.fill" + static let mostCommentsSort: String = "bubble.left.and.bubble.right" + static let mostCommentsSortFill: String = "bubble.left.and.bubble.right.fill" + static let topSortMenu: String = "text.line.first.and.arrowtriangle.forward" + static let topSort: String = "trophy" + static let topSortFill: String = "trophy.fill" + static let timeSort: String = "calendar.day.timeline.leading" + static let timeSortFill: String = "calendar.day.timeline.leading.fill" // user flairs static let developerFlair: String = "hammer.fill" @@ -101,11 +94,11 @@ struct Icons { static let opFlair: String = "person.fill" // entities/general Lemmy concepts - static let moderation: String = "shield" - static let moderationFill: String = "shield.fill" static let instance: String = "server.rack" static let user: String = "person.circle" static let userFill: String = "person.circle.fill" + static let userBlock: String = "person.fill.xmark" + static let community: String = "building.2.crop.circle" // tabs static let feeds: String = "scroll" @@ -121,8 +114,12 @@ struct Icons { static let successCircle: String = "checkmark.circle" static let successSquareFill: String = "checkmark.square.fill" static let failure: String = "xmark" + static let present: String = "circle.fill" // that's present as in "here," not as in "gift" + static let absent: String = "circle" static let warning: String = "exclamationmark.triangle" - static let nsfw: String = "eye.slash" + static let hide: String = "eye.slash" + static let show: String = "eye" + static let blurNsfw: String = "eye.trianglebadge.exclamationmark" static let endOfFeed: String = "figure.climbing" static let noContent: String = "binoculars" static let noPosts: String = "text.bubble" @@ -131,15 +128,13 @@ struct Icons { static let favoriteFill: String = "star.fill" // common operations - static let shareSymbolName: String = "square.and.arrow.up" - static let subscribeSymbolName: String = "plus.circle" - static let unsubscribeSymbolName: String = "multiply.circle" - static let blockSymbolName: String = "eye.slash" - static let unblockSymbolName: String = "eye" - static let filterSymbolName: String = "line.3.horizontal.decrease.circle" - static let filterSymbolNameFill: String = "line.3.horizontal.decrease.circle.fill" - static let menuSymbolName: String = "ellipsis" - static let importSymbol: String = "square.and.arrow.down" + static let share: String = "square.and.arrow.up" + static let subscribe: String = "plus.circle" + static let unsubscribe: String = "multiply.circle" + static let filter: String = "line.3.horizontal.decrease.circle" + static let filterFill: String = "line.3.horizontal.decrease.circle.fill" + static let menu: String = "ellipsis" + static let importSymbol: String = "square.and.arrow.down" // Just "import" can't be used :( // settings static let upvoteOnSave: String = "arrow.up.heart" @@ -156,18 +151,16 @@ struct Icons { static let websiteAddress: String = "link" static let leftRight: String = "arrow.left.arrow.right" static let developerMode: String = "wrench.adjustable.fill" + static let limitImageHeightSetting: String = "rectangle.compress.vertical" // misc - static let switchUserSymbolName: String = "person.crop.circle.badge.plus" - static let missingSymbolName: String = "questionmark.square.dashed" - static let connectionSymbolName: String = "antenna.radiowaves.left.and.right" - static let hapticSymbolName: String = "hand.tap" - static let transparencySymbolName: String = "square.on.square.intersection.dashed" - static let presentSymbolName: String = "circle.fill" - static let absentSymbolName: String = "circle" - static let iconSymbolName: String = "fleuron" - static let bannerSymbolName: String = "flag" - static let communitySymbolName: String = "building.2.crop.circle" + static let switchUser: String = "person.crop.circle.badge.plus" + static let missing: String = "questionmark.square.dashed" + static let connection: String = "antenna.radiowaves.left.and.right" + static let haptics: String = "hand.tap" + static let transparency: String = "square.on.square.intersection.dashed" + static let icon: String = "fleuron" + static let banner: String = "flag" static let noWifi: String = "wifi.slash" static let easterEgg: String = "gift.fill" static let jumpButton: String = "chevron.down.circle" diff --git a/Mlem/Views/Shared/Accounts/Accounts Page.swift b/Mlem/Views/Shared/Accounts/Accounts Page.swift index d1f723b55..93a0bb96f 100644 --- a/Mlem/Views/Shared/Accounts/Accounts Page.swift +++ b/Mlem/Views/Shared/Accounts/Accounts Page.swift @@ -67,7 +67,7 @@ struct AccountsPage: View { Button { isShowingInstanceAdditionSheet = true } label: { - Label("Add Account", systemImage: Icons.switchUserSymbolName) + Label("Add Account", systemImage: Icons.switchUser) } .accessibilityLabel("Add a new account.") diff --git a/Mlem/Views/Shared/Accounts/Components/Instance Summary.swift b/Mlem/Views/Shared/Accounts/Components/Instance Summary.swift index d47fe474e..f96736635 100644 --- a/Mlem/Views/Shared/Accounts/Components/Instance Summary.swift +++ b/Mlem/Views/Shared/Accounts/Components/Instance Summary.swift @@ -22,8 +22,8 @@ struct InstanceSummary: View { @State var isPresentingRedirectAlert: Bool = false var isLoading: Bool { siteData == nil && !fetchFailed } - var downvotesSymbolName: String { instance.downvotes ? Icons.presentSymbolName : Icons.absentSymbolName } - var federatedSymbolName: String { instance.federated ? Icons.presentSymbolName : Icons.absentSymbolName } + var downvotesSymbolName: String { instance.downvotes ? Icons.present : Icons.absent } + var federatedSymbolName: String { instance.federated ? Icons.present : Icons.absent } var signupURL: URL? { let signupString = "\(instance.url.description)/signup" if let ret = URL(string: signupString) { diff --git a/Mlem/Views/Shared/Cached Image.swift b/Mlem/Views/Shared/Cached Image.swift index 50ef5ace3..dd7789cd8 100644 --- a/Mlem/Views/Shared/Cached Image.swift +++ b/Mlem/Views/Shared/Cached Image.swift @@ -159,7 +159,7 @@ struct CachedImage: View { } static func imageNotFoundDefault() -> AnyView { - AnyView(Image(systemName: Icons.missingSymbolName) + AnyView(Image(systemName: Icons.missing) .resizable() .scaledToFit() .frame(maxWidth: AppConstants.thumbnailSize, maxHeight: AppConstants.thumbnailSize) diff --git a/Mlem/Views/Shared/Comments/Comment Item Logic.swift b/Mlem/Views/Shared/Comments/Comment Item Logic.swift index 0fd4b388a..b4983623e 100644 --- a/Mlem/Views/Shared/Comments/Comment Item Logic.swift +++ b/Mlem/Views/Shared/Comments/Comment Item Logic.swift @@ -232,7 +232,7 @@ extension CommentItem { // report ret.append(MenuFunction.standardMenuFunction( text: "Report", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: "Really report?", enabled: true ) { @@ -245,7 +245,7 @@ extension CommentItem { // block ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { diff --git a/Mlem/Views/Shared/Comments/Components/CommentBodyView.swift b/Mlem/Views/Shared/Comments/Components/CommentBodyView.swift index 510f4973d..ffc6593e3 100644 --- a/Mlem/Views/Shared/Comments/Components/CommentBodyView.swift +++ b/Mlem/Views/Shared/Comments/Components/CommentBodyView.swift @@ -113,17 +113,17 @@ struct CommentBodyView: View { // votes if showCommentDownvotesSeparately { HStack(spacing: AppConstants.iconToTextSpacing) { - Image(systemName: myVote == .upvote ? Icons.fullUpvoteSymbolName : Icons.emptyUpvoteSymbolName) + Image(systemName: myVote == .upvote ? Icons.upvoteSquareFill : Icons.upvoteSquare) Text(String(commentView.counts.upvotes)) } HStack(spacing: AppConstants.iconToTextSpacing) { - Image(systemName: myVote == .downvote ? Icons.fullDownvoteSymbolName : Icons.emptyDownvoteSymbolName) + Image(systemName: myVote == .downvote ? Icons.downvoteSquareFill : Icons.downvoteSquare) Text(String(commentView.counts.downvotes)) } } else { HStack(spacing: AppConstants.iconToTextSpacing) { - Image(systemName: Icons.scoringOpToVoteImage[myVote]!) + Image(systemName: myVote == .resetVote ? Icons.upvoteSquare : myVote.iconName) Text(String(commentView.counts.score)) } .foregroundColor(.secondary) diff --git a/Mlem/Views/Shared/Components/Components/DownvoteButtonView.swift b/Mlem/Views/Shared/Components/Components/DownvoteButtonView.swift index 31ceb3be8..26366619e 100644 --- a/Mlem/Views/Shared/Components/Components/DownvoteButtonView.swift +++ b/Mlem/Views/Shared/Components/Components/DownvoteButtonView.swift @@ -17,7 +17,7 @@ struct DownvoteButtonView: View { await downvote() } } label: { - Image(systemName: Icons.plainDownvoteSymbolName) + Image(systemName: Icons.downvote) .resizable() .scaledToFit() .frame(width: AppConstants.barIconSize, height: AppConstants.barIconSize) diff --git a/Mlem/Views/Shared/Components/Components/DownvoteCounterView.swift b/Mlem/Views/Shared/Components/Components/DownvoteCounterView.swift index c2269c072..2386664da 100644 --- a/Mlem/Views/Shared/Components/Components/DownvoteCounterView.swift +++ b/Mlem/Views/Shared/Components/Components/DownvoteCounterView.swift @@ -22,7 +22,7 @@ struct DownvoteCounterView: View { } } label: { HStack(spacing: 8) { - Image(systemName: Icons.plainDownvoteSymbolName) + Image(systemName: Icons.downvote) Text(String(score)) .monospacedDigit() } diff --git a/Mlem/Views/Shared/Components/Components/Ellipsis Menu.swift b/Mlem/Views/Shared/Components/Components/Ellipsis Menu.swift index 602b8f705..37843ac22 100644 --- a/Mlem/Views/Shared/Components/Components/Ellipsis Menu.swift +++ b/Mlem/Views/Shared/Components/Components/Ellipsis Menu.swift @@ -25,7 +25,7 @@ struct EllipsisMenu: View { MenuButton(menuFunction: menuFunction, confirmDestructive: confirmDestructive) } } label: { - Image(systemName: Icons.menuSymbolName) + Image(systemName: Icons.menu) .frame(width: size, height: size) .foregroundColor(.primary) .background(RoundedRectangle(cornerRadius: AppConstants.tinyItemCornerRadius) diff --git a/Mlem/Views/Shared/Components/Components/InfoStackView.swift b/Mlem/Views/Shared/Components/Components/InfoStackView.swift index 1b9385d44..8ff52db88 100644 --- a/Mlem/Views/Shared/Components/Components/InfoStackView.swift +++ b/Mlem/Views/Shared/Components/Components/InfoStackView.swift @@ -61,7 +61,7 @@ struct InfoStackView: View { @ViewBuilder func netVotesView(votes: DetailedVotes) -> some View { HStack(spacing: AppConstants.iconToTextSpacing) { - Image(systemName: Icons.scoringOpToVoteImage[votes.myVote]!) + Image(systemName: votes.myVote == .resetVote ? Icons.upvoteSquare : votes.myVote.iconNameFill) Text(String(votes.score)) } .accessibilityAddTraits(.isStaticText) @@ -72,7 +72,7 @@ struct InfoStackView: View { @ViewBuilder func upvotesView(votes: DetailedVotes) -> some View { HStack(spacing: AppConstants.iconToTextSpacing) { - Image(systemName: votes.myVote == .upvote ? Icons.fullUpvoteSymbolName : Icons.emptyUpvoteSymbolName) + Image(systemName: votes.myVote == .upvote ? Icons.upvoteSquareFill : Icons.upvoteSquare) Text(String(votes.upvotes)) } .accessibilityAddTraits(.isStaticText) @@ -84,8 +84,8 @@ struct InfoStackView: View { func downvotesView(votes: DetailedVotes) -> some View { HStack(spacing: AppConstants.iconToTextSpacing) { Image(systemName: votes.myVote == .downvote - ? Icons.fullDownvoteSymbolName - : Icons.emptyDownvoteSymbolName) + ? Icons.downvoteSquareFill + : Icons.downvoteSquare) Text(String(votes.downvotes)) } .accessibilityAddTraits(.isStaticText) @@ -95,7 +95,7 @@ struct InfoStackView: View { @ViewBuilder func savedView(isSaved: Bool) -> some View { - Image(systemName: isSaved ? Icons.fullSaveSymbolName : Icons.emptySaveSymbolName) + Image(systemName: isSaved ? Icons.saveFill : Icons.save) .accessibilityAddTraits(.isStaticText) .accessibilityElement(children: .ignore) .accessibilityLabel(isSaved ? "saved" : "") diff --git a/Mlem/Views/Shared/Components/Components/ReplyButtonView.swift b/Mlem/Views/Shared/Components/Components/ReplyButtonView.swift index b62117d6d..5093d98f6 100644 --- a/Mlem/Views/Shared/Components/Components/ReplyButtonView.swift +++ b/Mlem/Views/Shared/Components/Components/ReplyButtonView.swift @@ -17,7 +17,7 @@ struct ReplyButtonView: View { init(accessibilityContext: String, reply: (() -> Void)?) { self.reply = reply - self.replyIcon = reply == nil ? "quote.bubble.left" : Icons.emptyReplySymbolName + self.replyIcon = reply == nil ? "quote.bubble.left" : Icons.reply self.replyButtonText = "Reply to \(accessibilityContext)" } diff --git a/Mlem/Views/Shared/Components/Components/SaveButtonView.swift b/Mlem/Views/Shared/Components/Components/SaveButtonView.swift index 1c02907bd..4001584a4 100644 --- a/Mlem/Views/Shared/Components/Components/SaveButtonView.swift +++ b/Mlem/Views/Shared/Components/Components/SaveButtonView.swift @@ -26,7 +26,7 @@ struct SaveButtonView: View { Button { save() } label: { - Image(systemName: isSaved ? Icons.fullSaveSymbolName : Icons.emptySaveSymbolName) + Image(systemName: isSaved ? Icons.saveFill : Icons.save) .resizable() .scaledToFit() .frame(width: AppConstants.barIconSize, height: AppConstants.barIconSize) diff --git a/Mlem/Views/Shared/Components/Components/ShareButtonView.swift b/Mlem/Views/Shared/Components/Components/ShareButtonView.swift index 3481090d1..da81df1aa 100644 --- a/Mlem/Views/Shared/Components/Components/ShareButtonView.swift +++ b/Mlem/Views/Shared/Components/Components/ShareButtonView.swift @@ -27,7 +27,7 @@ struct ShareButtonView: View { } var label: some View { - Image(systemName: Icons.shareSymbolName) + Image(systemName: Icons.share) .resizable() .scaledToFit() .frame(width: AppConstants.barIconSize, height: AppConstants.barIconSize) diff --git a/Mlem/Views/Shared/Components/Components/UpvoteButtonView.swift b/Mlem/Views/Shared/Components/Components/UpvoteButtonView.swift index 4bc66c9be..93e6bd816 100644 --- a/Mlem/Views/Shared/Components/Components/UpvoteButtonView.swift +++ b/Mlem/Views/Shared/Components/Components/UpvoteButtonView.swift @@ -17,7 +17,7 @@ struct UpvoteButtonView: View { await upvote() } } label: { - Image(systemName: Icons.plainUpvoteSymbolName) + Image(systemName: Icons.upvote) .resizable() .scaledToFit() .frame(width: AppConstants.barIconSize, height: AppConstants.barIconSize) diff --git a/Mlem/Views/Shared/Components/Components/UpvoteCounterView.swift b/Mlem/Views/Shared/Components/Components/UpvoteCounterView.swift index 27acb9b18..bb6b640b3 100644 --- a/Mlem/Views/Shared/Components/Components/UpvoteCounterView.swift +++ b/Mlem/Views/Shared/Components/Components/UpvoteCounterView.swift @@ -22,7 +22,7 @@ struct UpvoteCounterView: View { } } label: { HStack(spacing: 8) { - Image(systemName: Icons.plainUpvoteSymbolName) + Image(systemName: Icons.upvote) Text(String(score)) .monospacedDigit() } diff --git a/Mlem/Views/Shared/Composer/PostDetailEditorView.swift b/Mlem/Views/Shared/Composer/PostDetailEditorView.swift index 729293124..ae6de5ac8 100644 --- a/Mlem/Views/Shared/Composer/PostDetailEditorView.swift +++ b/Mlem/Views/Shared/Composer/PostDetailEditorView.swift @@ -213,7 +213,7 @@ struct PostDetailEditorView: View { await submitPost() } } label: { - Image(systemName: Icons.sendSymbolName) + Image(systemName: Icons.send) }.disabled(isSubmitting || !isReadyToPost) } } diff --git a/Mlem/Views/Shared/Composer/ResponseEditorView.swift b/Mlem/Views/Shared/Composer/ResponseEditorView.swift index 36c164127..92ed64b50 100644 --- a/Mlem/Views/Shared/Composer/ResponseEditorView.swift +++ b/Mlem/Views/Shared/Composer/ResponseEditorView.swift @@ -93,7 +93,7 @@ struct ResponseEditorView: View { await submit() } } label: { - Image(systemName: Icons.sendSymbolName) + Image(systemName: Icons.send) }.disabled(isSubmitting || !isReadyToReply) } } diff --git a/Mlem/Views/Shared/Links/AvatarView.swift b/Mlem/Views/Shared/Links/AvatarView.swift index 2f9e8af13..02ce59fed 100644 --- a/Mlem/Views/Shared/Links/AvatarView.swift +++ b/Mlem/Views/Shared/Links/AvatarView.swift @@ -79,49 +79,17 @@ struct AvatarView: View { case .community: // TODO: make good return AnyView( - Image(systemName: Icons.communitySymbolName) + Image(systemName: Icons.community) .resizable() .scaledToFill() -// ZStack { -// VStack { -// Spacer() -// Image(systemName: "building.2.fill") -// .resizable() -// .aspectRatio(contentMode: .fit) -// .frame(height: avatarSize * 0.66) -// .foregroundStyle(.white) -// } -// .scaledToFit() -// .mask( -// Circle() -// .frame(width: avatarSize * 0.83, height: avatarSize * 0.83) -// ) -// } -// .frame(maxWidth: .infinity) -// .background(.gray) + .foregroundColor(.secondary) ) case .user: return AnyView( - Image(systemName: Icons.userFill) + Image(systemName: Icons.user) .resizable() .scaledToFill() -// ZStack { -// VStack { -// Spacer() -// Image(systemName: "person.fill") -// .resizable() -// .aspectRatio(contentMode: .fit) -// .frame(height: avatarSize * 0.75) -// .foregroundStyle(.white) -// } -// .scaledToFit() -// .mask( -// Circle() -// .frame(width: avatarSize * 0.83, height: avatarSize * 0.83) -// ) -// } -// .frame(maxWidth: .infinity) -// .background(.gray) + .foregroundColor(.secondary) ) } } diff --git a/Mlem/Views/Shared/Posts/ExpandedPostLogic.swift b/Mlem/Views/Shared/Posts/ExpandedPostLogic.swift index d51ba5ead..8fad29a38 100644 --- a/Mlem/Views/Shared/Posts/ExpandedPostLogic.swift +++ b/Mlem/Views/Shared/Posts/ExpandedPostLogic.swift @@ -184,7 +184,7 @@ extension ExpandedPost { // report ret.append(MenuFunction.standardMenuFunction( text: "Report Post", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: AppConstants.reportPostPrompt, enabled: true ) { @@ -194,7 +194,7 @@ extension ExpandedPost { // block user ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { diff --git a/Mlem/Views/Shared/Posts/Feed Post.swift b/Mlem/Views/Shared/Posts/Feed Post.swift index 8a161e611..89d1e6a5e 100644 --- a/Mlem/Views/Shared/Posts/Feed Post.swift +++ b/Mlem/Views/Shared/Posts/Feed Post.swift @@ -382,7 +382,7 @@ struct FeedPost: View { // report ret.append(MenuFunction.standardMenuFunction( text: "Report Post", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: AppConstants.reportPostPrompt, enabled: true ) { @@ -392,7 +392,7 @@ struct FeedPost: View { // block user ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { @@ -404,7 +404,7 @@ struct FeedPost: View { // block community ret.append(MenuFunction.standardMenuFunction( text: "Block Community", - imageName: Icons.blockSymbolName, + imageName: Icons.hide, destructiveActionPrompt: nil, enabled: true ) { @@ -427,8 +427,8 @@ extension FeedPost { var upvoteSwipeAction: SwipeAction { let (emptySymbolName, fullSymbolName) = post.votes.myVote == .upvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyUpvoteSymbolName, Icons.fullUpvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.upvoteSquare, Icons.upvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .upvoteColor, @@ -440,8 +440,8 @@ extension FeedPost { guard siteInformation.enableDownvotes else { return nil } let (emptySymbolName, fullSymbolName) = post.votes.myVote == .downvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyDownvoteSymbolName, Icons.fullDownvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.downvoteSquare, Icons.downvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .downvoteColor, @@ -451,8 +451,8 @@ extension FeedPost { var saveSwipeAction: SwipeAction { let (emptySymbolName, fullSymbolName) = post.saved - ? (Icons.emptyUndoSaveSymbolName, Icons.fullUndoSaveSymbolName) - : (Icons.emptySaveSymbolName, Icons.fullSaveSymbolName) + ? (Icons.unsave, Icons.unsaveFill) + : (Icons.save, Icons.saveFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .saveColor, diff --git a/Mlem/Views/Shared/Posts/Post Sizes/Large Post.swift b/Mlem/Views/Shared/Posts/Post Sizes/Large Post.swift index 372864733..d01b07d58 100644 --- a/Mlem/Views/Shared/Posts/Post Sizes/Large Post.swift +++ b/Mlem/Views/Shared/Posts/Post Sizes/Large Post.swift @@ -126,7 +126,7 @@ struct LargePost: View { @ViewBuilder private var minimizedIcon: some View { - Image(systemName: Icons.postSizeSettingsSymbolName) + Image(systemName: Icons.postSizeSetting) .resizable() .aspectRatio(contentMode: .fit) .padding(6) diff --git a/Mlem/Views/Tabs/Feeds/Community List/Community List View.swift b/Mlem/Views/Tabs/Feeds/Community List/Community List View.swift index b6879e09d..ce3d4a662 100644 --- a/Mlem/Views/Tabs/Feeds/Community List/Community List View.swift +++ b/Mlem/Views/Tabs/Feeds/Community List/Community List View.swift @@ -20,11 +20,11 @@ struct CommunityListView: View { @StateObject private var model: CommunityListModel = .init() @Binding var selectedCommunity: CommunityLinkWithContext? - + init(selectedCommunity: Binding) { self._selectedCommunity = selectedCommunity } - + // MARK: - Body var body: some View { @@ -33,7 +33,7 @@ struct CommunityListView: View { List(selection: $selectedCommunity) { HomepageFeedRowView( feedType: .subscribed, - iconName: Icons.subscribedFeedSymbolNameFill, + iconName: Icons.subscribedFeedFill, iconColor: .red, description: "Subscribed communities from all servers", navigationContext: .sidebar @@ -41,41 +41,40 @@ struct CommunityListView: View { .id("top") // For "scroll to top" sidebar item HomepageFeedRowView( feedType: .local, - iconName: Icons.localFeedSymbolNameFill, + iconName: Icons.localFeedFill, iconColor: .green, description: "Local communities from your server", navigationContext: .sidebar ) HomepageFeedRowView( feedType: .all, - iconName: Icons.federatedFeedSymbolNameFill, + iconName: Icons.federatedFeedFill, iconColor: .blue, description: "All communities that federate with your server", navigationContext: .sidebar ) - ForEach(model.visibleSections) { section in - Section(header: headerView(for: section)) { - ForEach(model.communities(for: section)) { community in - CommuntiyFeedRowView( - community: community, - subscribed: model.isSubscribed(to: community), - communitySubscriptionChanged: model.updateSubscriptionStatus, - navigationContext: .sidebar - ) - } + ForEach(model.visibleSections) { section in + Section(header: headerView(for: section)) { + ForEach(model.communities(for: section)) { community in + CommuntiyFeedRowView( + community: community, + subscribed: model.isSubscribed(to: community), + communitySubscriptionChanged: model.updateSubscriptionStatus, + navigationContext: .sidebar + ) } } } } - .fancyTabScrollCompatible() - .navigationTitle("Communities") - .navigationBarColor() - .listStyle(PlainListStyle()) - .scrollIndicators(.hidden) - - SectionIndexTitles(proxy: scrollProxy, communitySections: model.allSections()) } + .fancyTabScrollCompatible() + .navigationTitle("Communities") + .navigationBarColor() + .listStyle(PlainListStyle()) + .scrollIndicators(.hidden) + + SectionIndexTitles(proxy: scrollProxy, communitySections: model.allSections()) } .refreshable { await model.load() diff --git a/Mlem/Views/Tabs/Feeds/Components/PostSortMenu.swift b/Mlem/Views/Tabs/Feeds/Components/PostSortMenu.swift index 0f0e40113..2addb68f8 100644 --- a/Mlem/Views/Tabs/Feeds/Components/PostSortMenu.swift +++ b/Mlem/Views/Tabs/Feeds/Components/PostSortMenu.swift @@ -33,7 +33,7 @@ struct PostSortMenu: View { } } label: { - Label("Top…", systemImage: Icons.topMenu) + Label("Top…", systemImage: Icons.topSortMenu) } } label: { if shortLabel { diff --git a/Mlem/Views/Tabs/Feeds/Feed View Logic.swift b/Mlem/Views/Tabs/Feeds/Feed View Logic.swift index cd314bd49..03615f274 100644 --- a/Mlem/Views/Tabs/Feeds/Feed View Logic.swift +++ b/Mlem/Views/Tabs/Feeds/Feed View Logic.swift @@ -107,7 +107,7 @@ extension FeedView { let isSelected = postSortType == type return MenuFunction.standardMenuFunction( text: type.description, - imageName: isSelected ? Icons.timeSymbolNameFill : Icons.timeSymbolName, + imageName: isSelected ? Icons.timeSortFill : Icons.timeSort, destructiveActionPrompt: nil, enabled: !isSelected ) { @@ -122,7 +122,7 @@ extension FeedView { let blurNsfwText = shouldBlurNsfw ? "Unblur NSFW" : "Blur NSFW" ret.append(MenuFunction.standardMenuFunction( text: blurNsfwText, - imageName: Icons.blurNsfwSymbolName, + imageName: Icons.blurNsfw, destructiveActionPrompt: nil, enabled: true ) { @@ -148,7 +148,7 @@ extension FeedView { // new post ret.append(MenuFunction.standardMenuFunction( text: "New Post", - imageName: Icons.sendSymbolNameFill, + imageName: Icons.sendFill, destructiveActionPrompt: nil, enabled: true ) { @@ -162,8 +162,8 @@ extension FeedView { if let communityDetails { let isSubscribed: Bool = communityDetails.communityView.subscribed.rawValue == "Subscribed" let (subscribeText, subscribeSymbol, subscribePrompt) = isSubscribed - ? ("Unsubscribe", Icons.unsubscribeSymbolName, "Really unsubscribe from \(community.name)?") - : ("Subscribe", Icons.subscribeSymbolName, nil) + ? ("Unsubscribe", Icons.unsubscribe, "Really unsubscribe from \(community.name)?") + : ("Subscribe", Icons.subscribe, nil) ret.append(MenuFunction.standardMenuFunction( text: subscribeText, imageName: subscribeSymbol, @@ -210,8 +210,8 @@ extension FeedView { if let communityDetails { // block let (blockText, blockSymbol, blockPrompt) = communityDetails.communityView.blocked - ? ("Unblock", Icons.unblockSymbolName, nil) - : ("Block", Icons.blockSymbolName, "Really block \(community.name)?") + ? ("Unblock", Icons.show, nil) + : ("Block", Icons.hide, "Really block \(community.name)?") ret.append(MenuFunction.standardMenuFunction( text: blockText, imageName: blockSymbol, diff --git a/Mlem/Views/Tabs/Feeds/Feed View.swift b/Mlem/Views/Tabs/Feeds/Feed View.swift index e935301fa..9707b8f83 100644 --- a/Mlem/Views/Tabs/Feeds/Feed View.swift +++ b/Mlem/Views/Tabs/Feeds/Feed View.swift @@ -213,7 +213,7 @@ struct FeedView: View { MenuButton(menuFunction: menuFunction, confirmDestructive: confirmDestructive) } } label: { - Label("Post Size", systemImage: Icons.postSizeSettingsSymbolName) + Label("Post Size", systemImage: Icons.postSizeSetting) } } label: { Label("More", systemImage: "ellipsis") @@ -238,7 +238,7 @@ struct FeedView: View { MenuButton(menuFunction: menuFunction, confirmDestructive: nil) // no destructive sorts } } label: { - Label("Top...", systemImage: Icons.topSymbolName) + Label("Top...", systemImage: Icons.topSort) } } label: { Label( diff --git a/Mlem/Views/Tabs/Inbox/Feed/InteractionSwipeAndMenuHelpers.swift b/Mlem/Views/Tabs/Inbox/Feed/InteractionSwipeAndMenuHelpers.swift index ed24e3cbf..f2a12d722 100644 --- a/Mlem/Views/Tabs/Inbox/Feed/InteractionSwipeAndMenuHelpers.swift +++ b/Mlem/Views/Tabs/Inbox/Feed/InteractionSwipeAndMenuHelpers.swift @@ -12,8 +12,8 @@ extension InboxView { func upvoteCommentReplySwipeAction(commentReply: APICommentReplyView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = commentReply.myVote == .upvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyUpvoteSymbolName, Icons.fullUpvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.upvoteSquare, Icons.upvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .upvoteColor @@ -24,8 +24,8 @@ extension InboxView { func downvoteCommentReplySwipeAction(commentReply: APICommentReplyView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = commentReply.myVote == .downvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyDownvoteSymbolName, Icons.fullDownvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.downvoteSquare, Icons.downvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .downvoteColor @@ -36,8 +36,8 @@ extension InboxView { func toggleCommentReplyReadSwipeAction(commentReply: APICommentReplyView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = commentReply.commentReply.read ? - (Icons.emptyMarkUnreadSymbolName, Icons.fullMarkUnreadSymbolName) : - (Icons.emptyMarkReadSymbolName, Icons.fullMarkReadSymbolName) + (Icons.markUnread, Icons.markUnreadFill) : + (Icons.markRead, Icons.markReadFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .purple @@ -48,7 +48,7 @@ extension InboxView { func replyToCommentReplySwipeAction(commentReply: APICommentReplyView) -> SwipeAction? { SwipeAction( - symbol: .init(emptyName: Icons.emptyReplySymbolName, fillName: Icons.fullReplySymbolName), + symbol: .init(emptyName: Icons.reply, fillName: Icons.replyFill), color: .accentColor ) { replyToCommentReply(commentReply: commentReply) @@ -106,7 +106,7 @@ extension InboxView { // report ret.append(MenuFunction.standardMenuFunction( text: "Report Comment", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: nil, enabled: true ) { @@ -116,7 +116,7 @@ extension InboxView { // block ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { @@ -134,8 +134,8 @@ extension InboxView { func upvoteMentionSwipeAction(mentionView: APIPersonMentionView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = mentionView.myVote == .upvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyUpvoteSymbolName, Icons.fullUpvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.upvoteSquare, Icons.upvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .upvoteColor @@ -146,8 +146,8 @@ extension InboxView { func downvoteMentionSwipeAction(mentionView: APIPersonMentionView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = mentionView.myVote == .downvote ? - (Icons.emptyResetVoteSymbolName, Icons.fullResetVoteSymbolName) : - (Icons.emptyDownvoteSymbolName, Icons.fullDownvoteSymbolName) + (Icons.resetVoteSquare, Icons.resetVoteSquareFill) : + (Icons.downvoteSquare, Icons.downvoteSquareFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .downvoteColor @@ -158,8 +158,8 @@ extension InboxView { func toggleMentionReadSwipeAction(mentionView: APIPersonMentionView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = mentionView.personMention.read ? - (Icons.emptyMarkUnreadSymbolName, Icons.fullMarkUnreadSymbolName) : - (Icons.emptyMarkReadSymbolName, Icons.fullMarkReadSymbolName) + (Icons.markUnread, Icons.markUnreadFill) : + (Icons.markRead, Icons.markReadFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .purple @@ -170,7 +170,7 @@ extension InboxView { func replyToMentionSwipeAction(mentionView: APIPersonMentionView) -> SwipeAction? { SwipeAction( - symbol: .init(emptyName: Icons.emptyReplySymbolName, fillName: Icons.fullReplySymbolName), + symbol: .init(emptyName: Icons.reply, fillName: Icons.replyFill), color: .accentColor ) { replyToMention(mention: mentionView) @@ -228,7 +228,7 @@ extension InboxView { // report ret.append(MenuFunction.standardMenuFunction( text: "Report Comment", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: nil, enabled: true ) { @@ -238,7 +238,7 @@ extension InboxView { // block ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { @@ -256,8 +256,8 @@ extension InboxView { func toggleMessageReadSwipeAction(message: APIPrivateMessageView) -> SwipeAction { let (emptySymbolName, fullSymbolName) = message.privateMessage.read ? - (Icons.emptyMarkUnreadSymbolName, Icons.fullMarkUnreadSymbolName) : - (Icons.emptyMarkReadSymbolName, Icons.fullMarkReadSymbolName) + (Icons.markUnread, Icons.markUnreadFill) : + (Icons.markRead, Icons.markReadFill) return SwipeAction( symbol: .init(emptyName: emptySymbolName, fillName: fullSymbolName), color: .purple @@ -268,7 +268,7 @@ extension InboxView { func replyToMessageSwipeAction(message: APIPrivateMessageView) -> SwipeAction { SwipeAction( - symbol: .init(emptyName: Icons.emptyReplySymbolName, fillName: Icons.fullReplySymbolName), + symbol: .init(emptyName: Icons.reply, fillName: Icons.replyFill), color: .accentColor ) { replyToMessage(message: message) @@ -304,7 +304,7 @@ extension InboxView { // report ret.append(MenuFunction.standardMenuFunction( text: "Report Message", - imageName: Icons.reportSymbolName, + imageName: Icons.moderationReport, destructiveActionPrompt: nil, enabled: true ) { @@ -314,7 +314,7 @@ extension InboxView { // block ret.append(MenuFunction.standardMenuFunction( text: "Block User", - imageName: Icons.blockUserSymbolName, + imageName: Icons.userBlock, destructiveActionPrompt: AppConstants.blockUserPrompt, enabled: true ) { diff --git a/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Mention View.swift b/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Mention View.swift index 236e24d89..176712775 100644 --- a/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Mention View.swift +++ b/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Mention View.swift @@ -25,13 +25,13 @@ struct InboxMentionView: View { switch mention.myVote { case .upvote: - self.voteIconName = Icons.plainUpvoteSymbolName + self.voteIconName = Icons.upvote self.voteColor = .upvoteColor case .downvote: - self.voteIconName = Icons.plainDownvoteSymbolName + self.voteIconName = Icons.downvote self.voteColor = .downvoteColor default: - self.voteIconName = Icons.plainUpvoteSymbolName + self.voteIconName = Icons.upvote self.voteColor = .secondary } } diff --git a/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Reply View.swift b/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Reply View.swift index 2bb30c57a..d1bbe1f5d 100644 --- a/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Reply View.swift +++ b/Mlem/Views/Tabs/Inbox/Feed/Item Types/Inbox Reply View.swift @@ -27,13 +27,13 @@ struct InboxReplyView: View { switch reply.myVote { case .upvote: - self.voteIconName = Icons.plainUpvoteSymbolName + self.voteIconName = Icons.upvote self.voteColor = .upvoteColor case .downvote: - self.voteIconName = Icons.plainDownvoteSymbolName + self.voteIconName = Icons.downvote self.voteColor = .downvoteColor default: - self.voteIconName = Icons.plainUpvoteSymbolName + self.voteIconName = Icons.upvote self.voteColor = .secondary } } diff --git a/Mlem/Views/Tabs/Inbox/Inbox View Logic.swift b/Mlem/Views/Tabs/Inbox/Inbox View Logic.swift index e55c60bd5..841fbb95d 100644 --- a/Mlem/Views/Tabs/Inbox/Inbox View Logic.swift +++ b/Mlem/Views/Tabs/Inbox/Inbox View Logic.swift @@ -349,8 +349,8 @@ extension InboxView { var ret: [MenuFunction] = .init() let (filterReadText, filterReadSymbol) = shouldFilterRead - ? ("Show All", Icons.filterSymbolNameFill) - : ("Show Only Unread", Icons.filterSymbolName) + ? ("Show All", Icons.filterFill) + : ("Show Only Unread", Icons.filter) ret.append(MenuFunction.standardMenuFunction( text: filterReadText, diff --git a/Mlem/Views/Tabs/Profile/User View.swift b/Mlem/Views/Tabs/Profile/User View.swift index 378617b15..05c68addf 100644 --- a/Mlem/Views/Tabs/Profile/User View.swift +++ b/Mlem/Views/Tabs/Profile/User View.swift @@ -90,7 +90,7 @@ struct UserView: View { Button { isPresentingAccountSwitcher = true } label: { - Image(systemName: Icons.switchUserSymbolName) + Image(systemName: Icons.switchUser) } } } diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Accessibility/AccessibilitySettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Accessibility/AccessibilitySettingsView.swift index 5947abf3a..8fccbd3e2 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Accessibility/AccessibilitySettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Accessibility/AccessibilitySettingsView.swift @@ -71,7 +71,7 @@ struct AccessibilitySettingsView: View { Section { SwitchableSettingsItem( - settingPictureSystemName: Icons.transparencySymbolName, + settingPictureSystemName: Icons.transparency, settingName: "Translucent Insets", isTicked: $hasTranslucentInsets ) @@ -81,7 +81,7 @@ struct AccessibilitySettingsView: View { Section { SwitchableSettingsItem( - settingPictureSystemName: Icons.iconSymbolName, + settingPictureSystemName: Icons.icon, settingName: "Show Settings Icons", isTicked: $showSettingsIcons ) diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Comment/CommentSettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Comment/CommentSettingsView.swift index b57f67fac..a3bda5849 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Comment/CommentSettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Comment/CommentSettingsView.swift @@ -44,7 +44,7 @@ struct CommentSettingsView: View { Form { Section { SwitchableSettingsItem( - settingPictureSystemName: Icons.compactSymbolName, + settingPictureSystemName: Icons.compactPost, settingName: "Compact Comments", isTicked: $compactComments ) @@ -70,12 +70,12 @@ struct CommentSettingsView: View { isTicked: $shouldShowUserServerInComment ) SwitchableSettingsItem( - settingPictureSystemName: Icons.emptyUpvoteSymbolName, + settingPictureSystemName: Icons.upvoteSquare, settingName: "Show Score In Info", isTicked: $shouldShowScoreInCommentBar ) SwitchableSettingsItem( - settingPictureSystemName: Icons.generalVoteSymbolName, + settingPictureSystemName: Icons.votes, settingName: "Show Downvotes Separately", isTicked: $showCommentDownvotesSeparately ) @@ -85,7 +85,7 @@ struct CommentSettingsView: View { isTicked: $shouldShowTimeInCommentBar ) SwitchableSettingsItem( - settingPictureSystemName: Icons.emptySaveSymbolName, + settingPictureSystemName: Icons.save, settingName: "Show Saved Status In Info", isTicked: $shouldShowSavedInCommentBar ) diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Community/CommunitySettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Community/CommunitySettingsView.swift index 7ce4216b4..0a59e4b4a 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Community/CommunitySettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Community/CommunitySettingsView.swift @@ -12,12 +12,12 @@ struct CommunitySettingsView: View { var body: some View { Form { SwitchableSettingsItem( - settingPictureSystemName: Icons.communitySymbolName, + settingPictureSystemName: Icons.community, settingName: "Show Avatars", isTicked: $shouldShowCommunityIcons ) SwitchableSettingsItem( - settingPictureSystemName: Icons.bannerSymbolName, + settingPictureSystemName: Icons.banner, settingName: "Show Banners", isTicked: $shouldShowCommunityHeaders ) diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift index 3cb12a92c..2bc354a06 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Post/PostSettingsView.swift @@ -43,7 +43,7 @@ struct PostSettingsView: View { Form { Section { SelectableSettingsItem( - settingIconSystemName: Icons.postSizeSettingsSymbolName, + settingIconSystemName: Icons.postSizeSetting, settingName: "Post Size", currentValue: $postSize, options: PostSize.allCases @@ -95,7 +95,7 @@ struct PostSettingsView: View { ) SwitchableSettingsItem( - settingPictureSystemName: Icons.limitImageHeightInFeedSymbolName, + settingPictureSystemName: Icons.limitImageHeightSetting, settingName: "Limit Image Height In Feed", isTicked: $limitImageHeightInFeed ) @@ -103,12 +103,12 @@ struct PostSettingsView: View { Section("Interactions and Info") { SwitchableSettingsItem( - settingPictureSystemName: Icons.emptyUpvoteSymbolName, + settingPictureSystemName: Icons.upvoteSquare, settingName: "Show Score In Info", isTicked: $shouldShowScoreInPostBar ) SwitchableSettingsItem( - settingPictureSystemName: Icons.generalVoteSymbolName, + settingPictureSystemName: Icons.votes, settingName: "Show Downvotes Separately", isTicked: $showDownvotesSeparately ) @@ -118,7 +118,7 @@ struct PostSettingsView: View { isTicked: $shouldShowTimeInPostBar ) SwitchableSettingsItem( - settingPictureSystemName: Icons.emptySaveSymbolName, + settingPictureSystemName: Icons.save, settingName: "Show Saved Status In Info", isTicked: $shouldShowSavedInPostBar ) diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Shared/LayoutWidgetView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Shared/LayoutWidgetView.swift index 252518fc7..274502f10 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Shared/LayoutWidgetView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/Shared/LayoutWidgetView.swift @@ -24,25 +24,25 @@ struct LayoutWidgetView: View { HStack(spacing: 12) { switch widget.type { case .upvote: - icon(Icons.plainUpvoteSymbolName) + icon(Icons.upvote) case .downvote: - icon(Icons.plainDownvoteSymbolName) + icon(Icons.downvote) case .save: - icon(Icons.emptySaveSymbolName) + icon(Icons.save) case .reply: - icon(Icons.emptyReplySymbolName) + icon(Icons.reply) case .share: - icon(Icons.shareSymbolName) + icon(Icons.share) case .upvoteCounter: - icon(Icons.plainUpvoteSymbolName) + icon(Icons.upvote) Text("9") case .downvoteCounter: - icon(Icons.plainDownvoteSymbolName) + icon(Icons.downvote) Text("2") case .scoreCounter: - icon(Icons.plainUpvoteSymbolName) + icon(Icons.upvote) Text("7") - icon(Icons.plainDownvoteSymbolName) + icon(Icons.downvote) default: EmptyView() } diff --git a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/User/UserSettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/User/UserSettingsView.swift index fec27196c..22c42de5b 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/Appearance/User/UserSettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/Appearance/User/UserSettingsView.swift @@ -19,7 +19,7 @@ struct UserSettingsView: View { isTicked: $shouldShowUserAvatars ) SwitchableSettingsItem( - settingPictureSystemName: Icons.bannerSymbolName, + settingPictureSystemName: Icons.banner, settingName: "Show Banners", isTicked: $shouldShowUserHeaders ) diff --git a/Mlem/Views/Tabs/Settings/Components/Views/General/GeneralSettingsView.swift b/Mlem/Views/Tabs/Settings/Components/Views/General/GeneralSettingsView.swift index 73bf910ab..64d257a3d 100644 --- a/Mlem/Views/Tabs/Settings/Components/Views/General/GeneralSettingsView.swift +++ b/Mlem/Views/Tabs/Settings/Components/Views/General/GeneralSettingsView.swift @@ -32,7 +32,7 @@ struct GeneralSettingsView: View { List { Section { SelectableSettingsItem( - settingIconSystemName: Icons.hapticSymbolName, + settingIconSystemName: Icons.haptics, settingName: "Haptic Level", currentValue: $hapticLevel, options: HapticPriority.allCases @@ -51,7 +51,7 @@ struct GeneralSettingsView: View { Section { SwitchableSettingsItem( - settingPictureSystemName: Icons.blurNsfwSymbolName, + settingPictureSystemName: Icons.blurNsfw, settingName: "Blur NSFW Content", isTicked: $shouldBlurNsfw ) @@ -94,7 +94,7 @@ struct GeneralSettingsView: View { Section { SelectableSettingsItem( - settingIconSystemName: Icons.connectionSymbolName, + settingIconSystemName: Icons.connection, settingName: "Internet Speed", currentValue: $internetSpeed, options: InternetSpeed.allCases