Remove custom indicators
This commit is contained in:
parent
a05e9bee48
commit
a510d0d0c2
|
@ -8785,98 +8785,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"thirdparty.loaders.address" : {
|
|
||||||
"localizations" : {
|
|
||||||
"en" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "https://github.com/exyte/ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "https://github.com/exyte/ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eu" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "https://github.com/exyte/ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "https://github.com/exyte/ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pl" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "https://github.com/exyte/ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"thirdparty.loaders.description" : {
|
|
||||||
"comment" : "A number of preset loading indicators created with SwiftUI.",
|
|
||||||
"localizations" : {
|
|
||||||
"en" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "A number of preset loading indicators created with SwiftUI."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "needs_review",
|
|
||||||
"value" : "Una serie de indicadores de carga preestablecidos creados con SwiftUI."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pl" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "Szereg gotowych animacji ładowania utworzonych za pomocą SwiftUI."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"thirdparty.loaders.title" : {
|
|
||||||
"comment" : "Loaders section title",
|
|
||||||
"localizations" : {
|
|
||||||
"en" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eu" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pl" : {
|
|
||||||
"stringUnit" : {
|
|
||||||
"state" : "translated",
|
|
||||||
"value" : "ActivityIndicatorView"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"thirdParty.navigationBar.title" : {
|
"thirdParty.navigationBar.title" : {
|
||||||
"comment" : "Third party view.",
|
"comment" : "Third party view.",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
{
|
{
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
|
||||||
"identity" : "activityindicatorview",
|
|
||||||
"kind" : "remoteSourceControl",
|
|
||||||
"location" : "https://github.com/exyte/ActivityIndicatorView.git",
|
|
||||||
"state" : {
|
|
||||||
"revision" : "9970fd0bb7a05dad0b6566ae1f56937716686b24",
|
|
||||||
"version" : "1.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"identity" : "brightfutures",
|
"identity" : "brightfutures",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
|
|
|
@ -82,6 +82,7 @@ struct VernissageApp: App {
|
||||||
self.theme = newValue.colorScheme()
|
self.theme = newValue.colorScheme()
|
||||||
}
|
}
|
||||||
.onChange(of: applicationState.tintColor) { oldValue, newValue in
|
.onChange(of: applicationState.tintColor) { oldValue, newValue in
|
||||||
|
UIRefreshControl.appearance().tintColor = self.applicationState.tintColor.uiColor()
|
||||||
self.tintColor = newValue.color()
|
self.tintColor = newValue.color()
|
||||||
}
|
}
|
||||||
.onChange(of: applicationState.account) { oldValue, newValue in
|
.onChange(of: applicationState.account) { oldValue, newValue in
|
||||||
|
@ -108,6 +109,7 @@ struct VernissageApp: App {
|
||||||
private func onApplicationStart() async {
|
private func onApplicationStart() async {
|
||||||
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor.white.withAlphaComponent(0.7)
|
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor.white.withAlphaComponent(0.7)
|
||||||
UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.4)
|
UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.4)
|
||||||
|
UIRefreshControl.appearance().tintColor = self.applicationState.tintColor.uiColor()
|
||||||
|
|
||||||
// Configure TipKit.
|
// Configure TipKit.
|
||||||
try? Tips.configure([.displayFrequency(.daily), .datastoreLocation(.applicationDefault)])
|
try? Tips.configure([.displayFrequency(.daily), .datastoreLocation(.applicationDefault)])
|
||||||
|
|
|
@ -123,7 +123,9 @@ struct EditProfileView: View {
|
||||||
UserAvatar(accountAvatar: account.avatar, size: .large)
|
UserAvatar(accountAvatar: account.avatar, size: .large)
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadingIndicator(isVisible: $saveDisabled)
|
if saveDisabled {
|
||||||
|
LoadingIndicator()
|
||||||
|
}
|
||||||
|
|
||||||
BottomRight {
|
BottomRight {
|
||||||
Button {
|
Button {
|
||||||
|
|
|
@ -61,16 +61,6 @@ struct ThirdPartyView: View {
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("thirdparty.loaders.title") {
|
|
||||||
VStack(alignment: .leading) {
|
|
||||||
Link("thirdparty.loaders.address",
|
|
||||||
destination: URL(string: "https://github.com/exyte/ActivityIndicatorView")!)
|
|
||||||
.padding(.bottom, 4)
|
|
||||||
Text("thirdparty.loaders.description", comment: "A number of preset loading indicators created with SwiftUI.")
|
|
||||||
}
|
|
||||||
.font(.footnote)
|
|
||||||
}
|
|
||||||
|
|
||||||
Section("thirdparty.htmlstring.title") {
|
Section("thirdparty.htmlstring.title") {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Link("thirdparty.htmlstring.address",
|
Link("thirdparty.htmlstring.address",
|
||||||
|
|
|
@ -17,7 +17,6 @@ let package = Package(
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
// Dependencies declare other packages that this package depends on.
|
// Dependencies declare other packages that this package depends on.
|
||||||
.package(url: "https://github.com/exyte/ActivityIndicatorView.git", .upToNextMajor(from: "1.0.0")),
|
|
||||||
.package(url: "https://github.com/divadretlaw/EmojiText", .upToNextMajor(from: "2.6.0")),
|
.package(url: "https://github.com/divadretlaw/EmojiText", .upToNextMajor(from: "2.6.0")),
|
||||||
.package(url: "https://github.com/kean/Nuke", .upToNextMajor(from: "12.0.0")),
|
.package(url: "https://github.com/kean/Nuke", .upToNextMajor(from: "12.0.0")),
|
||||||
.package(name: "PixelfedKit", path: "../PixelfedKit"),
|
.package(name: "PixelfedKit", path: "../PixelfedKit"),
|
||||||
|
@ -31,7 +30,6 @@ let package = Package(
|
||||||
.target(
|
.target(
|
||||||
name: "WidgetsKit",
|
name: "WidgetsKit",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.product(name: "ActivityIndicatorView", package: "ActivityIndicatorView"),
|
|
||||||
.product(name: "Nuke", package: "Nuke"),
|
.product(name: "Nuke", package: "Nuke"),
|
||||||
.product(name: "NukeUI", package: "Nuke"),
|
.product(name: "NukeUI", package: "Nuke"),
|
||||||
.product(name: "EmojiText", package: "EmojiText"),
|
.product(name: "EmojiText", package: "EmojiText"),
|
||||||
|
|
|
@ -51,7 +51,7 @@ public struct ImageUploadView: View {
|
||||||
} else if photoAttachment.uploadedAttachment == nil {
|
} else if photoAttachment.uploadedAttachment == nil {
|
||||||
ZStack {
|
ZStack {
|
||||||
self.imageView(showAccessories: false, blur: true)
|
self.imageView(showAccessories: false, blur: true)
|
||||||
LoadingIndicator(isVisible: Binding.constant(true))
|
LoadingIndicator()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.imageView(showAccessories: true, blur: false)
|
self.imageView(showAccessories: true, blur: false)
|
||||||
|
|
|
@ -62,7 +62,7 @@ public struct PlaceSelectorView: View {
|
||||||
if self.showLoader {
|
if self.showLoader {
|
||||||
HStack(alignment: .center) {
|
HStack(alignment: .center) {
|
||||||
Spacer()
|
Spacer()
|
||||||
LoadingIndicator(isVisible: Binding.constant(true))
|
LoadingIndicator()
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public struct ActionButton<Label>: View where Label: View {
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private func withLoader() -> some View {
|
private func withLoader() -> some View {
|
||||||
if isDuringAction {
|
if isDuringAction {
|
||||||
LoadingIndicator(isVisible: .constant(true))
|
LoadingIndicator()
|
||||||
.transition(.opacity)
|
.transition(.opacity)
|
||||||
} else {
|
} else {
|
||||||
label()
|
label()
|
||||||
|
|
|
@ -25,7 +25,7 @@ public struct ActionMenu<Label: View, Content: View>: View {
|
||||||
content()
|
content()
|
||||||
} label: {
|
} label: {
|
||||||
if isDuringAction {
|
if isDuringAction {
|
||||||
LoadingIndicator(isVisible: .constant(true))
|
LoadingIndicator()
|
||||||
.transition(.opacity)
|
.transition(.opacity)
|
||||||
} else {
|
} else {
|
||||||
label()
|
label()
|
||||||
|
|
|
@ -5,26 +5,26 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import ActivityIndicatorView
|
|
||||||
import EnvironmentKit
|
import EnvironmentKit
|
||||||
|
|
||||||
public struct LoadingIndicator: View {
|
public struct LoadingIndicator: View {
|
||||||
@Environment(ApplicationState.self) var applicationState
|
@Environment(ApplicationState.self) var applicationState
|
||||||
@Binding var isVisible: Bool
|
|
||||||
|
|
||||||
public init(isVisible: Binding<Bool> = .constant(true)) {
|
private let controlSize: ControlSize
|
||||||
self._isVisible = isVisible
|
|
||||||
|
public init(controlSize: ControlSize = .regular) {
|
||||||
|
self.controlSize = controlSize
|
||||||
}
|
}
|
||||||
|
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
ActivityIndicatorView(isVisible: $isVisible, type: .equalizer(count: 5))
|
ProgressView()
|
||||||
.frame(width: 24.0, height: 16.0)
|
.tint(applicationState.tintColor.color())
|
||||||
.foregroundColor(applicationState.tintColor.color())
|
.controlSize(self.controlSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LoadingIndicator_Previews: PreviewProvider {
|
struct LoadingIndicator_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
LoadingIndicator(isVisible: .constant(true))
|
LoadingIndicator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue