Rename layout

This commit is contained in:
Chris Payne
2025-07-08 19:43:33 -04:00
parent 9657fe7133
commit dcfa569a7e
2 changed files with 32 additions and 6 deletions

View File

@@ -14,9 +14,35 @@ Import-Module MSAL.PS
Write-Host "[INFO] MSAL.PS module loaded."
# Load config and tool modules
. "$PSScriptRoot\config.ps1"
. "$PSScriptRoot\tools\autotask.ps1"
. "$PSScriptRoot\tools\dattormm.ps1"
$urls = @{
autotask = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/tools/autotask.ps1"
datto = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/tools/dattormm.ps1"
config = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/config.ps1"
}
$xamlUrl = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/layout.xaml"
try {
$xamlContent = Invoke-WebRequest -Uri $xamlUrl -UseBasicParsing -ErrorAction Stop
[xml]$xaml = $xamlContent.Content
Write-Host "[INFO] XAML loaded from remote URL."
} catch {
Write-Host ("[ERROR] Failed to load XAML from {0}: {1}" -f $xamlUrl, $_.Exception.Message)
exit 1
}
foreach ($name in $urls.Keys) {
try {
$scriptText = Invoke-WebRequest -Uri $urls[$name] -UseBasicParsing
Invoke-Expression $scriptText.Content
Write-Host "[INFO] Loaded $name.ps1 from URL."
} catch {
Write-Host "[ERROR] Failed to load $name.ps1: $($_.Exception.Message)"
exit 1
}
}
Write-Host "[INFO] Config and tool modules loaded."
# Load WPF assemblies