@@ -17,25 +17,33 @@ struct StatusItemView: View {
1717 @Default ( . viewMode) var viewMode
1818
1919 var body : some View {
20- if viewMode == . week {
21- HStack ( alignment: . top, spacing: borders ? 1 : 0 ) {
22- ForEach ( viewModel. contributions, id: \. self) { week in
23- VStack ( alignment: . leading, spacing: borders ? 1 : 0 ) {
24- ForEach ( week. contributionDays, id: \. date) { day in
25- Rectangle ( )
26- . fill ( Theme . themes [ theme] ![ day. contributionLevel] !. opacity ( day. contributionLevel == . NONE && !transparency ? 0.2 : 1 ) )
27- . frame ( width: borders ? 2 : 3 , height: borders ? 2 : 3 )
20+
21+ if viewModel. contributions. first? . contributionDays. isEmpty ?? false {
22+ RoundedRectangle ( cornerRadius: 4 )
23+ . fill ( Theme . themes [ theme] ![ . SECOND_QUARTILE] !. opacity ( 1 ) )
24+ . frame ( width: 16 , height: 16 )
25+ }
26+ else {
27+ if viewMode == . week {
28+ HStack ( alignment: . top, spacing: borders ? 1 : 0 ) {
29+ ForEach ( viewModel. contributions, id: \. self) { week in
30+ VStack ( alignment: . leading, spacing: borders ? 1 : 0 ) {
31+ ForEach ( week. contributionDays, id: \. date) { day in
32+ Rectangle ( )
33+ . fill ( Theme . themes [ theme] ![ day. contributionLevel] !. opacity ( day. contributionLevel == . NONE && !transparency ? 0.2 : 1 ) )
34+ . frame ( width: borders ? 2 : 3 , height: borders ? 2 : 3 )
35+ }
2836 }
2937 }
3038 }
31- }
32- } else {
33- HStack ( spacing : 1 ) {
34- ForEach ( viewModel . contributions , id: \. self ) { week in
35- ForEach ( week . contributionDays , id : \ . date ) { day in
36- RoundedRectangle ( cornerRadius : 4 )
37- . fill ( Theme . themes [ theme ] ! [ day . contributionLevel ] ! . opacity ( day . contributionLevel == . NONE && !transparency ? 0.2 : 1 ) )
38- . frame ( width : 16 , height : 16 )
39+ } else {
40+ HStack ( spacing : 1 ) {
41+ ForEach ( viewModel . contributions , id : \ . self ) { week in
42+ ForEach ( week . contributionDays , id: \. date ) { day in
43+ RoundedRectangle ( cornerRadius : 4 )
44+ . fill ( Theme . themes [ theme ] ! [ day . contributionLevel ] ! . opacity ( day . contributionLevel == . NONE && !transparency ? 0.2 : 1 ) )
45+ . frame ( width : 16 , height : 16 )
46+ }
3947 }
4048 }
4149 }
0 commit comments