diff --git a/punchnet/Views/Login/LoginView.swift b/punchnet/Views/Login/LoginView.swift index 6a5ea6b..788fe3d 100644 --- a/punchnet/Views/Login/LoginView.swift +++ b/punchnet/Views/Login/LoginView.swift @@ -63,6 +63,8 @@ struct LoginView: View { Spacer() + + // 底部页脚 HStack(spacing: 4) { Circle() @@ -101,12 +103,21 @@ struct LoginAccountView: View { VStack(alignment: .trailing, spacing: 4) { CustomSecureField(title: "密码", text: $password, icon: "lock.fill") - Button("忘记密码?") { - openWindow(id: "resetPassword") + HStack { + Button("注册") { + openWindow(id: "register") + } + .buttonStyle(.link) + .font(.system(size: 11)) + .foregroundColor(.secondary) + + Button("忘记密码?") { + openWindow(id: "resetPassword") + } + .buttonStyle(.link) + .font(.system(size: 11)) + .foregroundColor(.secondary) } - .buttonStyle(.link) - .font(.system(size: 11)) - .foregroundColor(.secondary) } } .frame(width: 280) diff --git a/punchnet/punchnetApp.swift b/punchnet/punchnetApp.swift index 6233a21..25eb6c4 100644 --- a/punchnet/punchnetApp.swift +++ b/punchnet/punchnetApp.swift @@ -55,15 +55,15 @@ struct punchnetApp: App { .environment(self.appContext) .environment(self.userContext) } - .commands { - CommandGroup(replacing: .appInfo) { - Button { - openWindow(id: "abortPunchnet") - } label: { - Text("About Punchnet") - } - } - } +// .commands { +// CommandGroup(replacing: .appInfo) { +// Button { +// openWindow(id: "abortPunchnet") +// } label: { +// Text("About Punchnet") +// } +// } +// } .windowResizability(.contentSize) .windowToolbarStyle(.unified) .defaultPosition(.center) @@ -72,24 +72,27 @@ struct punchnetApp: App { SettingsView() .environment(self.userContext) .environment(self.appContext) + .frame(width: 750, height: 500) } - //.defaultSize(width: 800, height: 500) + .windowResizability(.contentSize) .defaultPosition(.center) Window("重置密码", id: "resetPassword") { ResetPasswordRootView() .environment(self.userContext) .environment(self.appContext) + .frame(width: 750, height: 500) } - .defaultSize(width: 800, height: 500) + .windowResizability(.contentSize) .defaultPosition(.center) Window("注册", id: "register") { - ResetPasswordRootView() + RegisterRootView() .environment(self.userContext) .environment(self.appContext) + .frame(width: 750, height: 500) } - .defaultSize(width: 800, height: 500) + .windowResizability(.contentSize) .defaultPosition(.center) MenuBarExtra("punchnet", image: "logo_32") {