/* * Atoll (DynamicIsland) * Copyright (C) 2024-2026 Atoll Contributors * * Originally from boring.notch project * Modified and adapted for Atoll (DynamicIsland) * See NOTICE for details. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import SwiftUI import SwiftUIIntrospect struct WelcomeView: View { var onGetStarted: (() -> Void)? = nil var body: some View { ZStack(alignment: .top) { ZStack { Image("spotlight") .resizable() .aspectRatio(contentMode: .fit) .padding(.bottom) .blur(radius: 3) .offset(y: -5) .background(SparkleView().opacity(0.6)) VStack(spacing: 8) { Image("logo2") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 100, height: 100) .padding(.bottom, 8) Text("Atoll") .font(.system(.largeTitle, design: .default)) .fontWeight(.semibold) Text("Welcome") .font(.title) .foregroundStyle(.secondary) .padding(.bottom, 30) if false { Text("PRO") .font(.system(size: 18, design: .rounded)) .fontWeight(.bold) .foregroundStyle(.white) .padding(.horizontal, 12) .padding(.vertical, 3) .background( Capsule() .fill(LinearGradient(colors: [.white.opacity(0.7), .white.opacity(0.3)], startPoint: .topLeading, endPoint: .bottomTrailing)) .strokeBorder(LinearGradient(stops: [.init(color: .white.opacity(0.7), location: 0.3), .init(color: .clear, location: 0.6)], startPoint: .topLeading, endPoint: .bottomTrailing)) .blendMode(.overlay) ) .padding(.bottom, 30) } Button { onGetStarted?() } label: { Text("Get started") .padding(.horizontal, 20) .padding(.vertical, 6) } .buttonStyle(BorderedProminentButtonStyle()) // Privacy Policy Link Button(action: { if let url = URL(string: "https://ebullioscopic.github.io/DynamicIsland/privacy-policy") { NSWorkspace.shared.open(url) } }) { Text("Privacy Policy") .font(.caption) .foregroundColor(.secondary) } .buttonStyle(.plain) .padding(.top, 8) } .padding(.top) } Image("ebullioscopic") .resizable() .aspectRatio(contentMode: .fit) .frame(height: 22) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom) .padding() .padding(.bottom, 36) .blendMode(.overlay) } .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) .ignoresSafeArea() .background { VisualEffectView(material: .hudWindow, blendingMode: .behindWindow) .ignoresSafeArea() } } } #Preview { WelcomeView() }