add "Waiting on microsoft..."
This commit is contained in:
parent
3ebb71b368
commit
731f00acc9
@ -688,6 +688,21 @@ body, button {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.circle-loader-big {
|
||||
margin:auto;
|
||||
border: 5px solid rgba(255, 255, 255, 0.5);
|
||||
border-left-color: #ffffff;
|
||||
animation-name: loader-spin;
|
||||
animation-duration: 1s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: linear;
|
||||
position: relative;
|
||||
display: block;
|
||||
align-self: center;
|
||||
border-radius: 50%;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
.load-complete {
|
||||
animation: none;
|
||||
border-color: #ffffff;
|
||||
|
@ -301,17 +301,23 @@ loginButton.addEventListener('click', () => {
|
||||
})
|
||||
|
||||
loginMSButton.addEventListener('click', (event) => {
|
||||
// Show loading stuff.
|
||||
toggleOverlay(true, false, 'msOverlay')
|
||||
loginMSButton.disabled = true
|
||||
ipcRenderer.send('openMSALoginWindow', 'open')
|
||||
})
|
||||
|
||||
ipcRenderer.on('MSALoginWindowReply', (event, ...args) => {
|
||||
if (args[0] === 'error') {
|
||||
|
||||
loginMSButton.disabled = false
|
||||
loginLoading(false)
|
||||
switch (args[1]){
|
||||
case 'AlreadyOpenException': {
|
||||
setOverlayContent('ERROR', 'There is already a login window open!', 'OK')
|
||||
setOverlayHandler(() => {
|
||||
toggleOverlay(false)
|
||||
toggleOverlay(false, false, 'msOverlay')
|
||||
})
|
||||
toggleOverlay(true)
|
||||
return
|
||||
@ -320,6 +326,7 @@ ipcRenderer.on('MSALoginWindowReply', (event, ...args) => {
|
||||
setOverlayContent('ERROR', 'You have to finish the login process to use Helios Launcher. The window will close by itself when you have successfully logged in.', 'OK')
|
||||
setOverlayHandler(() => {
|
||||
toggleOverlay(false)
|
||||
toggleOverlay(false, false, 'msOverlay')
|
||||
})
|
||||
toggleOverlay(true)
|
||||
return
|
||||
@ -327,7 +334,7 @@ ipcRenderer.on('MSALoginWindowReply', (event, ...args) => {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
toggleOverlay(false, false, 'msOverlay')
|
||||
const queryMap = args[0]
|
||||
if (queryMap.has('error')) {
|
||||
let error = queryMap.get('error')
|
||||
@ -348,9 +355,6 @@ ipcRenderer.on('MSALoginWindowReply', (event, ...args) => {
|
||||
// Disable form.
|
||||
formDisabled(true)
|
||||
|
||||
// Show loading stuff.
|
||||
loginLoading(true)
|
||||
|
||||
const authCode = queryMap.get('code')
|
||||
AuthManager.addMSAccount(authCode).then(account => {
|
||||
updateSelectedAccount(account)
|
||||
|
@ -28,6 +28,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="overlayContent">
|
||||
<div class="circle-loader" style="display: none;"></div>
|
||||
<span id="overlayTitle">Lorem Ipsum:<br>Finis Illud</span>
|
||||
<span id="overlayDesc">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud..</span>
|
||||
<div id="overlayActionContainer">
|
||||
@ -37,5 +38,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="msOverlay" style="display: none;">
|
||||
<span><div class="circle-loader-big"></div></span><br>
|
||||
<span style="font-size: 2em;">Waiting on Microsoft...</span>
|
||||
</div>
|
||||
<script src="./assets/js/scripts/overlay.js"></script>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user