mirror of
https://github.com/wibus-wee/InjectGUI.git
synced 2025-11-25 19:37:33 +08:00
feat: WelcomeView
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
38877A3A2C4A730F009F5910 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38877A392C4A730F009F5910 /* Constants.swift */; };
|
||||
38877A3D2C4A9EB7009F5910 /* SetupApplicationSupportDirectory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38877A3C2C4A9EB7009F5910 /* SetupApplicationSupportDirectory.swift */; };
|
||||
38BC1F532C4B587A00C3B60E /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F522C4B587900C3B60E /* SidebarView.swift */; };
|
||||
38BC1F552C4B622500C3B60E /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F542C4B622500C3B60E /* WelcomeView.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -36,6 +37,7 @@
|
||||
38877A392C4A730F009F5910 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||
38877A3C2C4A9EB7009F5910 /* SetupApplicationSupportDirectory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetupApplicationSupportDirectory.swift; sourceTree = "<group>"; };
|
||||
38BC1F522C4B587900C3B60E /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
|
||||
38BC1F542C4B622500C3B60E /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -103,6 +105,7 @@
|
||||
children = (
|
||||
38877A1E2C4A6F83009F5910 /* ContentView.swift */,
|
||||
38BC1F522C4B587900C3B60E /* SidebarView.swift */,
|
||||
38BC1F542C4B622500C3B60E /* WelcomeView.swift */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -209,6 +212,7 @@
|
||||
38877A372C4A7294009F5910 /* Configuration.swift in Sources */,
|
||||
38877A302C4A70DB009F5910 /* SoftwareManager.swift in Sources */,
|
||||
38877A332C4A7222009F5910 /* PublishedStorage.swift in Sources */,
|
||||
38BC1F552C4B622500C3B60E /* WelcomeView.swift in Sources */,
|
||||
38877A2E2C4A6FFA009F5910 /* InjectConfiguration.swift in Sources */,
|
||||
38BC1F532C4B587A00C3B60E /* SidebarView.swift in Sources */,
|
||||
38877A352C4A7254009F5910 /* ViewKit.swift in Sources */,
|
||||
|
||||
@@ -14,9 +14,9 @@ struct ContentView: View {
|
||||
Group {
|
||||
SidebarView()
|
||||
}
|
||||
// .frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
// .listStyle(.sidebar)
|
||||
.navigationTitle(Constants.appName)
|
||||
|
||||
WelcomeView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
44
InjectGUI/View/WelcomeView.swift
Normal file
44
InjectGUI/View/WelcomeView.swift
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// WelcomeView.swift
|
||||
// InjectGUI
|
||||
//
|
||||
// Created by wibus on 2024/7/20.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct WelcomeView: View {
|
||||
|
||||
var version: String {
|
||||
var ret = "Version: " +
|
||||
(Constants.appVersion)
|
||||
+ " Build: " +
|
||||
(Constants.appBuildVersion)
|
||||
#if DEBUG
|
||||
ret = "👾 \(ret) 👾"
|
||||
#endif
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
VStack(spacing: 4) {
|
||||
Text("Welcome to InjectGUI")
|
||||
.font(.system(.title, design: .rounded, weight: .black))
|
||||
Text("By wibus. Based on Qiuchenly/InjectLib")
|
||||
.font(.system(.subheadline, design: .rounded))
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
Spacer().frame(height: 24)
|
||||
}
|
||||
VStack {
|
||||
Spacer()
|
||||
Text(version)
|
||||
.font(.system(size: 12, weight: .semibold, design: .rounded))
|
||||
.opacity(0.5)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user