~ Some rebase weirdness

This commit is contained in:
David Bureš 2025-12-01 14:42:50 +01:00
parent 99bbe6eea7
commit d1e1bf70f4
No known key found for this signature in database
6 changed files with 18 additions and 30 deletions

View File

@ -92,7 +92,8 @@ struct CorkApp: App
.environment(outdatedPackagesTracker)
.environment(topPackagesTracker)
.modelContainer(for: [
SavedTaggedPackage.self
SavedTaggedPackage.self,
ExcludedAdoptableApp.self
])
.task
{

View File

@ -93,9 +93,6 @@
}
}
}
},
"(%@)" : {
},
"%@" : {
"localizations" : {
@ -15591,6 +15588,9 @@
}
}
}
},
"adoptable-packages.excluded-label" : {
},
"adoptable-packages.excluded.label" : {
"comment" : "A label for the section that lists apps that are excluded from being adopted.",

View File

@ -63,23 +63,3 @@ struct PreviewPackageButtonWithCustomLabel: View
.keyboardShortcut("p", modifiers: [.command, .option])
}
}
struct PreviewPackageButtonWithCustomLabel: View
{
@Environment(\.openWindow) var openWindow: OpenWindowAction
let label: LocalizedStringKey
let packageToPreview: MinimalHomebrewPackage
var body: some View
{
Button
{
openWindow(value: packageToPreview)
} label: {
Text(label)
}
.keyboardShortcut("p", modifiers: [.command, .option])
}
}

View File

@ -64,6 +64,11 @@ struct AdoptablePackagesSection: View
{
adoptablePackagesList
}
DisclosureGroup("adoptable-packages.excluded-label")
{
excludedAdoptablePackagesList
}
}
}
.animation(.bouncy, value: brewPackagesTracker.adoptableApps.isEmpty)
@ -91,9 +96,11 @@ struct AdoptablePackagesSection: View
}
DisclosureGroup("adoptable-packages.label")
Button(role: .cancel)
{
adoptablePackagesList
}
Button(role: .cancel)
{
isShowingAdoptionWarning = false
} label: {
Text("action.cancel-and-disable-mass-adoption")
@ -286,7 +293,7 @@ struct AdoptablePackageListItem: View
Divider()
// ignoreAdoptableAppButton(appToIgnore: adoptableCask)
ignoreAdoptableAppButton(appToIgnore: adoptableCask)
}
}

View File

@ -51,8 +51,8 @@ public struct BrewPackage: Identifiable, Equatable, Hashable, Codable, Sendable,
public var id: UUID
public let name: String
let type: PackageType
var isTagged: Bool = false
public let type: PackageType
public var isTagged: Bool = false
public var isPinned: Bool
@ -284,7 +284,7 @@ public struct BrewPackage: Identifiable, Equatable, Hashable, Codable, Sendable,
}
}
func getSanitizedName() -> String
public func getSanitizedName() -> String
{
var packageNameWithoutTap: String
{ /// First, remove the tap name from the package name if it has it

View File

@ -71,7 +71,7 @@ public struct AppConstants: Sendable
do
{
let initializedModelContainer = try ModelContainer(for: SavedTaggedPackage.self, configurations: modelConfiguration)
let initializedModelContainer = try ModelContainer(for: SavedTaggedPackage.self, ExcludedAdoptableApp.self, configurations: modelConfiguration)
self.modelContainer = initializedModelContainer
}