Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ enum NavigationCatalog {
id: "media", title: "Media", symbolName: "play.rectangle.on.rectangle",
band: .suite(.media), isSuiteLanding: true,
expansionKey: SuiteExpansion.key(for: .media)),
SidebarPage(
id: "mediaToolkit", title: "Media Toolkit", symbolName: "photo.stack",
band: .suite(.media), abilityIDs: ["mediaToolkit"], parentID: "media"),
SidebarPage(
id: "music", title: "Music", symbolName: "music.note", band: .suite(.media),
abilityIDs: ["music"], parentID: "media"),
Expand Down Expand Up @@ -269,7 +272,7 @@ enum MainDestination: String, CaseIterable, Identifiable {
case appMaintenance
case system, runningApps
case desk
case media, music, calendar
case media, music, mediaToolkit, calendar
case data, database, attention, seoAudit
case extensions, settings, about

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct PageContent: View {
case .runningApps: SystemPage()
case .desk: SuiteLandingPage(suite: SuiteRegistry.suite(.desk))
case .media: SuiteLandingPage(suite: SuiteRegistry.suite(.media))
case .mediaToolkit: MediaToolkitPage()
case .music: MusicPage()
case .calendar: CalendarPage()
case .data: SuiteLandingPage(suite: SuiteRegistry.suite(.data))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct ExtensionPreview: View {
case "clipboard": clipboardPreview(phase: phase)
case "keystrokeHighlight": keystrokeHighlightPreview(phase: phase)
case "music": musicPreview(animating: animating)
case "mediaToolkit": mediaToolkitPreview(phase: phase)
case "focusDim": focusDimPreview(phase: phase)
case "presenter": presenterPreview(phase: phase)
case "colorPicker": colorPickerPreview(phase: phase)
Expand All @@ -48,6 +49,33 @@ struct ExtensionPreview: View {
}
}

private func mediaToolkitPreview(phase: Double) -> some View {
let progress = CGFloat(0.42 + (sin(phase * 1.8) + 1) * 0.22)
return VStack(alignment: .leading, spacing: UIScale.pt(8)) {
HStack(spacing: UIScale.pt(7)) {
ForEach(["photo", "photo.on.rectangle", "film"], id: \.self) { icon in
RoundedRectangle(cornerRadius: UIScale.pt(5))
.fill(DashSkin.paper2(dark))
.overlay {
Image(systemName: icon)
.font(.system(size: UIScale.pt(9)))
.foregroundStyle(DashSkin.inkFaint(dark))
}
.frame(width: UIScale.pt(30), height: UIScale.pt(25))
}
}
GeometryReader { proxy in
ZStack(alignment: .leading) {
Capsule().fill(DashSkin.lineStrong(dark))
Capsule().fill(DashSkin.accent(dark)).frame(width: proxy.size.width * progress)
}
}
.frame(height: UIScale.pt(5))
}
.padding(.horizontal, UIScale.pt(15))
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
}

private func usagePreview(phase: Double) -> some View {
let fill = CGFloat(0.48 + sin(phase * 1.7) * 0.2)
return VStack(alignment: .leading, spacing: UIScale.pt(6)) {
Expand Down
Loading
Loading