Use preview macro

This commit is contained in:
Peter Steinberger 2025-06-24 02:24:37 +02:00
parent 10e4f97924
commit 892aa4a2a1
7 changed files with 26 additions and 40 deletions

View file

@ -119,10 +119,8 @@ struct TailscaleLink: View {
// MARK: - Preview
struct AccessDashboardPageView_Previews: PreviewProvider {
static var previews: some View {
AccessDashboardPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("Access Dashboard Page") {
AccessDashboardPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -104,10 +104,8 @@ struct ProtectDashboardPageView: View {
// MARK: - Preview
struct ProtectDashboardPageView_Previews: PreviewProvider {
static var previews: some View {
ProtectDashboardPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("Protect Dashboard Page") {
ProtectDashboardPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -122,10 +122,8 @@ struct RequestPermissionsPageView: View {
// MARK: - Preview
struct RequestPermissionsPageView_Previews: PreviewProvider {
static var previews: some View {
RequestPermissionsPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("Request Permissions Page") {
RequestPermissionsPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -147,10 +147,8 @@ struct SelectTerminalPageView: View {
// MARK: - Preview
struct SelectTerminalPageView_Previews: PreviewProvider {
static var previews: some View {
SelectTerminalPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("Select Terminal Page") {
SelectTerminalPageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -94,10 +94,8 @@ struct VTCommandPageView: View {
// MARK: - Preview
struct VTCommandPageView_Previews: PreviewProvider {
static var previews: some View {
VTCommandPageView(cliInstaller: CLIInstaller())
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("VT Command Page") {
VTCommandPageView(cliInstaller: CLIInstaller())
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -50,10 +50,8 @@ struct WelcomePageView: View {
// MARK: - Preview
struct WelcomePageView_Previews: PreviewProvider {
static var previews: some View {
WelcomePageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}
#Preview("Welcome Page") {
WelcomePageView()
.frame(width: 640, height: 480)
.background(Color(NSColor.windowBackgroundColor))
}

View file

@ -183,8 +183,6 @@ struct WelcomeView: View {
// MARK: - Preview
struct WelcomeView_Previews: PreviewProvider {
static var previews: some View {
WelcomeView()
}
#Preview("Welcome View") {
WelcomeView()
}