init: init proj
This commit is contained in:
36
DDYSClient/App/DDYSClientApp.swift
Normal file
36
DDYSClient/App/DDYSClientApp.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct DDYSClientApp: App {
|
||||
init() {
|
||||
CookieManager.shared.applyCookies()
|
||||
#if os(macOS)
|
||||
ProcessInfo.processInfo.setValue("低端影视", forKey: "processName")
|
||||
#endif
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
#if os(macOS)
|
||||
.defaultSize(width: 1100, height: 700)
|
||||
#endif
|
||||
|
||||
#if os(macOS)
|
||||
WindowGroup(for: VideoPlayerData.self) { $data in
|
||||
if let data {
|
||||
VideoPlayerView(
|
||||
url: data.url,
|
||||
title: data.title,
|
||||
episodeName: data.episodeName,
|
||||
contentId: data.contentId,
|
||||
episodeId: data.episodeId
|
||||
)
|
||||
.navigationTitle(data.windowTitle)
|
||||
}
|
||||
}
|
||||
.defaultSize(width: 960, height: 600)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user