This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Replace clipboardButtons with hardwareInspector
Those buttons are useless now that touchscreen keyboard shortcuts work
- Loading branch information
1 parent
c65469e
commit b00b12c
Showing
6 changed files
with
96 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
div#mod_hardwareInspector { | ||
border-top: 0.092vh solid rgba(var(--color_r), var(--color_g), var(--color_b), 0.3); | ||
font-family: var(--font_main_light); | ||
letter-spacing: 0.092vh; | ||
padding: 0.645vh 0vh; | ||
display: flex; | ||
} | ||
|
||
div#mod_hardwareInspector::before { | ||
content: ""; | ||
border-left: 0.092vh solid rgba(var(--color_r), var(--color_g), var(--color_b), 0.3); | ||
align-self: flex-start; | ||
position: relative; | ||
left: -0.092vh; | ||
top: -1.111vh; | ||
height: 0.833vh; | ||
} | ||
|
||
div#mod_hardwareInspector::after { | ||
content: ""; | ||
border-right: 0.092vh solid rgba(var(--color_r), var(--color_g), var(--color_b), 0.3); | ||
position: relative; | ||
right: -0.092vh; | ||
top: -1.111vh; | ||
height: 0.833vh; | ||
} | ||
|
||
div#mod_hardwareInspector_inner { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-evenly; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
} | ||
|
||
div#mod_hardwareInspector_inner > div { | ||
text-align: left; | ||
} | ||
|
||
div#mod_hardwareInspector_inner > div > * { | ||
font-size: 1.3vh; | ||
line-height: 1.5vh; | ||
margin: 0vh; | ||
} | ||
|
||
div#mod_hardwareInspector_inner > div > h2 { | ||
opacity: 0.5; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
class HardwareInspector { | ||
constructor(parentId) { | ||
if (!parentId) throw "Missing parameters"; | ||
|
||
// Create DOM | ||
this.parent = document.getElementById(parentId); | ||
this._element = document.createElement("div"); | ||
this._element.setAttribute("id", "mod_hardwareInspector"); | ||
this._element.innerHTML = `<div id="mod_hardwareInspector_inner"> | ||
<div> | ||
<h1>MANUFACTURER</h1> | ||
<h2 id="mod_hardwareInspector_manufacturer" >NONE</h2> | ||
</div> | ||
<div> | ||
<h1>MODEL</h1> | ||
<h2 id="mod_hardwareInspector_model" >NONE</h2> | ||
</div> | ||
<div> | ||
<h1>CHASSIS</h1> | ||
<h2 id="mod_hardwareInspector_chassis" >NONE</h2> | ||
</div> | ||
</div>`; | ||
|
||
this.parent.append(this._element); | ||
|
||
this.updateInfo(); | ||
this.infoUpdater = setInterval(() => { | ||
this.updateInfo(); | ||
}, 20000); | ||
} | ||
updateInfo() { | ||
window.si.system().then(d => { | ||
document.getElementById("mod_hardwareInspector_manufacturer").innerText = d.manufacturer; | ||
document.getElementById("mod_hardwareInspector_model").innerText = d.model; | ||
}); | ||
window.si.chassis().then(d => { | ||
document.getElementById("mod_hardwareInspector_chassis").innerText = d.type; | ||
}); | ||
} | ||
} | ||
|
||
module.exports = { | ||
HardwareInspector | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters