File tree Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 77
77
}
78
78
79
79
.section-name {
80
- background-color : #343537 ;
80
+ background-color : var ( --section-name-background-color ) ;
81
81
border : 1px solid var (--border );
82
82
border-top : 0 ;
83
83
border-left : 0 ;
172
172
display : none ;
173
173
}
174
174
175
- @media (prefers-color-scheme: light) {
176
- .section-name {
177
- background-color : #eaeaea ;
178
- }
179
- }
180
-
181
175
@media (max-width : 450px ) {
182
176
.children {
183
177
padding : 5px ;
Original file line number Diff line number Diff line change 19
19
<WritingSection title =" Cache Status Overview" >
20
20
<div class =" statuses" >
21
21
{#await data .projects }
22
- <p >Loading projects cache...</ p >
22
+ <CacheStatus name = " Projects " loading / >
23
23
{:then projects }
24
24
<CacheStatus
25
25
name =" Projects"
28
28
/>
29
29
{/await }
30
30
{#await data .workouts }
31
- <p >Loading workouts cache...</ p >
31
+ <CacheStatus name = " Workouts " loading / >
32
32
{:then workouts }
33
33
<CacheStatus
34
34
name =" Workouts"
37
37
/>
38
38
{/await }
39
39
{#await data .music }
40
- <p >Loading music cache...</ p >
40
+ <CacheStatus name = " Music " loading / >
41
41
{:then music }
42
42
<CacheStatus
43
43
name =" Music"
46
46
/>
47
47
{/await }
48
48
{#await data .games }
49
- <p >Loading games cache...</ p >
49
+ <CacheStatus name = " Games " loading / >
50
50
{:then games }
51
51
<CacheStatus
52
52
name =" Games"
Original file line number Diff line number Diff line change 5
5
6
6
const {
7
7
name,
8
+ loading = false ,
8
9
updated,
9
10
updateFrequency
10
- }: { name: string ; updated? : Date ; updateFrequency: string } = $props ();
11
+ }: { name: string ; loading ? : boolean ; updated? : Date ; updateFrequency? : string } = $props ();
11
12
</script >
12
13
13
14
<Card padding =" 0" >
14
15
<div class =" header" >
15
16
<p class ="cache-name" >{name } Cache</p >
16
- {#if updated }
17
+ {#if loading }
18
+ <p class =" loading" >LOADING</p >
19
+ {:else if updated }
17
20
<p class =" online" >ONLINE</p >
18
21
{:else }
19
22
<p class =" offline" >OFFLINE</p >
26
29
<p >{updateFrequency }</p >
27
30
</div >
28
31
<div class =" updated" >
29
- {#if updated }
32
+ {#if loading }
33
+ Loading...
34
+ {:else if updated }
30
35
Updated <Since time ={updated } />
31
36
{:else }
32
37
Cache is currently offline
41
46
padding-top : 6px ;
42
47
font-family : ' Inter' ;
43
48
font-weight : 700 ;
44
- background-color : #343537 ;
49
+ background-color : var ( --section-name-background-color ) ;
45
50
box-shadow : inset 0px 0px 6px var (--box-shadow-color );
46
51
border : 1px solid var (--border );
47
52
border-top : 0 ;
57
62
}
58
63
59
64
.online ,
60
- .offline {
65
+ .offline ,
66
+ .loading {
61
67
font-family : ' IBM Plex Mono' ;
62
68
display : flex ;
63
69
align-items : center ;
69
75
border-bottom-left-radius : var (--border-radius );
70
76
}
71
77
78
+ .loading {
79
+ color : var (--yellow-foreground );
80
+ background-color : var (--yellow-background );
81
+ border : 1px solid var (--yellow-border );
82
+ }
83
+
72
84
.online {
73
85
color : var (--green-foreground );
74
86
background-color : var (--green-background );
You can’t perform that action at this time.
0 commit comments