File tree Expand file tree Collapse file tree
new/apps/web/src/lib/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040</div >
4141
4242<div class =" widgets" >
43- <RamUsage runningProcesses ={report .System .RunningProcesses } ram ={report .Hardware .Ram } />
44- <CpuUsage cpuLoad ={report .Hardware .Cpu .LoadPercentage } />
45- <!--
46- <Temps /> -->
43+ <Temps />
4744 <AudioDevices audioDevices ={report .Hardware .AudioDevices }/>
48- <!-- <PowerProfiles /> -->
4945</div >
5046
5147<style >
Original file line number Diff line number Diff line change 1- <!-- NOT YET IMPLEMENTED IN NEW WIDGET SYSTEM -->
21<script lang =" ts" >
32 import Widget from ' ../../common/ModalWidget.svelte' ;
3+
4+ interface TemperatureInfo {
5+ Hardware: string ;
6+ SensorName: string ;
7+ SensorValue: number ;
8+ }
9+
10+ interface Props {
11+ temps: Array <TemperatureInfo >;
12+ }
13+
14+ let {
15+ temps
16+ }: Props = $props ();
17+
418 </script >
519
620<!-- Temps -->
7- <Widget title =" Temps" modalId = " temps-modal " >
8- < div slot = " values " >
21+ <Widget title =" Temps" >
22+ {# snippet widgetContents ()}
923 <div class =" widget-value" >
1024 <div >🔥</div >
1125 <div >C</div >
1226 </div >
13- </ div >
27+ { / snippet }
1428
15- < div class = " modal-body " >
29+ {# snippet modalContents ()}
1630 <table id =" temp-table" class =" table" >
1731 <thead >
1832 <tr >
2135 <th >Temperature</th >
2236 </tr >
2337 </thead >
38+ <tbody >
39+ {#each temps as sensor }
40+ <tr >
41+ <td >{sensor .Hardware }</td >
42+ <td >{sensor .SensorName }</td >
43+ <td >{sensor .SensorValue }</td >
44+ </tr >
45+ {/each }
46+ </tbody >
2447 </table >
25- </ div >
48+ { / snippet }
2649</Widget >
You can’t perform that action at this time.
0 commit comments