moved the task completed status
This commit is contained in:
117
StackMonkey.ps1
117
StackMonkey.ps1
@@ -635,6 +635,7 @@ function Get-UIHtml {
|
|||||||
|
|
||||||
# no spaces before $style
|
# no spaces before $style
|
||||||
$style = @'
|
$style = @'
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
/* Cool Palette */
|
/* Cool Palette */
|
||||||
@@ -654,8 +655,12 @@ $style = @'
|
|||||||
--btn-success: rgba(40,167,69);
|
--btn-success: rgba(40,167,69);
|
||||||
--btn-success-disabled: rgba(108,117,125);
|
--btn-success-disabled: rgba(108,117,125);
|
||||||
--btn-danger: rgba(220,53,69);
|
--btn-danger: rgba(220,53,69);
|
||||||
/* Monkey logo*/
|
|
||||||
--monkey-bottom: 135px;
|
/* Monkey + status panel settings */
|
||||||
|
--monkey-size: 160px; /* size of SAMY */
|
||||||
|
--monkey-bottom: 135px; /* how high from bottom of sidebar */
|
||||||
|
--status-gap: 20px; /* space between status box and monkey */
|
||||||
|
--status-height: 140px; /* max height of status box */
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -674,13 +679,50 @@ $style = @'
|
|||||||
.subtitle { font-size: 1.2rem; color: var(--gray-color); margin-top: 0.5em; }
|
.subtitle { font-size: 1.2rem; color: var(--gray-color); margin-top: 0.5em; }
|
||||||
|
|
||||||
.container { display:flex; height:100vh; overflow:hidden; }
|
.container { display:flex; height:100vh; overflow:hidden; }
|
||||||
.sidebar {
|
|
||||||
|
/* single, consolidated sidebar rule */
|
||||||
|
.sidebar{
|
||||||
width:200px;
|
width:200px;
|
||||||
background:var(--background-color);
|
background:var(--background-color);
|
||||||
padding:10px;
|
padding:10px;
|
||||||
position: relative; /* added */
|
position:relative;
|
||||||
padding-bottom: 190px; /* added: so buttons don't overlap the monkey */
|
/* leave enough room for status box + monkey */
|
||||||
|
padding-bottom: calc(var(--monkey-bottom) + var(--monkey-size) + var(--status-gap) + 10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* status panel sits ABOVE the monkey (make sure #status-box is inside .sidebar in HTML) */
|
||||||
|
#status-box{
|
||||||
|
position:absolute;
|
||||||
|
left:10px;
|
||||||
|
bottom: calc(var(--monkey-bottom) + var(--monkey-size) + var(--status-gap));
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
max-height: var(--status-height);
|
||||||
|
overflow-y:auto;
|
||||||
|
padding: 8px 10px;
|
||||||
|
border:1px solid var(--border-color);
|
||||||
|
border-radius:8px;
|
||||||
|
background: rgba(255,255,255,0.06);
|
||||||
|
font-family: 'Segoe UI','Segoe UI Emoji','Segoe UI Symbol',system-ui,sans-serif;
|
||||||
|
font-size:12px;
|
||||||
|
line-height:1.35;
|
||||||
|
z-index: 1; /* keep above pseudo-element just in case */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SAMY bottom-left */
|
||||||
|
.sidebar::after{
|
||||||
|
content:"";
|
||||||
|
position:absolute;
|
||||||
|
left:10px;
|
||||||
|
bottom: var(--monkey-bottom);
|
||||||
|
width: var(--monkey-size);
|
||||||
|
height: var(--monkey-size);
|
||||||
|
background-image: url("https://git.svstools.com/syelle/Logo/raw/branch/main/SAMY.png");
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-size:contain;
|
||||||
|
opacity:0.95;
|
||||||
|
pointer-events:none;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar button {
|
.sidebar button {
|
||||||
display:block; width:100%; margin-bottom:10px; padding:10px;
|
display:block; width:100%; margin-bottom:10px; padding:10px;
|
||||||
color:var(--white-color); background:var(--btn-sidebar-light-gray);
|
color:var(--white-color); background:var(--btn-sidebar-light-gray);
|
||||||
@@ -692,21 +734,6 @@ $style = @'
|
|||||||
background:var(--btn-hover); transform:scale(var(--btn-hover-scale));
|
background:var(--btn-hover); transform:scale(var(--btn-hover-scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw SAMY in bottom-left of sidebar */
|
|
||||||
.sidebar::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
bottom: var(--monkey-bottom);
|
|
||||||
width: 160px; /* tweak size as you like */
|
|
||||||
height: 160px;
|
|
||||||
background-image: url("https://git.svstools.com/syelle/Logo/raw/branch/main/SAMY.png");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
opacity: 0.95;
|
|
||||||
pointer-events: none; /* don't block clicks on sidebar buttons */
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex:1;
|
flex:1;
|
||||||
@@ -734,37 +761,25 @@ $style = @'
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Specific overrides */
|
/* Specific overrides */
|
||||||
.exit-button {
|
.exit-button { background-color: var(--btn-danger); }
|
||||||
background-color: var(--btn-danger);
|
.run-button { background-color: var(--btn-success); }
|
||||||
}
|
|
||||||
|
|
||||||
/* Specific overrides */
|
|
||||||
.run-button {
|
|
||||||
background-color: var(--btn-success);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.tab-content { display:none; }
|
.tab-content { display:none; }
|
||||||
.tab-content.active { display:block; }
|
.tab-content.active { display:block; }
|
||||||
|
|
||||||
.columns-container {
|
.columns-container { display:flex; gap:20px; flex-wrap:wrap; align-items:flex-start; }
|
||||||
display:flex; gap:20px; flex-wrap:wrap; align-items:flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* column styling, same as old script */
|
/* column styling, same as old script */
|
||||||
.column {
|
.column {
|
||||||
flex: 1; /* fill available space */
|
flex: 1;
|
||||||
max-width: 45%; /* or whatever width you like */
|
max-width: 45%;
|
||||||
border: 2px solid var(--border-color);
|
border: 2px solid var(--border-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: var(--dark-gray-color);
|
background-color: var(--dark-gray-color);
|
||||||
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
|
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
|
||||||
}
|
}
|
||||||
.checkbox-group label {
|
.checkbox-group label { display:flex; align-items:center; margin-bottom:8px; }
|
||||||
display:flex; align-items:center; margin-bottom:8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-group { text-align:right; margin-top:20px; }
|
.button-group { text-align:right; margin-top:20px; }
|
||||||
.exit-button {
|
.exit-button {
|
||||||
@@ -772,9 +787,7 @@ $style = @'
|
|||||||
padding:10px 20px; border:none; border-radius:5px; cursor:pointer;
|
padding:10px 20px; border:none; border-radius:5px; cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#PasswordContainer, #dattoRmmContainer {
|
#PasswordContainer, #dattoRmmContainer { margin-top: 1em; }
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Common styles for inputs, buttons, and selects */
|
/* Common styles for inputs, buttons, and selects */
|
||||||
#PasswordContainer input,
|
#PasswordContainer input,
|
||||||
@@ -791,17 +804,12 @@ $style = @'
|
|||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style specifically for the fetch button */
|
|
||||||
#PasswordContainer button {
|
#PasswordContainer button {
|
||||||
background-color: var(--btn-sidebar-blue);
|
background-color: var(--btn-sidebar-blue);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.3s ease;
|
transition: background-color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
#PasswordContainer button:hover { background-color: var(--btn-hover); }
|
||||||
/* Hover effect for the fetch button */
|
|
||||||
#PasswordContainer button:hover {
|
|
||||||
background-color: var(--btn-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tag line */
|
/* Tag line */
|
||||||
#tagline {
|
#tagline {
|
||||||
@@ -816,6 +824,7 @@ $style = @'
|
|||||||
.sidebar { width:100%; }
|
.sidebar { width:100%; }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
'@
|
'@
|
||||||
|
|
||||||
# no spaces before $script
|
# no spaces before $script
|
||||||
@@ -837,8 +846,8 @@ function logProgress(label, isSuccess) {
|
|||||||
updateTitle();
|
updateTitle();
|
||||||
|
|
||||||
const msg = isSuccess
|
const msg = isSuccess
|
||||||
? `✅ ${completedTasks}/${totalTasks} done: ${label}`
|
? ` ${completedTasks}/${totalTasks} done: ${label}`
|
||||||
: `❌ ${completedTasks}/${totalTasks} failed: ${label}`;
|
: ` ${completedTasks}/${totalTasks} failed: ${label}`;
|
||||||
|
|
||||||
const div = document.createElement('div');
|
const div = document.createElement('div');
|
||||||
div.style.color = isSuccess ? 'lime' : 'red';
|
div.style.color = isSuccess ? 'lime' : 'red';
|
||||||
@@ -848,10 +857,10 @@ function logProgress(label, isSuccess) {
|
|||||||
if (completedTasks === totalTasks) {
|
if (completedTasks === totalTasks) {
|
||||||
const finalMsg = document.createElement('div');
|
const finalMsg = document.createElement('div');
|
||||||
finalMsg.style.marginTop = '10px';
|
finalMsg.style.marginTop = '10px';
|
||||||
finalMsg.innerHTML = `<strong>✅ All tasks complete (${completedTasks}/${totalTasks})</strong>`;
|
finalMsg.innerHTML = `<strong> All tasks complete (${completedTasks}/${totalTasks})</strong>`;
|
||||||
statusBox?.appendChild(finalMsg);
|
statusBox?.appendChild(finalMsg);
|
||||||
|
|
||||||
document.title = `✅ ScriptMonkey - Complete (${completedTasks}/${totalTasks})`;
|
document.title = ` ScriptMonkey - Complete (${completedTasks}/${totalTasks})`;
|
||||||
|
|
||||||
const sound = new Audio('data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=');
|
const sound = new Audio('data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YQAAAAA=');
|
||||||
sound.play().catch(() => {});
|
sound.play().catch(() => {});
|
||||||
@@ -1211,6 +1220,8 @@ $style
|
|||||||
<button class="tab-button" data-tab="offboardTab">Off-Boarding</button>
|
<button class="tab-button" data-tab="offboardTab">Off-Boarding</button>
|
||||||
<button class="tab-button" data-tab="tweaksTab">Tweaks</button>
|
<button class="tab-button" data-tab="tweaksTab">Tweaks</button>
|
||||||
<button class="tab-button" data-tab="SVSAppsTab">SVS APPs</button>
|
<button class="tab-button" data-tab="SVSAppsTab">SVS APPs</button>
|
||||||
|
|
||||||
|
<div id="status-box" style="margin-top: 1em; font-family: monospace;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div id="onboardTab" class="tab-content">
|
<div id="onboardTab" class="tab-content">
|
||||||
@@ -1281,7 +1292,7 @@ $script
|
|||||||
<button class="exit-button" onclick="endSession()">Exit</button>
|
<button class="exit-button" onclick="endSession()">Exit</button>
|
||||||
<button class="run-button" onclick="triggerInstall()">Run Selected</button>
|
<button class="run-button" onclick="triggerInstall()">Run Selected</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="status-box" style="margin-top: 1em; font-family: monospace;"></div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user