mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:06:30 +00:00
bump ImageSharp version vulnerability fix
decouple Loader from Common dll fix current user url in api
This commit is contained in:
@@ -6,7 +6,6 @@ using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using Azaion.Common;
|
||||
using MessagePack;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -56,9 +55,9 @@ public partial class Login
|
||||
Validate(creds);
|
||||
|
||||
TbStatus.Foreground = Brushes.Black;
|
||||
var localVersion = Constants.GetLocalVersion();
|
||||
var localVersion = ConstantsLoader.GetLocalVersion();
|
||||
var installerVersion = await GetInstallerVer() ?? localVersion;
|
||||
var credsEncrypted = Security.Encrypt(creds);
|
||||
var credsEncrypted = ConstantsLoader.Encrypt(creds);
|
||||
|
||||
if (installerVersion > localVersion)
|
||||
{
|
||||
@@ -71,17 +70,17 @@ public partial class Login
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "cmd.exe",
|
||||
Arguments = $"/c updater.cmd {Process.GetCurrentProcess().Id} {installerName} {Constants.AZAION_SUITE_EXE} \"{credsEncrypted}\""
|
||||
Arguments = $"/c updater.cmd {Process.GetCurrentProcess().Id} {installerName} {ConstantsLoader.AZAION_SUITE_EXE} \"{credsEncrypted}\""
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
TbStatus.Text = "Your version is up to date!";
|
||||
|
||||
Process.Start(Constants.AZAION_SUITE_EXE, $"-c {credsEncrypted}");
|
||||
Process.Start(ConstantsLoader.AZAION_SUITE_EXE, $"-c {credsEncrypted}");
|
||||
await Task.Delay(800);
|
||||
TbStatus.Text = "Loading...";
|
||||
while (!Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Constants.EXTERNAL_INFERENCE_PATH)).Any())
|
||||
while (!Process.GetProcessesByName(Path.GetFileNameWithoutExtension(ConstantsLoader.EXTERNAL_INFERENCE_PATH)).Any())
|
||||
await Task.Delay(500);
|
||||
await Task.Delay(1500);
|
||||
}
|
||||
@@ -106,13 +105,13 @@ public partial class Login
|
||||
using var process = new Process();
|
||||
process.StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = Constants.EXTERNAL_LOADER_PATH,
|
||||
Arguments = $"--port {ConstantsLoader.EXTERNAL_LOADER_PORT} --api {Constants.DEFAULT_API_URL}",
|
||||
FileName = ConstantsLoader.EXTERNAL_LOADER_PATH,
|
||||
Arguments = $"--port {ConstantsLoader.EXTERNAL_LOADER_PORT} --api {ConstantsLoader.DEFAULT_API_URL}",
|
||||
CreateNoWindow = true
|
||||
};
|
||||
process.Start();
|
||||
dealer.Options.Identity = Encoding.UTF8.GetBytes(Guid.NewGuid().ToString("N"));
|
||||
dealer.Connect($"tcp://{Constants.DEFAULT_ZMQ_INFERENCE_HOST}:{ConstantsLoader.EXTERNAL_LOADER_PORT}");
|
||||
dealer.Connect($"tcp://{ConstantsLoader.DEFAULT_ZMQ_LOADER_HOST}:{ConstantsLoader.EXTERNAL_LOADER_PORT}");
|
||||
|
||||
var result = SendCommand(dealer, RemoteCommand.Create(CommandType.Login, creds));
|
||||
if (result.CommandType != CommandType.Ok)
|
||||
|
||||
Reference in New Issue
Block a user