Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class AppSceneUrlHandlerModifierModel: ObservableObject {
return true
}

if urlWithScheme.host() == AppLinks.storeHost {
if urlWithScheme.host == AppLinks.storeHost {
return false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ struct SpaceHubView: View {
VStack(spacing: FeatureFlags.vaultBackToRoots ? 8 : 0) {
HomeUpdateSubmoduleView().padding(8)

if #available(iOS 17.0, *) {
} else {
UpdateAppBanner()
}

if #available(iOS 17.0, *) {
if FeatureFlags.anyAppBetaTip {
HomeAnyAppWidgetTipView()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import SwiftUI
import DesignKit

struct UpdateAppBanner: View {

@StateObject private var model = UpdateAppBannerModel()

var body: some View {
VStack(spacing: 12) {
Text(model.text)
}
.padding(16)
.background {
LinearGradient(
colors: [
Color(light: Color(hex: "#FEE7E0"), dark: Color(hex: "#74321E")),
Color(light: Color(hex: "#FFF6F3"), dark: Color(hex: "#4B251A"))
],
startPoint: .top,
endPoint: .bottom
)
}
.cornerRadius(16)
.padding(.horizontal, 16)
}
}

final class UpdateAppBannerModel: ObservableObject {

let text: AttributedString

init() {
var title = AttributedString("iOS 16 Support Ends Soon\n")
title.font = AnytypeFontBuilder.font(anytypeFont: .uxTitle2Regular).bold()

var description = AttributedString("We’re ending iOS 16 support to improve performance & features. Update to iOS 17+ to keep getting updates. Can’t upgrade and have a membership? ")
description.font = AnytypeFontBuilder.font(anytypeFont: .uxTitle2Regular)

var link = AttributedString("Request a refund.")
link.link = URL(string: "mailto:care@anytype.io")
link.underlineStyle = .single
link.font = AnytypeFontBuilder.font(anytypeFont: .uxTitle2Regular)

var text = title + description + link
text.foregroundColor = .Text.primary
self.text = text
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ enum AppIcon: CaseIterable {
case standart
case eggo

var avaliableIcons: [AppIcon] {
static var avaliableIcons: [AppIcon] {
#if DEBUG || RELEASE_NIGHTLY
[.smile, .standart, .eggo]
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct SettingsAppearanceView: View {
AnytypeText(Loc.applicationIcon, style: .caption1Medium)
.foregroundColor(.Text.secondary).padding(.bottom, 6)
HStack {
ForEach(AppIcon.allCases, id: \.self) { icon in
ForEach(AppIcon.avaliableIcons, id: \.self) { icon in
appIcon(icon)
}
}
Expand Down
Loading