mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
🔥 Remove unused ProgressWindowView
This commit is contained in:
@ -590,14 +590,6 @@
|
||||
C48DDD0E29C75C9E00D032D9 /* BlockingOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C48DDD0C29C75C9E00D032D9 /* BlockingOverlayView.swift */; };
|
||||
C48DDD0F29C75C9E00D032D9 /* BlockingOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C48DDD0C29C75C9E00D032D9 /* BlockingOverlayView.swift */; };
|
||||
C48DDD1029C75C9E00D032D9 /* BlockingOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C48DDD0C29C75C9E00D032D9 /* BlockingOverlayView.swift */; };
|
||||
C490E3A729BC940D006D2DE6 /* ProgressWindowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */; };
|
||||
C490E3AA29BC9B3E006D2DE6 /* ProgressViewSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */; };
|
||||
C490E3B029BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */; };
|
||||
C490E3B129BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */; };
|
||||
C490E3B229BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */; };
|
||||
C490E3B329BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */; };
|
||||
C490E3B429BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */; };
|
||||
C490E3B529BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */; };
|
||||
C490E3B629BCA367006D2DE6 /* App+BrewWatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C49EAA5629B1689200AB28FC /* App+BrewWatch.swift */; };
|
||||
C490E3B829BCA367006D2DE6 /* App+BrewWatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C49EAA5629B1689200AB28FC /* App+BrewWatch.swift */; };
|
||||
C490E3B929BCA368006D2DE6 /* App+BrewWatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C49EAA5629B1689200AB28FC /* App+BrewWatch.swift */; };
|
||||
@ -1030,8 +1022,6 @@
|
||||
C48D6C6F279CD2AC00F26D7E /* VersionNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionNumber.swift; sourceTree = "<group>"; };
|
||||
C48D6C73279CD3E400F26D7E /* PhpVersionNumberTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhpVersionNumberTest.swift; sourceTree = "<group>"; };
|
||||
C48DDD0C29C75C9E00D032D9 /* BlockingOverlayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockingOverlayView.swift; sourceTree = "<group>"; };
|
||||
C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressWindowView.swift; sourceTree = "<group>"; };
|
||||
C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressViewSubject.swift; sourceTree = "<group>"; };
|
||||
C4927F0A27B2DFC200C55AFD /* Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = "<group>"; };
|
||||
C4930849279F331F009C240B /* AddSiteVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSiteVC.swift; sourceTree = "<group>"; };
|
||||
C495F5AE28A42E080087F70A /* EnvironmentCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentCheck.swift; sourceTree = "<group>"; };
|
||||
@ -1789,15 +1779,6 @@
|
||||
path = "PHP Version";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C490E3A329BC92E6006D2DE6 /* Progress */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C490E3A629BC940D006D2DE6 /* ProgressWindowView.swift */,
|
||||
C490E3A929BC9B3E006D2DE6 /* ProgressViewSubject.swift */,
|
||||
);
|
||||
path = Progress;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C4AF9F6A275445C900D44ED0 /* Valet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -2070,7 +2051,6 @@
|
||||
children = (
|
||||
C4B609182853AAA700C95265 /* Domains */,
|
||||
C4B609172853AA9E00C95265 /* Menu */,
|
||||
C490E3A329BC92E6006D2DE6 /* Progress */,
|
||||
C4B609162853AA9A00C95265 /* Common */,
|
||||
);
|
||||
path = SwiftUI;
|
||||
@ -2430,7 +2410,6 @@
|
||||
C4B79EC629CA474200A483EE /* FakeCommand.swift in Sources */,
|
||||
C4ACA38F25C754C100060C66 /* PhpExtension.swift in Sources */,
|
||||
C47DF1AF299D5A3B0007055D /* LoginItemManager.swift in Sources */,
|
||||
C490E3AA29BC9B3E006D2DE6 /* ProgressViewSubject.swift in Sources */,
|
||||
C4D3661A291173EA006BD146 /* DictionaryExtension.swift in Sources */,
|
||||
C4C8900728F0E3EF00CE5E97 /* ActiveFileSystem.swift in Sources */,
|
||||
C409349D298EE8E900D25014 /* AppUpdater.swift in Sources */,
|
||||
@ -2581,7 +2560,6 @@
|
||||
C4FACE83288F1F9700FC478F /* OnboardingWindowController.swift in Sources */,
|
||||
C4080FFA27BD956700BF2C6B /* BetterAlertVC.swift in Sources */,
|
||||
C43FDBE929A932B0003D85EC /* PhpConfigChecker.swift in Sources */,
|
||||
C490E3A729BC940D006D2DE6 /* ProgressWindowView.swift in Sources */,
|
||||
C4BF56AB2949381100379603 /* FakeValetInteractor.swift in Sources */,
|
||||
C4B5635E276AB09000F12CCB /* VersionExtractor.swift in Sources */,
|
||||
C451AFF62969E40F0078E617 /* HelpButton.swift in Sources */,
|
||||
@ -2680,7 +2658,6 @@
|
||||
C471E85E28F9BB650021E251 /* DomainListVC+ContextMenu.swift in Sources */,
|
||||
C4E2E86628FC2F1B003B070C /* XCPMApplication.swift in Sources */,
|
||||
C471E85F28F9BB650021E251 /* DomainListVC+Actions.swift in Sources */,
|
||||
C490E3B429BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */,
|
||||
C4D5576629C77CC5001A44CD /* PhpVersionManagerWindowController.swift in Sources */,
|
||||
C4ACE9E329F84EDD00110766 /* PhpGuard.swift in Sources */,
|
||||
C471E86028F9BB650021E251 /* SelectionVC.swift in Sources */,
|
||||
@ -2712,7 +2689,6 @@
|
||||
C471E87028F9BB650021E251 /* GlobalKeybindPreference.swift in Sources */,
|
||||
C471E87228F9BB650021E251 /* CheckboxPreferenceView.swift in Sources */,
|
||||
C471E87428F9BB650021E251 /* SelectPreferenceView.swift in Sources */,
|
||||
C490E3B029BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */,
|
||||
C471E87628F9BB650021E251 /* HotkeyPreferenceView.swift in Sources */,
|
||||
C471E87728F9BB650021E251 /* Keys.swift in Sources */,
|
||||
C471E87828F9BB650021E251 /* TerminalProgressWindowController.swift in Sources */,
|
||||
@ -2846,9 +2822,7 @@
|
||||
C471E8A328F9BB8F0021E251 /* AppDelegate+MenuOutlets.swift in Sources */,
|
||||
C4B79EB929CA387F00A483EE /* BrewPhpFormulaeHandler.swift in Sources */,
|
||||
C471E8A428F9BB8F0021E251 /* AppDelegate+Notifications.swift in Sources */,
|
||||
C490E3B329BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */,
|
||||
C489E0BE2A220A4200323F5E /* FakeBrewFormulaeHandler.swift in Sources */,
|
||||
C490E3B229BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */,
|
||||
C471E8A528F9BB8F0021E251 /* AppDelegate+InterApp.swift in Sources */,
|
||||
C471E8A628F9BB8F0021E251 /* App.swift in Sources */,
|
||||
C471E8A728F9BB8F0021E251 /* App+ActivationPolicy.swift in Sources */,
|
||||
@ -3071,7 +3045,6 @@
|
||||
C4AF9F7B2754499000D44ED0 /* Valet.swift in Sources */,
|
||||
C4C1019C27C65C6F001FACC2 /* Process.swift in Sources */,
|
||||
C451AFF72969E40F0078E617 /* HelpButton.swift in Sources */,
|
||||
C490E3B129BC9FE8006D2DE6 /* ProgressViewSubject.swift in Sources */,
|
||||
C47DF1B0299D5A3B0007055D /* LoginItemManager.swift in Sources */,
|
||||
C4F780C025D80B6E000DBC97 /* Startup.swift in Sources */,
|
||||
C45B914A295607F400F4EC78 /* Service.swift in Sources */,
|
||||
@ -3130,7 +3103,6 @@
|
||||
C415D3E92770F692005EF286 /* AppDelegate+InterApp.swift in Sources */,
|
||||
C4E49DEE28F764A00026AC4E /* TestableCommand.swift in Sources */,
|
||||
C4AF9F78275447F100D44ED0 /* ValetConfigurationTest.swift in Sources */,
|
||||
C490E3B529BC9FEA006D2DE6 /* ProgressWindowView.swift in Sources */,
|
||||
C4611E612AEAD3110010BE24 /* ByteLimitView.swift in Sources */,
|
||||
C40175B92903108900763A68 /* ValetInteractor.swift in Sources */,
|
||||
C4CE3BBC27B324250086CA49 /* ComposerWindow.swift in Sources */,
|
||||
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// ProgressViewSubject.swift
|
||||
// PHP Monitor
|
||||
//
|
||||
// Created by Nico Verbruggen on 11/03/2023.
|
||||
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
class ProgressViewSubject: ObservableObject {
|
||||
@Published var title: String
|
||||
@Published var description: String?
|
||||
@Published var progress: Double
|
||||
|
||||
init(title: String, description: String) {
|
||||
self.title = title
|
||||
self.description = description
|
||||
self.progress = 0
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
//
|
||||
// ProgressWindowView.swift
|
||||
// PHP Monitor
|
||||
//
|
||||
// Created by Nico Verbruggen on 11/03/2023.
|
||||
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ProgressWindowView: View {
|
||||
@ObservedObject var subject: ProgressViewSubject
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
VStack(alignment: .leading) {
|
||||
Text(subject.title)
|
||||
.font(.system(size: 14))
|
||||
.bold()
|
||||
if subject.description != nil {
|
||||
Text(subject.description!)
|
||||
.font(.system(size: 13))
|
||||
}
|
||||
}
|
||||
.padding(.leading, 20)
|
||||
.padding(.top, 12)
|
||||
ProgressView(value: subject.progress)
|
||||
.padding(.top, 0)
|
||||
.padding(.bottom, 12)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor static func display(_ subject: ProgressViewSubject) async -> NSWindowController {
|
||||
let view = ProgressWindowView(subject: subject)
|
||||
|
||||
let window = NSWindow(
|
||||
contentRect: NSRect(x: 0, y: 0, width: 420, height: 240),
|
||||
styleMask: [.titled, .closable, .utilityWindow],
|
||||
backing: .buffered,
|
||||
defer: false
|
||||
)
|
||||
|
||||
window.title = ""
|
||||
window.titlebarAppearsTransparent = true
|
||||
window.contentView = NSHostingView(rootView: view)
|
||||
let controller = NSWindowController(window: window)
|
||||
controller.showWindow(nil)
|
||||
controller.positionWindowInTopRightCorner()
|
||||
controller.window?.makeKeyAndOrderFront(self)
|
||||
// NSApp.activate(ignoringOtherApps: true)
|
||||
return controller
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ProgressWindowView(
|
||||
subject: ProgressViewSubject(
|
||||
title: "Long running task",
|
||||
description: "Please be patient"
|
||||
)
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user