Update HeroImage to match the BigIcon component from Compound. (#3439)

We can move it across in a following PR.
This commit is contained in:
Doug
2024-10-23 12:13:14 +01:00
committed by GitHub
parent 01886bb4d8
commit 6584b4d084
259 changed files with 552 additions and 545 deletions
@@ -58,7 +58,7 @@ struct AppLockSetupPINScreen: View {
var header: some View {
VStack(spacing: 8) {
HeroImage(icon: \.lockSolid)
BigIcon(icon: \.lockSolid)
.padding(.bottom, 8)
Text(context.viewState.title)
@@ -45,7 +45,7 @@ struct LoginScreen: View {
/// The header containing the title and icon.
var header: some View {
VStack(spacing: 8) {
HeroImage(icon: \.lockSolid)
BigIcon(icon: \.lockSolid)
.padding(.bottom, 8)
Text(L10n.screenLoginTitleWithHomeserver(context.viewState.homeserver.address))
@@ -29,7 +29,7 @@ struct ServerConfirmationScreen: View {
var header: some View {
VStack(spacing: 8) {
Image(systemSymbol: .personCropCircleFill)
.heroImage()
.bigIcon()
.padding(.bottom, 8)
Text(context.viewState.title)
@@ -32,7 +32,7 @@ struct ServerSelectionScreen: View {
var header: some View {
VStack(spacing: 8) {
Image(asset: Asset.Images.serverSelectionIcon)
.heroImage(insets: 19)
.bigIcon(insets: 19)
.padding(.bottom, 8)
Text(L10n.screenChangeServerTitle)
@@ -15,7 +15,7 @@ struct EncryptionResetPasswordScreen: View {
var body: some View {
FullscreenDialog {
VStack(spacing: 16) {
HeroImage(icon: \.lockSolid)
BigIcon(icon: \.lockSolid)
Text(L10n.screenResetEncryptionPasswordTitle)
.foregroundColor(.compound.textPrimary)
@@ -39,7 +39,7 @@ struct EncryptionResetScreen: View {
private var header: some View {
VStack(spacing: 8) {
HeroImage(icon: \.error, style: .criticalOnSecondary)
BigIcon(icon: \.error, style: .alert)
.padding(.bottom, 8)
Text(L10n.screenEncryptionResetTitle)
@@ -88,7 +88,7 @@ struct JoinRoomScreen: View {
@ViewBuilder
private var knockedView: some View {
VStack(spacing: 16) {
HeroImage(icon: \.checkCircleSolid, style: .success)
BigIcon(icon: \.checkCircleSolid, style: .successSolid)
VStack(spacing: 8) {
Text(L10n.screenJoinRoomKnockSentTitle)
.font(.compound.headingMDBold)
@@ -35,7 +35,7 @@ struct AnalyticsPromptScreen: View {
private var header: some View {
VStack(spacing: 8) {
HeroImage(icon: \.chart)
BigIcon(icon: \.chart)
.padding(.bottom, 8)
Text(L10n.screenAnalyticsPromptTitle(InfoPlistReader.main.bundleDisplayName))
@@ -37,7 +37,7 @@ struct IdentityConfirmationScreen: View {
@ViewBuilder
private var screenHeader: some View {
VStack(spacing: 0) {
HeroImage(icon: \.lockSolid)
BigIcon(icon: \.lockSolid)
.padding(.bottom, 16)
Text(L10n.screenIdentityConfirmationTitle)
@@ -29,7 +29,7 @@ struct IdentityConfirmedScreen: View {
@ViewBuilder
private var screenHeader: some View {
VStack(spacing: 0) {
HeroImage(icon: \.checkCircle, style: .success)
BigIcon(icon: \.checkCircle, style: .successSolid)
.padding(.bottom, 16)
Text(L10n.screenIdentityConfirmedTitle)
@@ -27,7 +27,7 @@ struct NotificationPermissionsScreen: View {
/// The main content of the screen that is shown inside the scroll view.
private var mainContent: some View {
VStack(spacing: 8) {
HeroImage(icon: \.notificationsSolid)
BigIcon(icon: \.notificationsSolid)
.padding(.bottom, 8)
Text(L10n.screenNotificationOptinTitle)
@@ -58,11 +58,11 @@ struct SessionVerificationScreen: View {
private var screenHeader: some View {
VStack(spacing: 0) {
if context.viewState.verificationState == .initial {
HeroImage(icon: \.lockSolid)
BigIcon(icon: \.lockSolid)
.padding(.bottom, 16)
} else {
Image(systemName: headerImageName)
.heroImage()
.bigIcon()
.padding(.bottom, 16)
}
@@ -50,7 +50,7 @@ struct PinnedEventsTimelineScreen: View {
private var content: some View {
if timelineContext.viewState.pinnedEventIDs.isEmpty {
VStack(spacing: 16) {
HeroImage(icon: \.pin, style: .normal)
BigIcon(icon: \.pin)
Text(L10n.screenPinnedTimelineEmptyStateHeadline)
.font(.compound.headingSMSemibold)
.foregroundStyle(.compound.textPrimary)
@@ -41,7 +41,7 @@ struct QRCodeLoginScreen: View {
FullscreenDialog {
VStack(alignment: .leading, spacing: 40) {
VStack(spacing: 16) {
HeroImage(icon: \.computer, style: .subtle)
BigIcon(icon: \.computer, style: .default)
VStack(spacing: 8) {
Text(L10n.screenQrCodeLoginInitialStateTitle(InfoPlistReader.main.productionAppName))
@@ -101,7 +101,7 @@ struct QRCodeLoginScreen: View {
VStack(spacing: 16) {
switch state {
case .deviceCode:
HeroImage(icon: \.computer, style: .subtle)
BigIcon(icon: \.computer, style: .default)
VStack(spacing: 8) {
Text(L10n.screenQrCodeLoginDeviceCodeTitle)
@@ -115,7 +115,7 @@ struct QRCodeLoginScreen: View {
.multilineTextAlignment(.center)
}
case .verificationCode:
HeroImage(icon: \.lock, style: .subtle)
BigIcon(icon: \.lock, style: .default)
VStack(spacing: 8) {
Text(L10n.screenQrCodeLoginVerifyCodeTitle)
@@ -136,7 +136,7 @@ struct QRCodeLoginScreen: View {
FullscreenDialog {
VStack(spacing: 40) {
VStack(spacing: 16) {
HeroImage(icon: \.takePhotoSolid, style: .subtle)
BigIcon(icon: \.takePhotoSolid, style: .default)
Text(L10n.screenQrCodeLoginScanningStateTitle)
.foregroundColor(.compound.textPrimary)
@@ -256,7 +256,7 @@ struct QRCodeLoginScreen: View {
switch errorState {
case .noCameraPermission:
VStack(spacing: 16) {
HeroImage(icon: \.takePhotoSolid, style: .subtle)
BigIcon(icon: \.takePhotoSolid, style: .default)
VStack(spacing: 8) {
Text(L10n.screenQrCodeLoginNoCameraPermissionStateTitle)
@@ -273,7 +273,7 @@ struct QRCodeLoginScreen: View {
case .connectionNotSecure:
VStack(spacing: 40) {
VStack(spacing: 16) {
HeroImage(icon: \.error, style: .criticalOnSecondary)
BigIcon(icon: \.error, style: .alert)
VStack(spacing: 8) {
Text(L10n.screenQrCodeLoginConnectionNoteSecureStateTitle)
@@ -339,7 +339,7 @@ struct QRCodeLoginScreen: View {
}
VStack(spacing: 16) {
HeroImage(icon: \.error, style: .criticalOnSecondary)
BigIcon(icon: \.error, style: .alert)
VStack(spacing: 8) {
Text(title)
@@ -38,7 +38,7 @@ struct ResolveVerifiedUserSendFailureScreen: View {
var header: some View {
VStack(spacing: 8) {
HeroImage(icon: \.error, style: .critical)
BigIcon(icon: \.error, style: .alertSolid)
.padding(.bottom, 8)
Text(context.viewState.title)
@@ -40,7 +40,7 @@ struct SecureBackupKeyBackupScreen: View {
private var disableBackupSection: some View {
VStack(spacing: 16) {
HeroImage(icon: \.keyOffSolid)
BigIcon(icon: \.keyOffSolid)
Text(L10n.screenKeyBackupDisableTitle)
.foregroundColor(.compound.textPrimary)
@@ -15,7 +15,7 @@ struct SecureBackupLogoutConfirmationScreen: View {
var body: some View {
FullscreenDialog {
VStack(spacing: 16) {
HeroImage(icon: \.keyOffSolid)
BigIcon(icon: \.keyOffSolid)
content
}
.padding()
@@ -53,7 +53,7 @@ struct SecureBackupRecoveryKeyScreen: View {
private var header: some View {
VStack(spacing: 16) {
HeroImage(icon: \.keySolid)
BigIcon(icon: \.keySolid)
Text(context.viewState.title)
.foregroundColor(.compound.textPrimary)