Skip to content

Commit

Permalink
feat(post-install env): add web GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Oct 8, 2023
1 parent c0dc218 commit 9bededb
Show file tree
Hide file tree
Showing 7 changed files with 449 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
! DO NOT DELETE !

This is the Atlas Package Installation Environment based upon Windows Recovery. It is a component to Atlas used for disabling Defender and more. Without this, disabling Defender and other components will be unreliable and likely not work.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.dataButton::after{content:"INFO;Starting up;1"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<HTA:APPLICATION ID="oHTA"
BORDER="none"
BORDERSTYLE="none"
INNERBORDER="no"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SHOWINTASKBAR="no"
CAPTION="no"
SCROLL="no"
SINGLEINSTANCE="yes"
SYSMENU="no"
WINDOWSTATE="maximize"
CONTEXTMENU="no"
NAVIGABLE="yes"
SELECTION="no"/>
</head>
<script>window.location = 'index.html'</script>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link class="data" href="data.css" rel="stylesheet" type="text/css" />
<title>Atlas Component Removal</title>
</head>

<!--
This page is only intended and made to work under the latest MSHTML, which is Internet Explorer 11.
If you want to contribute here, use Edge's IE compatibility mode or use the mshta executable.
You can use MSHTA like (only with a full path): mshta "%userprofile%\Downloads\atlasHTML\index.html"
-->

<body>
<div class="background-image-container">
<svg xmlns="http://www.w3.org/2000/svg" class="SVGBackdropImage">
<filter id="background-blur" x="0" y="0" width="1" height="1">
<feGaussianBlur result="blurred" stdDeviation="45"></feGaussianBlur>
</filter>
<image filter="url(#background-blur)" width="100%" height="100%" style="width: 100%;" href="background.jpg"></image>
</svg>
</div>
<div class="control-app">
<div class="container fadeIn">
<div class="content">
<div class="halfSection">
<img style="width: 100%; height: 100%; transform: translate3d(0px, 0px, 0px);" viewbox="0 0 552 552" preserveaspectratio="xMidYMid meet" width="552" height="552" src="atlas.svg" />
</div>
<div class="halfSection">
<div class="app-content">
<div class="app-content">
<div class="control-progress" id="_progress">
<svg xmlns="http://www.w3.org/2000/svg" class="radialSize" id="_progressControl" viewBox="0 0 16 16">
<circle class="radial-bg" cx="8px" cy="8px" r="7px"></circle>
<circle class="radial radial-infinite" cx="8px" cy="8px" r="7px"></circle>
</svg>
<h4 id="_progressText" class="errorText">An error has occurred.</h4>
<h4 id="_progressText" class="normalText">Updating components...</h4>
<h4 id="_progressText" class="facts">Factual information!</h4>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button style="visibility: hidden;" class="dataButton"></button>
</body>

<script>

const progressText = document.querySelector('.normalText');
const circle = document.querySelector('.radial-infinite');
const errorText = document.querySelector('.errorText');
const factsElement = document.querySelector('.facts');
const element = document.querySelector('.data');

var factCount = 0;

function updateProgressText(text) {
progressText.textContent = text;
}

function setProgress(percentage, text) {
if (!text) {var text = "Updating components";}
updateProgressText(text + '... (' + percentage + '%)');

if (percentage == 0) {var percentage = percentage + 1}
const cssPx = (43/100) * percentage
circle.style.strokeDasharray = cssPx + 'px 42.97px';
}

function showFatalError(error) {
errorText.textContent = 'An error has occured: ' + error;
errorText.style.display = 'block';
factsElement.style.display = 'none';
updateProgressText('Your computer will restart shortly, with more details next startup.')
}


function setNewFact(first) {
if (factCount == 7) {factCount = 0} else {factCount++}
var facts = [
'Did you know that Atlas\' internals are open source on GitHub?',
'Atlas has over 180+ seperated tweak files.',
'Atlas has a Discord server. https://discord.gg/atlasos/',
'All of the Atlas component removals persist through Windows Updates.',
'We have a forum! https://forum.atlasos.net/',
'We have donations on Ko-fi with rewards! https://ko-fi.com/atlasos/',
'Atlas is built by the community and anyone can contribute to the code.',
'See the Atlas documentation for help. https://docs.atlasos.net/'
]

// Animations don't seem to work in Windows Recovery
// factsElement.classList.add('invisible');
// setTimeout(function () {
factsElement.textContent = facts[factCount];
// factsElement.classList.remove('invisible');
// }, 500);
}

var count = 1
function getData() {
// Refresh CSS
var currentHref = element.getAttribute('href');
element.setAttribute('href', (currentHref += '?'));

// Get dataButton content
var dataButtonStyle = window.getComputedStyle(
document.querySelector('.dataButton'), '::after'
);
var data = dataButtonStyle.getPropertyValue('content');

// Parse/apply content
const items = data.split(';').map(function(item) {
return item.replace(/"/g, "");
});
if (items[0] === 'INFO') {
setProgress(items[2], items[1]);
setTimeout(function () {
count++; if (count % 3 === 0) { setNewFact(false); }
getData();
}, 3000);
} else if (items[0] === 'ERROR') {
showFatalError(items[1]);
}
}

setProgress(1);
setNewFact(true);
getData();

</script>

</html>
Loading

0 comments on commit 9bededb

Please sign in to comment.