Enhance download notifications and settings; add support for live activities
- Updated notification body to use proper German quotation marks for download failure alerts. - Refactored audio interruption handling in PlayerEngine to utilize MainActor.assumeIsolated for better performance. - Introduced nonisolated properties for support and downloads directories in ProgressSyncManager. - Improved FullHistoryView and MainView with additional toolbar items and alerts for download failures. - Added new toggles in SettingsView for parallel downloads and mobile data usage. - Created new color assets for the DownloadWidgetExtension and updated widget appearance. - Implemented Info.plist for DownloadWidgetExtension to support widget functionality. - Enabled live activities support in iOS Info.plist.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.337",
|
||||
"green" : "0.847",
|
||||
"red" : "0.298"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.094",
|
||||
"green" : "0.196",
|
||||
"red" : "0.078"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ struct DownloadLiveActivityWidget: Widget {
|
||||
// Expanded region shown when the user long-presses the island
|
||||
DynamicIslandExpandedRegion(.leading) {
|
||||
Image(systemName: "arrow.down.circle.fill")
|
||||
.foregroundStyle(.blue)
|
||||
.foregroundStyle(.green)
|
||||
.font(.title2)
|
||||
}
|
||||
DynamicIslandExpandedRegion(.center) {
|
||||
@@ -27,29 +27,32 @@ struct DownloadLiveActivityWidget: Widget {
|
||||
DynamicIslandExpandedRegion(.bottom) {
|
||||
VStack(spacing: 4) {
|
||||
ProgressView(value: context.state.progress)
|
||||
.tint(.blue)
|
||||
.tint(.green)
|
||||
HStack {
|
||||
Text(bytesFormatted(context.state.bytesDownloaded))
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.secondary)
|
||||
.contentTransition(.numericText())
|
||||
Spacer()
|
||||
Text(percentFormatted(context.state.progress))
|
||||
.font(.caption2.bold())
|
||||
.monospacedDigit()
|
||||
.contentTransition(.numericText())
|
||||
}
|
||||
}
|
||||
}
|
||||
} compactLeading: {
|
||||
Image(systemName: "arrow.down.circle.fill")
|
||||
.foregroundStyle(.blue)
|
||||
.foregroundStyle(.green)
|
||||
.font(.caption)
|
||||
} compactTrailing: {
|
||||
Text(percentFormatted(context.state.progress))
|
||||
.font(.caption2.bold())
|
||||
.monospacedDigit()
|
||||
.contentTransition(.numericText())
|
||||
} minimal: {
|
||||
Image(systemName: "arrow.down.circle.fill")
|
||||
.foregroundStyle(.blue)
|
||||
.foregroundStyle(.green)
|
||||
.font(.caption2)
|
||||
}
|
||||
}
|
||||
@@ -65,7 +68,7 @@ struct DownloadLockScreenView: View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: "arrow.down.circle.fill")
|
||||
.foregroundStyle(.blue)
|
||||
.foregroundStyle(.green)
|
||||
Text(context.attributes.itemTitle)
|
||||
.font(.subheadline.bold())
|
||||
.lineLimit(1)
|
||||
@@ -73,12 +76,14 @@ struct DownloadLockScreenView: View {
|
||||
Text(percentFormatted(context.state.progress))
|
||||
.font(.subheadline.bold())
|
||||
.monospacedDigit()
|
||||
.contentTransition(.numericText())
|
||||
}
|
||||
ProgressView(value: context.state.progress)
|
||||
.tint(.blue)
|
||||
.tint(.green)
|
||||
Text(bytesFormatted(context.state.bytesDownloaded) + " heruntergeladen")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.contentTransition(.numericText())
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
11
ABS Client/DownloadWidgetExtension/Info.plist
Normal file
11
ABS Client/DownloadWidgetExtension/Info.plist
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.widgetkit-extension</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user