controls/help-content.ps1

Function New-UAConnectionHelp {
    $Settings = Get-UASetting

    if ($null -ne $Request.Host) {
        $ComputerName = $Request.Host.ToString().Split(":")[0]

        New-UDCard -Title "AppToken Connection Information" -Content {
            
            New-UDButton -Text 'Copy AppToken to Clipboard' -OnClick {
                $Token = if($Session:AppToken){$Session:AppToken}else{$AppToken.Token}
                Set-UDClipboard -Data $Token
                $Token = ""
            }
            
            New-UDElement -Tag 'pre' -Content {
                "Import-Module UniversalAutomation
`$AppToken = 'PASTE_YOUR_APPTOKEN_HERE'
Connect-UAServer -ComputerName http://$($COMPUTERNAME):$($Settings.Port) -AppToken `$AppToken"

                            }
                        }
                    } 
                }