Update samy.ps1

This commit is contained in:
2025-12-01 04:41:13 -05:00
parent 1810543c10
commit d3d6d7e6f4

View File

@@ -9,7 +9,8 @@ Last changes made should fix the issues we had wen running thi in Windows 11 25H
Install-DattoRMM is the core helper that handles credential retrieval (webhook or direct), OAuth token management,
site list fetching/persistence, registry variable pushes, agent downloads/installs, and optional installer archiving.
The UI exposes all tasks as checkboxes with select-all helpers, and each action is wrapped in detailed logging plus
HTTP responders so callers can see success or failure.
HTTP responders so callers can see success or failure.$jsContent = Get-RemoteText -Url $Script:SamyJsUrl
Key features:
- Credential retrieval - securely fetches ApiUrl, ApiKey, and ApiSecretKey from a webhook when requested.
@@ -232,7 +233,13 @@ $ConfirmPreference = 'None'
$Script:SamyBranch = 'beta' # or 'main'
$Script:SamyRepoBase = 'https://git.svstools.ca/SVS_Public_Repo/SAMY/raw/branch'
$Script:SamyLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_logo.svg"
# Top-left corner logo (SVS)
$Script:SamyTopLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_logo.svg"
# Background SAMY image used in CSS
$Script:SamyBgLogoUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SAMY.png"
$Script:SamyFaviconUrl = "$Script:SamyRepoBase/$Script:SamyBranch/SVS_Favicon.ico"
$Script:SamyCssUrl = "$Script:SamyRepoBase/$Script:SamyBranch/samy.css?raw=1"
$Script:SamyJsUrl = "$Script:SamyRepoBase/$Script:SamyBranch/samy.js?raw=1"
@@ -1052,12 +1059,11 @@ function Get-UIHtml {
$cssContent = Get-RemoteText -Url $Script:SamyCssUrl
$jsContent = Get-RemoteText -Url $Script:SamyJsUrl
# Make the CSS background-image follow $Script:SamyLogoUrl
# Make the CSS background-image follow $Script:SamyBgLogoUrl
if ($cssContent) {
$cssContent = $cssContent.Replace(
'background-image: url("SAMY.png");',
"background-image: url(`"$Script:SamyLogoUrl`");"
)
$pattern = 'background-image:\s*url\("SAMY\.png"\);?' # matches with or without extra spaces/semicolon
$replacement = "background-image: url('$Script:SamyBgLogoUrl');"
$cssContent = [regex]::Replace($cssContent, $pattern, $replacement)
}
@@ -1081,7 +1087,7 @@ $cssContent
<div class="logo-container">
<!-- SVS Logo (left) -->
<div class="logo-left">
<img src="$Script:SamyLogoUrl" alt="SVS Logo">
<img src="$Script:SamyTopLogoUrl" alt="SVS Logo">
{{moduleVersion}}
</div>