Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit f37a3a5

Browse files
authored
Add UpdaterView
1 parent a43aa7b commit f37a3a5

3 files changed

Lines changed: 38 additions & 2 deletions

File tree

Sources/prostore/prostore.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ struct MainSidebarView: View {
2424
NavigationLink(value: SidebarItem.certificates) {
2525
Label("Certificates", systemImage: "key")
2626
}
27+
NavigationLink(value: SidebarItem.updater) {
28+
Label("Updater", systemImage: "square.and.arrow.down")
29+
}
2730
NavigationLink(value: SidebarItem.about) {
2831
Label("About", systemImage: "info.circle")
2932
}
@@ -65,6 +68,12 @@ struct MainSidebarView: View {
6568
.navigationTitle("About")
6669
.navigationBarTitleDisplayMode(.large)
6770
}
71+
case .updater:
72+
NavigationStack {
73+
UpdaterView()
74+
.navigationTitle("Updater")
75+
.navigationBarTitleDisplayMode(.large)
76+
}
6877
case nil:
6978
Text("Select a section!")
7079
}
@@ -74,6 +83,7 @@ struct MainSidebarView: View {
7483

7584
enum SidebarItem: Hashable {
7685
case signer
86+
case updater
7787
case certificates
7888
case apps
7989
case about
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import SwiftUI
2+
import WebKit
3+
4+
struct UpdaterView: View {
5+
var body: some View {
6+
UpdaterWebView(url: URL(string: "https://prostore.free.nf/update.html")!)
7+
.edgesIgnoringSafeArea(.all)
8+
}
9+
}
10+
11+
struct UpdaterWebView: UIViewRepresentable {
12+
let url: URL
13+
14+
func makeUIView(context: Context) -> WKWebView {
15+
let webView = WKWebView()
16+
let request = URLRequest(url: url)
17+
webView.load(request)
18+
return webView
19+
}
20+
21+
func updateUIView(_ uiView: WKWebView, context: Context) {
22+
// Reload if needed
23+
let request = URLRequest(url: url)
24+
uiView.load(request)
25+
}
26+
}

project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ targets:
3030
properties:
3131
CFBundleDisplayName: "ProStore"
3232
CFBundleName: "prostore"
33-
CFBundleVersion: "15"
34-
CFBundleShortVersionString: "0.7.0"
33+
CFBundleVersion: "16"
34+
CFBundleShortVersionString: "0.8.0"
3535
UILaunchStoryboardName: "LaunchScreen"
3636
NSPrincipalClass: "UIApplication"
3737
NSAppTransportSecurity:

0 commit comments

Comments
 (0)