Changed to using a tabbed layout instead of separate pages for everything
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-10-28 01:06:09 -04:00
parent c451237ab9
commit c878447c45
11 changed files with 49 additions and 73 deletions

View File

@ -1,6 +1,6 @@
si = require('systeminformation')
window.onload = () ->
window.addEventListener('load', () ->
# Grab the static CPU information
si.cpu()
.then((data) ->
@ -16,6 +16,7 @@ window.onload = () ->
# Start the CPU temperature loop
setCpuTemp()
, false)
setCpuTemp = () ->
si.cpuTemperature()

View File

@ -1,6 +1,6 @@
si = require('systeminformation')
window.onload = () ->
window.addEventListener('load', () ->
# Set the option selector to trigger an info grab on element change
document.getElementById('gpuSelector').addEventListener('change', () ->
updateGpuInfo(@value)
@ -11,6 +11,7 @@ window.onload = () ->
# Run the updateGpuInfo function with the default value of 0
updateGpuInfo()
, false)
loadGpus = () ->
si.graphics()

View File

@ -1,6 +1,6 @@
si = require('systeminformation')
window.onload = () ->
window.addEventListener('load', () ->
# Grab the static CPU information
si.mem()
.then((data) ->
@ -11,6 +11,7 @@ window.onload = () ->
# Start the CPU temperature loop
getMemoryUsage()
, false)
getMemoryUsage = () ->
si.mem()

View File

@ -1,5 +1,12 @@
@loadPage = (pagePath) ->
window.location.href = pagePath + '.html'
@openTab = (tab) ->
displays = document.querySelectorAll('.component-display')
i = 0
while i < displays.length
if displays[i].getAttribute('data-component') == tab
displays[i].classList.add('active')
else
displays[i].classList.remove('active')
i++
@formatBytes = (bytes, decimals = 2) ->
if bytes == 0

View File

@ -1,6 +1,6 @@
si = require('systeminformation')
window.onload = () ->
window.addEventListener('load', () ->
# Set the option selector to trigger an info grab on element change
document.getElementById('diskSelector').addEventListener('change', () ->
updateDiskInfo(@value)
@ -14,6 +14,7 @@ window.onload = () ->
# Start running our function to update the drive's temperature
setDiskTemp()
, false)
loadDisks = () ->
si.diskLayout()