Rename layout
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="InstaProvision - SVS Tools"
|
Title="InstaClient - SVS Tools"
|
||||||
Height="550" Width="480"
|
Height="550" Width="480"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Background="#1e1e2f"
|
Background="#1e1e2f"
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<Image Source="https://i.ibb.co/vCTJYn2j/svs-logo-nav-wh.png" Height="60" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
<Image Source="https://i.ibb.co/vCTJYn2j/svs-logo-nav-wh.png" Height="60" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<TextBlock Text="Provision Company" FontSize="20" FontWeight="SemiBold" Foreground="White" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
<TextBlock Text="Provision Client" FontSize="20" FontWeight="SemiBold" Foreground="White" HorizontalAlignment="Center" Margin="0,0,0,10"/>
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,25,0,0">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,25,0,0">
|
||||||
<Button Name="LoginBtn" Content="Login with Microsoft" Width="180" Height="38" Margin="5" Style="{StaticResource FancyButton}"/>
|
<Button Name="LoginBtn" Content="Login with Microsoft" Width="180" Height="38" Margin="5" Style="{StaticResource FancyButton}"/>
|
||||||
<Button Name="SubmitBtn" Content="Provision" Width="120" Height="38" Margin="5" Style="{StaticResource FancyButton}"/>
|
<Button Name="SubmitBtn" Content="Provision Now" Width="120" Height="38" Margin="5" Style="{StaticResource FancyButton}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock Name="StatusBlock" Foreground="LightGreen" TextAlignment="Center" Margin="0,15,0,0"/>
|
<TextBlock Name="StatusBlock" Foreground="LightGreen" TextAlignment="Center" Margin="0,15,0,0"/>
|
||||||
32
main.ps1
32
main.ps1
@@ -14,9 +14,35 @@ Import-Module MSAL.PS
|
|||||||
Write-Host "[INFO] MSAL.PS module loaded."
|
Write-Host "[INFO] MSAL.PS module loaded."
|
||||||
|
|
||||||
# Load config and tool modules
|
# Load config and tool modules
|
||||||
. "$PSScriptRoot\config.ps1"
|
$urls = @{
|
||||||
. "$PSScriptRoot\tools\autotask.ps1"
|
autotask = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/tools/autotask.ps1"
|
||||||
. "$PSScriptRoot\tools\dattormm.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."
|
Write-Host "[INFO] Config and tool modules loaded."
|
||||||
|
|
||||||
# Load WPF assemblies
|
# Load WPF assemblies
|
||||||
|
|||||||
Reference in New Issue
Block a user