macOS widgets
This commit is contained in:
parent
28d4ad8af3
commit
a1fa7a9f73
|
|
@ -290,11 +290,14 @@ struct DashboardWidgetEntryView : View {
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
var entry: Provider.Entry
|
var entry: Provider.Entry
|
||||||
|
|
||||||
|
var accentColor: Color {
|
||||||
|
let companyId = entry.configuration.company?.identifier ?? ""
|
||||||
|
return Color(hex: (entry.widgetData?.companies[companyId]!.accentColor)!)
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
//Rectangle().fill(Color(hex: (entry.widgetData?.companies[entry.configuration.company?.identifier ?? ""]!.accentColor)!))
|
Rectangle().fill(accentColor)
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
|
|
@ -304,7 +307,7 @@ struct DashboardWidgetEntryView : View {
|
||||||
.bold()
|
.bold()
|
||||||
.lineLimit(2)
|
.lineLimit(2)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
//.foregroundColor(Color(hex: (entry.widgetData?.companies[(entry.configuration.company?.identifier)!]!.accentColor)!))
|
.foregroundColor(accentColor)
|
||||||
Text(entry.value)
|
Text(entry.value)
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.privacySensitive()
|
.privacySensitive()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue