Added dynamic frames for darwin + win32.

The darwin frame is the same as the original, however the button behavior is corrected. The win32 frame uses the traditional buttons found on windows. Also added a small logo image to the windows frame. Each frame is dynamically loaded on startup via ejs.

Also disabled the server selection test UI.
This commit is contained in:
Daniel Scalzi
2018-04-14 16:54:10 -04:00
parent 28cd147ca0
commit b5386c0257
4 changed files with 167 additions and 43 deletions

View File

@@ -22,25 +22,33 @@ document.addEventListener('readystatechange', function () {
console.log('UICore Initializing..');
// Bind close button.
document.getElementById("frame_btn_close").addEventListener("click", function (e) {
const window = remote.getCurrentWindow()
window.close()
Array.from(document.getElementsByClassName('fCb')).map((val) => {
val.addEventListener('click', e => {
const window = remote.getCurrentWindow()
window.close()
})
})
// Bind restore down button.
document.getElementById("frame_btn_restoredown").addEventListener("click", function (e) {
const window = remote.getCurrentWindow()
if(window.isMaximized()){
window.unmaximize();
} else {
window.maximize()
}
Array.from(document.getElementsByClassName('fRb')).map((val) => {
val.addEventListener('click', e => {
const window = remote.getCurrentWindow()
if(window.isMaximized()){
window.unmaximize()
} else {
window.maximize()
}
document.activeElement.blur()
})
})
// Bind minimize button.
document.getElementById("frame_btn_minimize").addEventListener("click", function (e) {
const window = remote.getCurrentWindow()
window.minimize()
Array.from(document.getElementsByClassName('fMb')).map((val) => {
val.addEventListener('click', e => {
const window = remote.getCurrentWindow()
window.minimize()
document.activeElement.blur()
})
})
} else if(document.readyState === 'complete'){