mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 16:31:00 +00:00
foregroundColor -> foregroundStyle
This commit is contained in:
parent
3840b8fb28
commit
fcaf48ce53
30 changed files with 58 additions and 58 deletions
|
@ -81,7 +81,7 @@ struct AboutView: View {
|
|||
""")
|
||||
.multilineTextAlignment(.leading)
|
||||
.font(.scaledSubheadline)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
} header: {
|
||||
Text("settings.about.built-with")
|
||||
.textCase(nil)
|
||||
|
|
|
@ -197,12 +197,12 @@ struct AddAccountView: View {
|
|||
.foregroundColor(.primary)
|
||||
Text(instance.info?.shortDescription ?? "")
|
||||
.font(.scaledBody)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
(Text("instance.list.users-\(instance.users)")
|
||||
+ Text(" ⸱ ")
|
||||
+ Text("instance.list.posts-\(instance.statuses)"))
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
|
@ -218,10 +218,10 @@ struct AddAccountView: View {
|
|||
.foregroundColor(.primary)
|
||||
Text("placeholder.loading.long")
|
||||
.font(.scaledBody)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
Text("placeholder.loading.short")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.redacted(reason: .placeholder)
|
||||
.allowsHitTesting(false)
|
||||
|
|
|
@ -175,7 +175,7 @@ struct SupportAppView: View {
|
|||
.font(.scaledSubheadline)
|
||||
Text(Tip.supporter.subtitle)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
makePurchaseButton(product: subscription)
|
||||
|
@ -204,7 +204,7 @@ struct SupportAppView: View {
|
|||
.font(.scaledSubheadline)
|
||||
Text(tip.subtitle)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
makePurchaseButton(product: product)
|
||||
|
@ -262,7 +262,7 @@ struct SupportAppView: View {
|
|||
.font(.scaledSubheadline)
|
||||
Text("settings.support.placeholder.loading-subtitle")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
|
|
|
@ -95,13 +95,13 @@ struct AddRemoteTimelineView: View {
|
|||
.foregroundColor(.primary)
|
||||
Text(instance.info?.shortDescription ?? "")
|
||||
.font(.scaledBody)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
|
||||
(Text("instance.list.users-\(instance.users)")
|
||||
+ Text(" ⸱ ")
|
||||
+ Text("instance.list.posts-\(instance.statuses)"))
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
|
|
|
@ -206,7 +206,7 @@ struct AccountDetailHeaderView: View {
|
|||
}
|
||||
Text("@\(account.acct)")
|
||||
.font(.scaledCallout)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.textSelection(.enabled)
|
||||
.accessibilityRespondsToUserInteraction(false)
|
||||
joinedAtView
|
||||
|
@ -252,7 +252,7 @@ struct AccountDetailHeaderView: View {
|
|||
.font(.scaledBody)
|
||||
Text(getLocalizedStringLabel(langCode: translation.detectedSourceLanguage, provider: translation.provider))
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
@ -288,7 +288,7 @@ struct AccountDetailHeaderView: View {
|
|||
}
|
||||
Text(title)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.accessibilityElement(children: .ignore)
|
||||
.accessibilityLabel(title)
|
||||
|
@ -304,7 +304,7 @@ struct AccountDetailHeaderView: View {
|
|||
Text("account.joined")
|
||||
Text(joinedAt, style: .date)
|
||||
}
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.footnote)
|
||||
.padding(.top, 6)
|
||||
.accessibilityElement(children: .combine)
|
||||
|
@ -315,7 +315,7 @@ struct AccountDetailHeaderView: View {
|
|||
private func makeNoteView(_ note: String) -> some View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("account.relation.note.label")
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
Text(note)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(8)
|
||||
|
|
|
@ -277,7 +277,7 @@ public struct AccountDetailView: View {
|
|||
Label("account.post.pinned", systemImage: "pin.fill")
|
||||
.accessibilityAddTraits(.isHeader)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.fontWeight(.semibold)
|
||||
.listRowInsets(.init(top: 0,
|
||||
leading: 12,
|
||||
|
|
|
@ -53,7 +53,7 @@ public struct AccountsListRow: View {
|
|||
.fontWeight(.semibold)
|
||||
Text("@\(viewModel.account.acct)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
|
||||
// First parameter is the number for the plural
|
||||
// Second parameter is the formatted string to show
|
||||
|
|
|
@ -34,16 +34,16 @@ public struct FiltersListView: View {
|
|||
.font(.scaledSubheadline)
|
||||
Text("\(filter.context.map(\.name).joined(separator: ", "))")
|
||||
.font(.scaledBody)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
if filter.hasExpiry() {
|
||||
if filter.isExpired() {
|
||||
Text("filter.expired")
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
} else {
|
||||
Text("filter.expiry-\(filter.expiresAt!.relativeFormatted)")
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public struct AppAccountView: View {
|
|||
ProgressView()
|
||||
Text(viewModel.appAccount.accountName ?? viewModel.acct)
|
||||
.font(.scaledSubheadline)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
.padding(.leading, 6)
|
||||
}
|
||||
VStack(alignment: .leading) {
|
||||
|
@ -97,13 +97,13 @@ public struct AppAccountView: View {
|
|||
.font(.scaledSubheadline)
|
||||
.emojiSize(Font.scaledSubheadlineFont.emojiSize)
|
||||
.emojiBaselineOffset(Font.scaledSubheadlineFont.emojiBaselineOffset)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(Color.secondary)
|
||||
}
|
||||
}
|
||||
if viewModel.isInNavigation {
|
||||
Spacer()
|
||||
Image(systemName: "chevron.right")
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ struct ConversationMessageView: View {
|
|||
Text(message.createdAt.asDate, style: .time)
|
||||
}
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
if !isOwnMessage {
|
||||
Spacer()
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ struct ConversationsListRow: View {
|
|||
}
|
||||
}
|
||||
.padding(.leading, 48)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
|
|
@ -45,7 +45,7 @@ struct AccountPopoverView: View {
|
|||
|
||||
Text("@\(account.acct)")
|
||||
.font(.callout)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.textSelection(.enabled)
|
||||
.accessibilityRespondsToUserInteraction(false)
|
||||
.help("@\(account.acct)")
|
||||
|
@ -56,7 +56,7 @@ struct AccountPopoverView: View {
|
|||
Text("account.joined")
|
||||
Text(account.createdAt.asDate, style: .date)
|
||||
}
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.footnote)
|
||||
.accessibilityElement(children: .combine)
|
||||
|
||||
|
@ -110,7 +110,7 @@ struct AccountPopoverView: View {
|
|||
}
|
||||
Text(title)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.alignmentGuide(.bottomAvatar, computeValue: { dimension in
|
||||
dimension[.firstTextBaseline]
|
||||
})
|
||||
|
|
|
@ -23,7 +23,7 @@ public struct EmptyView: View {
|
|||
Text(message)
|
||||
.font(.scaledSubheadline)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.top, 100)
|
||||
.padding(.layoutPadding)
|
||||
|
|
|
@ -27,7 +27,7 @@ public struct ErrorView: View {
|
|||
Text(message)
|
||||
.font(.scaledSubheadline)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
Button {
|
||||
onButtonPress()
|
||||
} label: {
|
||||
|
|
|
@ -18,7 +18,7 @@ public struct TagRowView: View {
|
|||
.font(.scaledHeadline)
|
||||
Text("design.tag.n-posts-from-n-participants \(tag.totalUses) \(tag.totalAccounts)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public struct ListEditView: View {
|
|||
.emojiSize(Font.scaledBodyFont.emojiSize)
|
||||
.emojiBaselineOffset(Font.scaledBodyFont.emojiBaselineOffset)
|
||||
Text("@\(account.acct)")
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.scaledFootnote)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public struct ListEditView: View {
|
|||
.emojiSize(Font.scaledBodyFont.emojiSize)
|
||||
.emojiBaselineOffset(Font.scaledBodyFont.emojiBaselineOffset)
|
||||
Text("@\(account.acct)")
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.font(.scaledFootnote)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
|
|
@ -109,11 +109,11 @@ struct NotificationRowView: View {
|
|||
Text(" ⸱ ")
|
||||
.font(.scaledFootnote)
|
||||
.fontWeight(.regular)
|
||||
.foregroundColor(.gray) +
|
||||
.foregroundStyle(.secondary) +
|
||||
Text(notification.createdAt.relativeFormatted)
|
||||
.font(.scaledFootnote)
|
||||
.fontWeight(.regular)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
})
|
||||
.font(.scaledSubheadline)
|
||||
.emojiSize(Font.scaledSubheadlineFont.emojiSize)
|
||||
|
@ -129,7 +129,7 @@ struct NotificationRowView: View {
|
|||
.accessibilityHidden(true)
|
||||
.font(.scaledFootnote)
|
||||
.fontWeight(.regular)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ struct NotificationRowView: View {
|
|||
Group {
|
||||
Text("@\(notification.accounts[0].acct)")
|
||||
.font(.scaledCallout)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if type == .follow {
|
||||
EmojiTextApp(notification.accounts[0].note,
|
||||
|
@ -179,7 +179,7 @@ struct NotificationRowView: View {
|
|||
.font(.scaledCallout)
|
||||
.emojiSize(Font.scaledCalloutFont.emojiSize)
|
||||
.emojiBaselineOffset(Font.scaledCalloutFont.emojiBaselineOffset)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.environment(\.openURL, OpenURLAction { url in
|
||||
routerPath.handle(url: url)
|
||||
})
|
||||
|
|
|
@ -59,7 +59,7 @@ struct StatusEditorAutoCompleteView: View {
|
|||
.foregroundColor(theme.tintColor)
|
||||
Text("tag.suggested.mentions-\(tag.totalUses)")
|
||||
.font(.scaledCaption)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ public struct StatusEditorView: View {
|
|||
privacyMenu
|
||||
Text("@\(account.acct)@\(appAccounts.currentClient.server)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public struct StatusEmbeddedView: View {
|
|||
Text(status.reblog?.createdAt.relativeFormatted ?? status.createdAt.relativeFormatted)
|
||||
}
|
||||
.font(.scaledCaption)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public struct StatusEditHistoryView: View {
|
|||
Text(edit.createdAt.asDate, style: .time)
|
||||
}
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -145,7 +145,7 @@ public struct StatusPollView: View {
|
|||
}
|
||||
}
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.accessibilityElement(children: .combine)
|
||||
.accessibilityAddTraits(.updatesFrequently)
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public struct StatusRowCardView: View {
|
|||
if let description = card.description, !description.isEmpty {
|
||||
Text(description)
|
||||
.font(.scaledBody)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(3)
|
||||
}
|
||||
Text(url.host() ?? url.absoluteString)
|
||||
|
|
|
@ -39,7 +39,7 @@ struct StatusRowDetailView: View {
|
|||
}
|
||||
}
|
||||
.font(.scaledCaption)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if let editedAt = viewModel.status.editedAt {
|
||||
Divider()
|
||||
|
@ -55,7 +55,7 @@ struct StatusRowDetailView: View {
|
|||
}
|
||||
.underline()
|
||||
.font(.scaledCaption)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
if viewModel.actionsAccountsFetched, statusDataController.favoritesCount > 0 {
|
||||
|
|
|
@ -65,12 +65,12 @@ struct StatusRowHeaderView: View {
|
|||
if theme.avatarPosition == .leading {
|
||||
dateView
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
} else {
|
||||
Text("@\(theme.displayFullUsername ? viewModel.finalStatus.account.acct : viewModel.finalStatus.account.username)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
.accountPopover(viewModel.finalStatus.account)
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ struct StatusRowHeaderView: View {
|
|||
if theme.avatarPosition == .top {
|
||||
dateView
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
} else if theme.displayFullUsername, theme.avatarPosition == .leading {
|
||||
Text("@\(viewModel.finalStatus.account.acct)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(1)
|
||||
.offset(y: 1)
|
||||
.accountPopover(viewModel.finalStatus.account)
|
||||
|
@ -114,7 +114,7 @@ struct StatusRowHeaderView: View {
|
|||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 15)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ struct StatusRowHeaderView: View {
|
|||
.frame(width: 40, height: 40)
|
||||
}
|
||||
.menuStyle(.borderlessButton)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.contentShape(Rectangle())
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ struct StatusRowReblogView: View {
|
|||
.font(.scaledFootnote)
|
||||
.emojiSize(Font.scaledFootnoteFont.emojiSize)
|
||||
.emojiBaselineOffset(Font.scaledFootnoteFont.emojiBaselineOffset)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.fontWeight(.semibold)
|
||||
.onTapGesture {
|
||||
viewModel.navigateToAccountDetail(account: viewModel.status.account)
|
||||
|
|
|
@ -32,7 +32,7 @@ struct StatusRowReplyView: View {
|
|||
}
|
||||
}
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.fontWeight(.semibold)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ struct StatusRowTagView: View {
|
|||
}) {
|
||||
Text("#\(tag.title)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
.fontWeight(.semibold)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ struct StatusRowTranslateView: View {
|
|||
.font(.scaledBody)
|
||||
Text(getLocalizedString(langCode: translation.detectedSourceLanguage, provider: translation.provider))
|
||||
.font(.footnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
|
|
@ -159,7 +159,7 @@ public struct TimelineView: View {
|
|||
.font(.scaledHeadline)
|
||||
Text("timeline.n-recent-from-n-participants \(tag.totalUses) \(tag.totalAccounts)")
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
Spacer()
|
||||
|
@ -236,7 +236,7 @@ public struct TimelineView: View {
|
|||
.font(.headline)
|
||||
Text(timeline.localizedTitle())
|
||||
.font(.caption)
|
||||
.foregroundColor(.gray)
|
||||
.foregroundStyle(.secondary)
|
||||
default:
|
||||
Text(timeline.localizedTitle())
|
||||
.font(.headline)
|
||||
|
|
Loading…
Reference in a new issue