mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Merge pull request #715 from immense/tech/implement-submodule-changes
Implement remote control submodule changes.
This commit is contained in:
commit
ff11f18f8b
@ -6,7 +6,6 @@
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Agent.Installer.Win.ViewModels"
|
||||
xmlns:local="clr-namespace:Remotely.Agent.Installer.Win"
|
||||
mc:Ignorable="d"
|
||||
WindowStyle="None"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
AllowsTransparency="True"
|
||||
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
||||
@ -21,25 +20,11 @@
|
||||
</Window.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Height="50" Background="{Binding TitleBackgroundColor}">
|
||||
<DockPanel Margin="10,0,0,0">
|
||||
<DockPanel>
|
||||
<Image Height="50" Width="50" Margin="0,0,10,0" Source="{Binding Icon}"></Image>
|
||||
<TextBlock Foreground="{Binding TitleForegroundColor}" FontWeight="Bold" FontSize="20" VerticalAlignment="Center">
|
||||
<Run Text="{Binding ProductName}"></Run>
|
||||
<Run Text="Installer"></Run>
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
<Button Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}" />
|
||||
<Button Style="{StaticResource TitlebarButton}" Click="MinimizeButton_Click" Content="____" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Grid Grid.Row="1" Margin="10,15,10,0">
|
||||
<Grid Grid.Row="0" Margin="10,15,10,0">
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource SectionHeader}" Text="{Binding HeaderMessage}" Margin="0,0,0,10"></TextBlock>
|
||||
@ -122,7 +107,7 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<DockPanel Margin="10" Grid.Row="2">
|
||||
<DockPanel Margin="10" Grid.Row="1">
|
||||
<Button DockPanel.Dock="Left"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource NormalButton}"
|
||||
|
||||
@ -7,22 +7,4 @@ public class BrandingInfo
|
||||
public string Product { get; set; } = "Remotely";
|
||||
|
||||
public string? Icon { get; set; }
|
||||
|
||||
public byte TitleForegroundRed { get; set; } = 29;
|
||||
|
||||
public byte TitleForegroundGreen { get; set; } = 144;
|
||||
|
||||
public byte TitleForegroundBlue { get; set; } = 241;
|
||||
|
||||
public byte TitleBackgroundRed { get; set; } = 70;
|
||||
|
||||
public byte TitleBackgroundGreen { get; set; } = 70;
|
||||
|
||||
public byte TitleBackgroundBlue { get; set; } = 70;
|
||||
|
||||
public byte ButtonForegroundRed { get; set; } = 255;
|
||||
|
||||
public byte ButtonForegroundGreen { get; set; } = 255;
|
||||
|
||||
public byte ButtonForegroundBlue { get; set; } = 255;
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ public class InstallerService
|
||||
ProgressValueChanged?.Invoke(this, args.ProgressPercentage);
|
||||
};
|
||||
|
||||
await client.DownloadFileTaskAsync($"{serverUrl}/Content/Remotely-Win10-{_platform}.zip", targetFile);
|
||||
await client.DownloadFileTaskAsync($"{serverUrl}/Content/Remotely-Win-{_platform}.zip", targetFile);
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ public class InstallerService
|
||||
await Task.Delay(10);
|
||||
}
|
||||
|
||||
var wr = WebRequest.CreateHttp($"{serverUrl}/Content/Remotely-Win10-{_platform}.zip");
|
||||
var wr = WebRequest.CreateHttp($"{serverUrl}/Content/Remotely-Win-{_platform}.zip");
|
||||
wr.Method = "Head";
|
||||
using (var response = (HttpWebResponse)await wr.GetResponseAsync())
|
||||
{
|
||||
|
||||
@ -190,9 +190,6 @@ public class MainWindowViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
public SolidColorBrush? TitleBackgroundColor { get; set; }
|
||||
public SolidColorBrush? TitleButtonForegroundColor { get; set; }
|
||||
public SolidColorBrush? TitleForegroundColor { get; set; }
|
||||
public ICommand UninstallCommand => new RelayCommand(async (param) => { await Uninstall(); });
|
||||
private string? DeviceAlias { get; set; }
|
||||
private string? DeviceGroup { get; set; }
|
||||
@ -280,25 +277,6 @@ public class MainWindowViewModel : ViewModelBase
|
||||
ProductName = brandingInfo.Product;
|
||||
}
|
||||
|
||||
TitleBackgroundColor = new SolidColorBrush(Color.FromRgb(
|
||||
brandingInfo?.TitleBackgroundRed ?? 70,
|
||||
brandingInfo?.TitleBackgroundGreen ?? 70,
|
||||
brandingInfo?.TitleBackgroundBlue ?? 70));
|
||||
|
||||
TitleForegroundColor = new SolidColorBrush(Color.FromRgb(
|
||||
brandingInfo?.TitleForegroundRed ?? 29,
|
||||
brandingInfo?.TitleForegroundGreen ?? 144,
|
||||
brandingInfo?.TitleForegroundBlue ?? 241));
|
||||
|
||||
TitleButtonForegroundColor = new SolidColorBrush(Color.FromRgb(
|
||||
brandingInfo?.ButtonForegroundRed ?? 255,
|
||||
brandingInfo?.ButtonForegroundGreen ?? 255,
|
||||
brandingInfo?.ButtonForegroundBlue ?? 255));
|
||||
|
||||
TitleBackgroundColor.Freeze();
|
||||
TitleForegroundColor.Freeze();
|
||||
TitleButtonForegroundColor.Freeze();
|
||||
|
||||
Icon = GetBitmapImageIcon(brandingInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@ -24,14 +24,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.3.6" />
|
||||
<PackageReference Include="Microsoft.WSMan.Management" Version="7.3.6" />
|
||||
<PackageReference Include="Microsoft.WSMan.Runtime" Version="7.3.6" />
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Native\Immense.RemoteControl.Desktop.Native.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Shared\Immense.RemoteControl.Desktop.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Immense.RemoteControl.Desktop.Native.Windows;
|
||||
using Immense.RemoteControl.Desktop.Shared.Native.Windows;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@ -9,9 +9,7 @@ using Remotely.Shared;
|
||||
using Remotely.Shared.Enums;
|
||||
using Remotely.Shared.Interfaces;
|
||||
using Remotely.Shared.Models;
|
||||
using Remotely.Shared.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Shared.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -9,7 +10,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Shared.Services;
|
||||
namespace Remotely.Agent.Services;
|
||||
|
||||
public interface IFileLogsManager
|
||||
{
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
using Immense.RemoteControl.Desktop.Native.Windows;
|
||||
using Immense.RemoteControl.Desktop.Shared.Native.Windows;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Agent.Interfaces;
|
||||
using Remotely.Shared.Models;
|
||||
using Remotely.Shared.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Principal;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -126,7 +124,7 @@ public class AppLauncherWin : IAppLauncher
|
||||
targetSessionId: targetSessionId,
|
||||
forceConsoleSession: Shlwapi.IsOS(OsType.OS_ANYSERVER) && targetSessionId == -1,
|
||||
desktopName: "default",
|
||||
hiddenWindow: true,
|
||||
hiddenWindow: false,
|
||||
out _);
|
||||
if (!result)
|
||||
{
|
||||
@ -184,7 +182,7 @@ public class AppLauncherWin : IAppLauncher
|
||||
targetSessionId: targetSessionID,
|
||||
forceConsoleSession: Shlwapi.IsOS(OsType.OS_ANYSERVER) && targetSessionID == -1,
|
||||
desktopName: "default",
|
||||
hiddenWindow: true,
|
||||
hiddenWindow: false,
|
||||
out _);
|
||||
|
||||
if (!result)
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
using Immense.RemoteControl.Desktop.Native.Windows;
|
||||
using Immense.RemoteControl.Desktop.Shared.Native.Windows;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Agent.Interfaces;
|
||||
using Remotely.Shared.Dtos;
|
||||
using Remotely.Shared.Models;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -74,7 +74,7 @@ public class UpdaterWin : IUpdater
|
||||
var serverUrl = _configService.GetConnectionInfo().Host;
|
||||
|
||||
var platform = Environment.Is64BitOperatingSystem ? "x64" : "x86";
|
||||
var fileUrl = serverUrl + $"/Content/Remotely-Win10-{platform}.zip";
|
||||
var fileUrl = serverUrl + $"/Content/Remotely-Win-{platform}.zip";
|
||||
|
||||
using var httpClient = _httpClientFactory.CreateClient();
|
||||
using var request = new HttpRequestMessage(HttpMethod.Head, fileUrl);
|
||||
|
||||
@ -57,7 +57,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Desktop.Shared\Desktop.Shared.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Linux\Immense.RemoteControl.Desktop.Linux.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Shared\Immense.RemoteControl.Desktop.Shared.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop\Immense.RemoteControl.Desktop.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.UI\Immense.RemoteControl.Desktop.UI.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -2,92 +2,109 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
using Remotely.Desktop.Shared.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Shared.Services;
|
||||
using Immense.RemoteControl.Desktop.Shared.Services;
|
||||
using Immense.RemoteControl.Desktop.Services;
|
||||
using System.Diagnostics;
|
||||
using Immense.RemoteControl.Desktop.Startup;
|
||||
using Remotely.Shared.Utilities;
|
||||
using Immense.RemoteControl.Desktop.Shared.Startup;
|
||||
using System.Linq;
|
||||
using Immense.RemoteControl.Desktop.Linux.Startup;
|
||||
using Immense.RemoteControl.Desktop.UI.Services;
|
||||
using Avalonia;
|
||||
using Immense.RemoteControl.Desktop.UI;
|
||||
using Desktop.Shared.Services;
|
||||
|
||||
var version = AppVersionHelper.GetAppVersion();
|
||||
var logger = new FileLogger("Remotely_Desktop", version, "Program.cs");
|
||||
var filePath = Environment.ProcessPath ?? Environment.GetCommandLineArgs().First();
|
||||
var serverUrl = Debugger.IsAttached ? "http://localhost:5000" : string.Empty;
|
||||
var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath);
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
namespace Remotely.Desktop.XPlat;
|
||||
|
||||
public class Program
|
||||
{
|
||||
serverUrl = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning(getEmbeddedResult.Exception, "Failed to extract embedded server data.");
|
||||
}
|
||||
// This is needed for the visual designer to work.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddSingleton<IOrganizationIdProvider, OrganizationIdProvider>();
|
||||
services.AddSingleton<IEmbeddedServerDataSearcher, EmbeddedServerDataSearcher>();
|
||||
|
||||
services.AddRemoteControlLinux(
|
||||
config =>
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
config.AddBrandingProvider<BrandingProvider>();
|
||||
});
|
||||
var version = AppVersionHelper.GetAppVersion();
|
||||
var logger = new FileLogger("Remotely_Desktop", version, "Program.cs");
|
||||
var filePath = Environment.ProcessPath ?? Environment.GetCommandLineArgs().First();
|
||||
var serverUrl = Debugger.IsAttached ? "http://localhost:5000" : string.Empty;
|
||||
var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath);
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
serverUrl = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning(getEmbeddedResult.Exception, "Failed to extract embedded server data.");
|
||||
}
|
||||
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
if (EnvironmentHelper.IsDebug)
|
||||
{
|
||||
builder.SetMinimumLevel(LogLevel.Debug);
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddSingleton<IOrganizationIdProvider, OrganizationIdProvider>();
|
||||
services.AddSingleton<IEmbeddedServerDataSearcher, EmbeddedServerDataSearcher>();
|
||||
|
||||
services.AddRemoteControlLinux(
|
||||
config =>
|
||||
{
|
||||
config.AddBrandingProvider<BrandingProvider>();
|
||||
});
|
||||
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
if (EnvironmentHelper.IsDebug)
|
||||
{
|
||||
builder.SetMinimumLevel(LogLevel.Debug);
|
||||
}
|
||||
builder.AddProvider(new FileLoggerProvider("Remotely_Desktop", version));
|
||||
});
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
||||
var appState = provider.GetRequiredService<IAppState>();
|
||||
var orgIdProvider = provider.GetRequiredService<IOrganizationIdProvider>();
|
||||
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
orgIdProvider.OrganizationId = getEmbeddedResult.Value.OrganizationId;
|
||||
appState.Host = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
|
||||
if (appState.ArgDict.TryGetValue("org-id", out var orgId))
|
||||
{
|
||||
orgIdProvider.OrganizationId = orgId;
|
||||
}
|
||||
|
||||
var result = await provider.UseRemoteControlClient(
|
||||
args,
|
||||
"The remote control client for Remotely.",
|
||||
serverUrl,
|
||||
false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
logger.LogError(result.Exception, "Failed to start remote control client.");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine("Press Ctrl + C to exit.");
|
||||
|
||||
var shutdownService = provider.GetRequiredService<IShutdownService>();
|
||||
Console.CancelKeyPress += async (s, e) =>
|
||||
{
|
||||
await shutdownService.Shutdown();
|
||||
};
|
||||
|
||||
var dispatcher = provider.GetRequiredService<IUiDispatcher>();
|
||||
try
|
||||
{
|
||||
await Task.Delay(Timeout.InfiniteTimeSpan, dispatcher.ApplicationExitingToken);
|
||||
}
|
||||
catch (TaskCanceledException) { }
|
||||
}
|
||||
builder.AddProvider(new FileLoggerProvider("Remotely_Desktop", version));
|
||||
});
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
||||
var appState = provider.GetRequiredService<IAppState>();
|
||||
var orgIdProvider = provider.GetRequiredService<IOrganizationIdProvider>();
|
||||
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
orgIdProvider.OrganizationId = getEmbeddedResult.Value.OrganizationId;
|
||||
appState.Host = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
|
||||
if (appState.ArgDict.TryGetValue("org-id", out var orgId))
|
||||
{
|
||||
orgIdProvider.OrganizationId = orgId;
|
||||
}
|
||||
|
||||
var result = await provider.UseRemoteControlClient(
|
||||
args,
|
||||
"The remote control client for Remotely.",
|
||||
serverUrl,
|
||||
false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
logger.LogError(result.Exception, "Failed to start remote control client.");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine("Press Ctrl + C to exit.");
|
||||
|
||||
var shutdownService = provider.GetRequiredService<IShutdownService>();
|
||||
Console.CancelKeyPress += async (s, e) =>
|
||||
{
|
||||
await shutdownService.Shutdown();
|
||||
};
|
||||
|
||||
var dispatcher = provider.GetRequiredService<IAvaloniaDispatcher>();
|
||||
try
|
||||
{
|
||||
await Task.Delay(Timeout.InfiniteTimeSpan, dispatcher.AppCancellationToken);
|
||||
}
|
||||
catch (TaskCanceledException) { }
|
||||
}
|
||||
@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Content\Linux-x64\</PublishDir>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
|
||||
@ -7,8 +7,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\net7.0\linux-x64\publish\Desktop</PublishDir>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\publish\linux-x64\Desktop</PublishDir>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
|
||||
@ -3,37 +3,25 @@ using Immense.RemoteControl.Desktop.Shared.Services;
|
||||
using Immense.RemoteControl.Shared;
|
||||
using Immense.RemoteControl.Shared.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Shared;
|
||||
using Remotely.Shared.Entities;
|
||||
using Remotely.Shared.Enums;
|
||||
using Remotely.Shared.Services;
|
||||
using Remotely.Shared.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Desktop.Shared.Services;
|
||||
namespace Desktop.Shared.Services;
|
||||
|
||||
public class BrandingProvider : IBrandingProvider
|
||||
{
|
||||
private readonly IAppState _appState;
|
||||
private readonly IOrganizationIdProvider _orgIdProvider;
|
||||
private readonly IEmbeddedServerDataSearcher _embeddedDataSearcher;
|
||||
private readonly ILogger<BrandingProvider> _logger;
|
||||
private BrandingInfoBase _brandingInfo = new()
|
||||
{
|
||||
Product = "Remote Control"
|
||||
};
|
||||
private readonly IOrganizationIdProvider _orgIdProvider;
|
||||
private BrandingInfoBase? _brandingInfo;
|
||||
|
||||
|
||||
public BrandingProvider(
|
||||
IAppState appState,
|
||||
IOrganizationIdProvider orgIdProvider,
|
||||
IAppState appState,
|
||||
IOrganizationIdProvider orgIdProvider,
|
||||
IEmbeddedServerDataSearcher embeddedServerDataSearcher,
|
||||
ILogger<BrandingProvider> logger)
|
||||
{
|
||||
@ -43,8 +31,16 @@ public class BrandingProvider : IBrandingProvider
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<BrandingInfoBase> GetBrandingInfo()
|
||||
public BrandingInfoBase CurrentBranding => _brandingInfo ??
|
||||
throw new InvalidOperationException("Branding info has not been set or initialized.");
|
||||
|
||||
public async Task Initialize()
|
||||
{
|
||||
if (_brandingInfo is not null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var result = await TryGetBrandingInfo();
|
||||
|
||||
if (result.IsSuccess)
|
||||
@ -54,9 +50,13 @@ public class BrandingProvider : IBrandingProvider
|
||||
else
|
||||
{
|
||||
_logger.LogWarning(result.Exception, "Failed to extract embedded service data.");
|
||||
_brandingInfo = new()
|
||||
{
|
||||
Product = "Remote Control"
|
||||
};
|
||||
}
|
||||
|
||||
if (!_brandingInfo.Icon.Any())
|
||||
if (_brandingInfo.Icon?.Any() != true)
|
||||
{
|
||||
using var mrs = typeof(BrandingProvider).Assembly.GetManifestResourceStream("Desktop.Shared.Assets.Remotely_Icon.png");
|
||||
using var ms = new MemoryStream();
|
||||
@ -64,7 +64,6 @@ public class BrandingProvider : IBrandingProvider
|
||||
|
||||
_brandingInfo.Icon = ms.ToArray();
|
||||
}
|
||||
return _brandingInfo;
|
||||
}
|
||||
|
||||
public void SetBrandingInfo(BrandingInfoBase brandingInfo)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
|
||||
namespace Remotely.Desktop.Shared.Services;
|
||||
namespace Desktop.Shared.Services;
|
||||
|
||||
public interface IOrganizationIdProvider
|
||||
{
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<AssemblyName>Remotely_Desktop</AssemblyName>
|
||||
<RootNamespace>Remotely.Desktop.Win</RootNamespace>
|
||||
<ApplicationIcon>Assets\favicon.ico</ApplicationIcon>
|
||||
@ -52,6 +50,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Desktop.Shared\Desktop.Shared.csproj" />
|
||||
<ProjectReference Include="..\Shared\Shared.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.UI\Immense.RemoteControl.Desktop.UI.csproj" />
|
||||
<ProjectReference Include="..\submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Windows\Immense.RemoteControl.Desktop.Windows.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -1,85 +1,100 @@
|
||||
using Immense.RemoteControl.Desktop.Shared.Abstractions;
|
||||
using Immense.RemoteControl.Desktop.UI.WPF.Services;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System;
|
||||
using Immense.RemoteControl.Desktop.Windows;
|
||||
using Remotely.Desktop.Shared.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Remotely.Shared.Services;
|
||||
using Immense.RemoteControl.Desktop.Shared.Services;
|
||||
using System.Diagnostics;
|
||||
using Remotely.Shared.Utilities;
|
||||
using Immense.RemoteControl.Desktop.Windows.Startup;
|
||||
using Immense.RemoteControl.Desktop.Shared.Startup;
|
||||
using System.Linq;
|
||||
using Immense.RemoteControl.Desktop.Windows.Startup;
|
||||
using Immense.RemoteControl.Desktop.UI.Services;
|
||||
using Avalonia;
|
||||
using Immense.RemoteControl.Desktop.UI;
|
||||
using Desktop.Shared.Services;
|
||||
|
||||
var version = AppVersionHelper.GetAppVersion();
|
||||
var logger = new FileLogger("Remotely_Desktop", version, "Program.cs");
|
||||
var filePath = Environment.ProcessPath ?? Environment.GetCommandLineArgs().First();
|
||||
var serverUrl = Debugger.IsAttached ? "https://localhost:5001" : string.Empty;
|
||||
var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath);
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
namespace Remotely.Desktop.Win;
|
||||
|
||||
public class Program
|
||||
{
|
||||
serverUrl = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning(getEmbeddedResult.Exception, "Failed to extract embedded server data.");
|
||||
}
|
||||
var services = new ServiceCollection();
|
||||
// This is needed for the visual designer to work.
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.WithInterFont()
|
||||
.LogToTrace();
|
||||
|
||||
services.AddSingleton<IOrganizationIdProvider, OrganizationIdProvider>();
|
||||
services.AddSingleton<IEmbeddedServerDataSearcher>(EmbeddedServerDataSearcher.Instance);
|
||||
|
||||
services.AddRemoteControlWindows(
|
||||
config =>
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
config.AddBrandingProvider<BrandingProvider>();
|
||||
});
|
||||
var version = AppVersionHelper.GetAppVersion();
|
||||
var logger = new FileLogger("Remotely_Desktop", version, "Program.cs");
|
||||
var filePath = Environment.ProcessPath ?? Environment.GetCommandLineArgs().First();
|
||||
var serverUrl = Debugger.IsAttached ? "https://localhost:5001" : string.Empty;
|
||||
var getEmbeddedResult = await EmbeddedServerDataSearcher.Instance.TryGetEmbeddedData(filePath);
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
serverUrl = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogWarning(getEmbeddedResult.Exception, "Failed to extract embedded server data.");
|
||||
}
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
if (EnvironmentHelper.IsDebug)
|
||||
{
|
||||
builder.SetMinimumLevel(LogLevel.Debug);
|
||||
services.AddSingleton<IOrganizationIdProvider, OrganizationIdProvider>();
|
||||
services.AddSingleton<IEmbeddedServerDataSearcher>(EmbeddedServerDataSearcher.Instance);
|
||||
|
||||
services.AddRemoteControlWindows(
|
||||
config =>
|
||||
{
|
||||
config.AddBrandingProvider<BrandingProvider>();
|
||||
});
|
||||
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
if (EnvironmentHelper.IsDebug)
|
||||
{
|
||||
builder.SetMinimumLevel(LogLevel.Debug);
|
||||
}
|
||||
builder.AddProvider(new FileLoggerProvider("Remotely_Desktop", version));
|
||||
});
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
||||
var appState = provider.GetRequiredService<IAppState>();
|
||||
var orgIdProvider = provider.GetRequiredService<IOrganizationIdProvider>();
|
||||
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
orgIdProvider.OrganizationId = getEmbeddedResult.Value.OrganizationId;
|
||||
appState.Host = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
|
||||
if (appState.ArgDict.TryGetValue("org-id", out var orgId))
|
||||
{
|
||||
orgIdProvider.OrganizationId = orgId;
|
||||
}
|
||||
|
||||
var result = await provider.UseRemoteControlClient(
|
||||
args,
|
||||
"The remote control client for Remotely.",
|
||||
serverUrl,
|
||||
false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
logger.LogError(result.Exception, "Failed to start remote control client.");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
var dispatcher = provider.GetRequiredService<IUiDispatcher>();
|
||||
|
||||
try
|
||||
{
|
||||
await Task.Delay(Timeout.InfiniteTimeSpan, dispatcher.ApplicationExitingToken);
|
||||
}
|
||||
catch (TaskCanceledException) { }
|
||||
}
|
||||
builder.AddProvider(new FileLoggerProvider("Remotely_Desktop", version));
|
||||
});
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
||||
var appState = provider.GetRequiredService<IAppState>();
|
||||
var orgIdProvider = provider.GetRequiredService<IOrganizationIdProvider>();
|
||||
|
||||
if (getEmbeddedResult.IsSuccess)
|
||||
{
|
||||
orgIdProvider.OrganizationId = getEmbeddedResult.Value.OrganizationId;
|
||||
appState.Host = getEmbeddedResult.Value.ServerUrl.AbsoluteUri;
|
||||
}
|
||||
|
||||
if (appState.ArgDict.TryGetValue("org-id", out var orgId))
|
||||
{
|
||||
orgIdProvider.OrganizationId = orgId;
|
||||
}
|
||||
|
||||
var result = await provider.UseRemoteControlClient(
|
||||
args,
|
||||
"The remote control client for Remotely.",
|
||||
serverUrl,
|
||||
false);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
logger.LogError(result.Exception, "Failed to start remote control client.");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
var dispatcher = provider.GetRequiredService<IWindowsUiDispatcher>();
|
||||
|
||||
try
|
||||
{
|
||||
await Task.Delay(Timeout.InfiniteTimeSpan, dispatcher.ApplicationExitingToken);
|
||||
}
|
||||
catch (TaskCanceledException) { }
|
||||
}
|
||||
@ -7,14 +7,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Content\Win-x64\</PublishDir>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>False</PublishTrimmed>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -7,9 +7,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Content\Win-x86\</PublishDir>
|
||||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
|
||||
@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Platform>x64</Platform>
|
||||
<PublishDir>C:\Program Files\Remotely\Desktop</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
|
||||
@ -7,10 +7,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\net7.0\win10-x64\publish\Desktop</PublishDir>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\publish\win-x64\Desktop</PublishDir>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>False</PublishTrimmed>
|
||||
|
||||
@ -7,12 +7,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\net7.0\win10-x64\publish\Desktop</PublishDir>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\publish\win-x64\Desktop</PublishDir>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>False</PublishTrimmed>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -7,9 +7,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\net7.0\win10-x86\publish\Desktop</PublishDir>
|
||||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\publish\win-x86\Desktop</PublishDir>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<PublishDir>bin\Release\win-x64\publish\</PublishDir>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>.net7.0-windows</TargetFramework>
|
||||
<PublishDir>bin\Release\win-x86\publish\</PublishDir>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>True</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
75
Remotely.sln
75
Remotely.sln
@ -65,20 +65,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docker", "Docker", "{963B55
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.Shared", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Shared\Immense.RemoteControl.Desktop.Shared.csproj", "{3EB48B01-A672-4658-868B-8CA21FF73929}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.UI.WPF", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.UI.WPF\Immense.RemoteControl.Desktop.UI.WPF.csproj", "{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.Windows", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Windows\Immense.RemoteControl.Desktop.Windows.csproj", "{7FA4456D-8695-4990-B20A-B897CF9DF0EF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Server", "submodules\Immense.RemoteControl\Immense.RemoteControl.Server\Immense.RemoteControl.Server.csproj", "{8CBED18D-64A8-44C0-8433-EE14E93B472A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Shared", "submodules\Immense.RemoteControl\Immense.RemoteControl.Shared\Immense.RemoteControl.Shared.csproj", "{FEF0D431-EB2F-4C08-A125-8DF59AFDA525}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop\Immense.RemoteControl.Desktop.csproj", "{034984DC-4B47-42E9-8648-F258C40C7926}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.Native", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Native\Immense.RemoteControl.Desktop.Native.csproj", "{7A8378BC-8169-4A33-93C6-47C699C5E74D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E4D83C37-8B98-44FB-898B-9AA1BB223C66}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.Linux", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.Linux\Immense.RemoteControl.Desktop.Linux.csproj", "{2FF27827-1F43-474E-A0E3-DA76BC598BCC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Immense.RemoteControl.Desktop.UI", "submodules\Immense.RemoteControl\Immense.RemoteControl.Desktop.UI\Immense.RemoteControl.Desktop.UI.csproj", "{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -221,18 +219,6 @@ Global
|
||||
{3EB48B01-A672-4658-868B-8CA21FF73929}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3EB48B01-A672-4658-868B-8CA21FF73929}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3EB48B01-A672-4658-868B-8CA21FF73929}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7FA4456D-8695-4990-B20A-B897CF9DF0EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7FA4456D-8695-4990-B20A-B897CF9DF0EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7FA4456D-8695-4990-B20A-B897CF9DF0EF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
@ -269,30 +255,30 @@ Global
|
||||
{FEF0D431-EB2F-4C08-A125-8DF59AFDA525}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FEF0D431-EB2F-4C08-A125-8DF59AFDA525}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{FEF0D431-EB2F-4C08-A125-8DF59AFDA525}.Release|x86.Build.0 = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|x64.Build.0 = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D}.Release|x86.Build.0 = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -303,13 +289,12 @@ Global
|
||||
{B6C1030D-1F74-4143-BB70-FC79C0274653} = {0754E195-7080-4AAC-B5A3-A9923B1283CE}
|
||||
{963B5555-30AE-428E-9686-59C4B6FEC052} = {2176596E-12DA-4766-96E1-4D23EA7DBEC8}
|
||||
{3EB48B01-A672-4658-868B-8CA21FF73929} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{A6C36B1F-A5EA-4C9C-88E2-FAA05CE89D78} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{7FA4456D-8695-4990-B20A-B897CF9DF0EF} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{8CBED18D-64A8-44C0-8433-EE14E93B472A} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{FEF0D431-EB2F-4C08-A125-8DF59AFDA525} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{034984DC-4B47-42E9-8648-F258C40C7926} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{7A8378BC-8169-4A33-93C6-47C699C5E74D} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{E4D83C37-8B98-44FB-898B-9AA1BB223C66} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{2FF27827-1F43-474E-A0E3-DA76BC598BCC} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
{3095BA44-D5E0-42B4-9161-7F7AB8E68A10} = {48C738FB-359E-43DB-B338-FD7CB1CCF6A8}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EAE10B28-119B-437C-9E68-06F0EE3F968A}
|
||||
|
||||
@ -56,10 +56,10 @@ public class AgentUpdateController : ControllerBase
|
||||
switch (platform.ToLower())
|
||||
{
|
||||
case "win-x64":
|
||||
filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely-Win10-x64.zip");
|
||||
filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely-Win-x64.zip");
|
||||
break;
|
||||
case "win-x86":
|
||||
filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely-Win10-x86.zip");
|
||||
filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely-Win-x86.zip");
|
||||
break;
|
||||
case "linux":
|
||||
filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely-Linux.zip");
|
||||
|
||||
@ -1,19 +1,13 @@
|
||||
using Immense.RemoteControl.Desktop.Native.Windows;
|
||||
using Immense.RemoteControl.Shared;
|
||||
using Immense.RemoteControl.Shared.Extensions;
|
||||
using MailKit;
|
||||
using Immense.RemoteControl.Shared.Extensions;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.WebUtilities;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Org.BouncyCastle.Crypto.Agreement;
|
||||
using Remotely.Server.Auth;
|
||||
using Remotely.Server.Extensions;
|
||||
using Remotely.Server.Services;
|
||||
using Remotely.Shared.Entities;
|
||||
using Remotely.Shared.ViewModels;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -85,6 +85,7 @@ public partial class ChatCard : AuthComponentBase, IAsyncDisposable
|
||||
|
||||
private async Task CloseChatCard()
|
||||
{
|
||||
await CircuitConnection.SendChat(string.Empty, $"{Session.DeviceId}", true);
|
||||
_ = ChatSessionStore.TryRemove($"{Session.DeviceId}", out _);
|
||||
var message = new ChatSessionsChangedMessage();
|
||||
await Messenger.Send(message, CircuitConnection.ConnectionId);
|
||||
|
||||
@ -45,7 +45,7 @@ public interface ICircuitConnection
|
||||
|
||||
Task RunScript(IEnumerable<string> deviceIds, Guid savedScriptId, int scriptRunId, ScriptInputType scriptInputType, bool runAsHostedService);
|
||||
|
||||
Task SendChat(string message, string deviceId);
|
||||
Task SendChat(string message, string deviceId, bool isDisconnecting = false);
|
||||
Task<bool> TransferFileFromBrowserToAgent(string deviceId, string transferId, string[] fileIds);
|
||||
|
||||
Task TriggerHeartbeat(string deviceId);
|
||||
@ -360,7 +360,7 @@ public class CircuitConnection : CircuitHandler, ICircuitConnection
|
||||
|
||||
}
|
||||
|
||||
public async Task SendChat(string message, string deviceId)
|
||||
public async Task SendChat(string message, string deviceId, bool isDisconnecting = false)
|
||||
{
|
||||
if (!_dataService.DoesUserHaveAccessToDevice(deviceId, User))
|
||||
{
|
||||
@ -392,7 +392,7 @@ public class CircuitConnection : CircuitHandler, ICircuitConnection
|
||||
message,
|
||||
orgResult.Value,
|
||||
User.OrganizationID,
|
||||
false,
|
||||
isDisconnecting,
|
||||
ConnectionId);
|
||||
}
|
||||
|
||||
|
||||
1201
Server/Migrations/PostgreSql/20230821190450_Remove_TitleBranding.Designer.cs
generated
Normal file
1201
Server/Migrations/PostgreSql/20230821190450_Remove_TitleBranding.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,117 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Remotely.Server.Migrations.PostgreSql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Remove_TitleBranding : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "smallint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ namespace Remotely.Server.Migrations.PostgreSql
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.9")
|
||||
.HasAnnotation("ProductVersion", "7.0.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
@ -357,15 +357,6 @@ namespace Remotely.Server.Migrations.PostgreSql
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<byte>("ButtonForegroundBlue")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("ButtonForegroundGreen")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("ButtonForegroundRed")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte[]>("Icon")
|
||||
.IsRequired()
|
||||
.HasColumnType("bytea");
|
||||
@ -378,24 +369,6 @@ namespace Remotely.Server.Migrations.PostgreSql
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("character varying(25)");
|
||||
|
||||
b.Property<byte>("TitleBackgroundBlue")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("TitleBackgroundGreen")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("TitleBackgroundRed")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("TitleForegroundBlue")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("TitleForegroundGreen")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.Property<byte>("TitleForegroundRed")
|
||||
.HasColumnType("smallint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId")
|
||||
|
||||
1204
Server/Migrations/SqlServer/20230821190440_Remove_TitleBranding.Designer.cs
generated
Normal file
1204
Server/Migrations/SqlServer/20230821190440_Remove_TitleBranding.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,117 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Remotely.Server.Migrations.SqlServer
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Remove_TitleBranding : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "tinyint",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -17,7 +17,7 @@ namespace Remotely.Server.Migrations.SqlServer
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.9")
|
||||
.HasAnnotation("ProductVersion", "7.0.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
@ -359,15 +359,6 @@ namespace Remotely.Server.Migrations.SqlServer
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<byte>("ButtonForegroundBlue")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("ButtonForegroundGreen")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("ButtonForegroundRed")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte[]>("Icon")
|
||||
.IsRequired()
|
||||
.HasColumnType("varbinary(max)");
|
||||
@ -380,24 +371,6 @@ namespace Remotely.Server.Migrations.SqlServer
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("nvarchar(25)");
|
||||
|
||||
b.Property<byte>("TitleBackgroundBlue")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("TitleBackgroundGreen")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("TitleBackgroundRed")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("TitleForegroundBlue")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("TitleForegroundGreen")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.Property<byte>("TitleForegroundRed")
|
||||
.HasColumnType("tinyint");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId")
|
||||
|
||||
1197
Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.Designer.cs
generated
Normal file
1197
Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
117
Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.cs
Normal file
117
Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.cs
Normal file
@ -0,0 +1,117 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Remotely.Server.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Remove_TitleBranding : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "ButtonForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleBackgroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundBlue",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundGreen",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
|
||||
migrationBuilder.AddColumn<byte>(
|
||||
name: "TitleForegroundRed",
|
||||
table: "BrandingInfos",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: (byte)0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15,7 +15,7 @@ namespace Remotely.Server.Migrations.Sqlite
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.9");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.10");
|
||||
|
||||
modelBuilder.Entity("DeviceGroupRemotelyUser", b =>
|
||||
{
|
||||
@ -349,15 +349,6 @@ namespace Remotely.Server.Migrations.Sqlite
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<byte>("ButtonForegroundBlue")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("ButtonForegroundGreen")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("ButtonForegroundRed")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte[]>("Icon")
|
||||
.IsRequired()
|
||||
.HasColumnType("BLOB");
|
||||
@ -370,24 +361,6 @@ namespace Remotely.Server.Migrations.Sqlite
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<byte>("TitleBackgroundBlue")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("TitleBackgroundGreen")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("TitleBackgroundRed")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("TitleForegroundBlue")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("TitleForegroundGreen")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<byte>("TitleForegroundRed")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrganizationId")
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
@attribute [Authorize(Policy = PolicyNames.OrganizationAdminRequired)]
|
||||
@inject IDataService DataService
|
||||
@inject IToastService ToastService
|
||||
@inject IJsInterop JsInterop
|
||||
@inject IJsInterop JsInterop
|
||||
@using Remotely.Server.Models
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
|
||||
@ -11,16 +11,6 @@
|
||||
|
||||
<AlertBanner Message="@_alertMessage" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-lg-6 col-xl-5">
|
||||
<div class="form-group">
|
||||
<label class="mb-1">Branding Areas</label>
|
||||
<br />
|
||||
<img class="img-fluid" src="/images/Remotely_Desktop.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-lg-6 col-xl-5">
|
||||
<EditForm OnValidSubmit="HandleValidSubmit" Model="_inputModel">
|
||||
@ -32,31 +22,23 @@
|
||||
<ValidationMessage For="() => _inputModel.ProductName" />
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_base64Icon))
|
||||
{
|
||||
<div class="form-group mb-4">
|
||||
<label class="text-info font-weight-bold">Current Icon</label>
|
||||
<br />
|
||||
<img class="img-fluid" src="data:image/png;base64,@_base64Icon" />
|
||||
</div>
|
||||
}
|
||||
<div class="form-group mb-4">
|
||||
<label class="text-info font-weight-bold d-block">Current Icon</label>
|
||||
<br />
|
||||
@if (!string.IsNullOrWhiteSpace(_base64Icon))
|
||||
{
|
||||
<img class="branding-icon" src="data:image/png;base64,@_base64Icon" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="branding-icon" src="/images/Remotely_Icon.png" />
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-5">
|
||||
<label class="text-info font-weight-bold">New Icon</label>
|
||||
<InputFile type="file" accept="image/png" class="form-control" OnChange="IconUploadInputChanged" />
|
||||
</div>
|
||||
<div class="form-group mb-5">
|
||||
<label class="text-info font-weight-bold">Title Foreground</label>
|
||||
<ColorPicker @bind-Color="_inputModel.TitleForegroundColor" />
|
||||
</div>
|
||||
<div class="form-group mb-5">
|
||||
<label class="text-info font-weight-bold">Title Background</label>
|
||||
<ColorPicker @bind-Color="_inputModel.TitleBackgroundColor" />
|
||||
</div>
|
||||
<div class="form-group mb-5">
|
||||
<label class="text-info font-weight-bold">Button Color</label>
|
||||
<ColorPicker @bind-Color="_inputModel.TitleButtonColor" />
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button class="btn btn-secondary mr-3" type="button" @onclick="ResetBranding">Reset</button>
|
||||
<button class="btn btn-primary" type="submit">Submit</button>
|
||||
@ -76,10 +58,6 @@
|
||||
[Display(Name = "Product Name")]
|
||||
public string ProductName { get; set; } = string.Empty;
|
||||
|
||||
public ColorPickerModel TitleForegroundColor { get; set; } = new();
|
||||
public ColorPickerModel TitleBackgroundColor { get; set; } = new();
|
||||
public ColorPickerModel TitleButtonColor { get; set; } = new();
|
||||
|
||||
public byte[] IconBytes { get; set; } = Array.Empty<byte>();
|
||||
}
|
||||
|
||||
@ -97,10 +75,7 @@
|
||||
await DataService.UpdateBrandingInfo(
|
||||
User.OrganizationID,
|
||||
_inputModel.ProductName,
|
||||
_inputModel.IconBytes,
|
||||
_inputModel.TitleForegroundColor,
|
||||
_inputModel.TitleBackgroundColor,
|
||||
_inputModel.TitleButtonColor);
|
||||
_inputModel.IconBytes);
|
||||
|
||||
if (_inputModel?.IconBytes?.Any() == true)
|
||||
{
|
||||
@ -139,7 +114,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var brandingResult= await DataService.GetBrandingInfo(orgResult.Value.ID);
|
||||
var brandingResult = await DataService.GetBrandingInfo(orgResult.Value.ID);
|
||||
|
||||
if (!brandingResult.IsSuccess)
|
||||
{
|
||||
@ -154,18 +129,6 @@
|
||||
{
|
||||
_base64Icon = Convert.ToBase64String(brandingInfo.Icon);
|
||||
}
|
||||
|
||||
_inputModel.TitleForegroundColor.Red = brandingInfo.TitleForegroundRed;
|
||||
_inputModel.TitleForegroundColor.Green = brandingInfo.TitleForegroundGreen;
|
||||
_inputModel.TitleForegroundColor.Blue = brandingInfo.TitleForegroundBlue;
|
||||
|
||||
_inputModel.TitleBackgroundColor.Red = brandingInfo.TitleBackgroundRed;
|
||||
_inputModel.TitleBackgroundColor.Green = brandingInfo.TitleBackgroundGreen;
|
||||
_inputModel.TitleBackgroundColor.Blue = brandingInfo.TitleBackgroundBlue;
|
||||
|
||||
_inputModel.TitleButtonColor.Red = brandingInfo.ButtonForegroundRed;
|
||||
_inputModel.TitleButtonColor.Green = brandingInfo.ButtonForegroundGreen;
|
||||
_inputModel.TitleButtonColor.Blue = brandingInfo.ButtonForegroundBlue;
|
||||
}
|
||||
|
||||
private async Task ResetBranding()
|
||||
|
||||
4
Server/Pages/Branding.razor.css
Normal file
4
Server/Pages/Branding.razor.css
Normal file
@ -0,0 +1,4 @@
|
||||
.branding-icon {
|
||||
max-width: 8rem;
|
||||
height: auto;
|
||||
}
|
||||
@ -65,9 +65,9 @@
|
||||
<p>
|
||||
<a target="_blank" href="/API/ClientDownloads/WindowsInstaller">Windows Installer (x64/x86)</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-Win10-x64.zip">Windows x64 Files Only</a>
|
||||
<a target="_blank" href="/Content/Remotely-Win-x64.zip">Windows x64 Files Only</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-Win10-x86.zip">Windows x86 Files Only</a>
|
||||
<a target="_blank" href="/Content/Remotely-Win-x86.zip">Windows x86 Files Only</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -95,7 +95,7 @@
|
||||
-quiet
|
||||
-organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6"
|
||||
-serverurl "https://remotely.mytechshop.com"
|
||||
-path "[path]\Remotely-Win10-x64.zip"
|
||||
-path "[path]\Remotely-Win-x64.zip"
|
||||
</code>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@ -18,20 +18,20 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.9">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.10">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.9" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
|
||||
|
||||
@ -206,12 +206,9 @@ public interface IDataService
|
||||
Task<bool> TempPasswordSignIn(string email, string password);
|
||||
|
||||
Task UpdateBrandingInfo(
|
||||
string organizationId,
|
||||
string organizationId,
|
||||
string productName,
|
||||
byte[] iconBytes,
|
||||
ColorPickerModel titleForeground,
|
||||
ColorPickerModel titleBackground,
|
||||
ColorPickerModel titleButtonForeground);
|
||||
byte[] iconBytes);
|
||||
|
||||
Task<Result<Device>> UpdateDevice(DeviceSetupOptions deviceOptions, string organizationId);
|
||||
|
||||
@ -2043,10 +2040,7 @@ public class DataService : IDataService
|
||||
public async Task UpdateBrandingInfo(
|
||||
string organizationId,
|
||||
string productName,
|
||||
byte[] iconBytes,
|
||||
ColorPickerModel titleForeground,
|
||||
ColorPickerModel titleBackground,
|
||||
ColorPickerModel titleButtonForeground)
|
||||
byte[] iconBytes)
|
||||
{
|
||||
using var dbContext = _appDbFactory.GetContext();
|
||||
|
||||
@ -2068,18 +2062,6 @@ public class DataService : IDataService
|
||||
organization.BrandingInfo.Icon = iconBytes;
|
||||
}
|
||||
|
||||
organization.BrandingInfo.TitleBackgroundRed = titleBackground.Red;
|
||||
organization.BrandingInfo.TitleBackgroundGreen = titleBackground.Green;
|
||||
organization.BrandingInfo.TitleBackgroundBlue = titleBackground.Blue;
|
||||
|
||||
organization.BrandingInfo.TitleForegroundRed = titleForeground.Red;
|
||||
organization.BrandingInfo.TitleForegroundGreen = titleForeground.Green;
|
||||
organization.BrandingInfo.TitleForegroundBlue = titleForeground.Blue;
|
||||
|
||||
organization.BrandingInfo.ButtonForegroundRed = titleButtonForeground.Red;
|
||||
organization.BrandingInfo.ButtonForegroundGreen = titleButtonForeground.Green;
|
||||
organization.BrandingInfo.ButtonForegroundBlue = titleButtonForeground.Blue;
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
@ -97,6 +97,12 @@ public class HubEventHandler : IHubEventHandler
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
if (ex.RequireConsent)
|
||||
{
|
||||
// Don't restart if consent wasn't granted on the first request.
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
_logger.LogDebug("Windows session changed during remote control. " +
|
||||
"Reason: {reason}. " +
|
||||
"Current Session ID: {sessionId}. " +
|
||||
@ -126,6 +132,12 @@ public class HubEventHandler : IHubEventHandler
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
if (ex.RequireConsent)
|
||||
{
|
||||
// Don't restart if consent wasn't granted on the first request.
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
return _serviceHub.Clients
|
||||
.Client(ex.AgentConnectionId)
|
||||
.RestartScreenCaster(
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
.DESCRIPTION
|
||||
Do not modify this script. It was generated specifically for your account.
|
||||
.EXAMPLE
|
||||
powershell.exe -f Install-Win10.ps1
|
||||
powershell.exe -f Install-Win10.ps1 -DeviceAlias "My Super Computer" -DeviceGroup "My Stuff"
|
||||
powershell.exe -f Install-Win.ps1
|
||||
powershell.exe -f Install-Win.ps1 -DeviceAlias "My Super Computer" -DeviceGroup "My Stuff"
|
||||
#>
|
||||
|
||||
param (
|
||||
@ -102,17 +102,17 @@ function Install-Remotely {
|
||||
|
||||
if ($Path) {
|
||||
Write-Log "Copying install files..."
|
||||
Copy-Item -Path $Path -Destination "$env:TEMP\Remotely-Win10-$Platform.zip"
|
||||
Copy-Item -Path $Path -Destination "$env:TEMP\Remotely-Win-$Platform.zip"
|
||||
|
||||
}
|
||||
else {
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
Write-Log "Downloading client..."
|
||||
Invoke-WebRequest -Uri "$HostName/Content/Remotely-Win10-$Platform.zip" -OutFile "$env:TEMP\Remotely-Win10-$Platform.zip"
|
||||
Invoke-WebRequest -Uri "$HostName/Content/Remotely-Win-$Platform.zip" -OutFile "$env:TEMP\Remotely-Win-$Platform.zip"
|
||||
$ProgressPreference = 'Continue'
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path "$env:TEMP\Remotely-Win10-$Platform.zip")) {
|
||||
if (!(Test-Path -Path "$env:TEMP\Remotely-Win-$Platform.zip")) {
|
||||
Write-Log "Client files failed to download."
|
||||
Do-Exit
|
||||
}
|
||||
@ -120,7 +120,7 @@ function Install-Remotely {
|
||||
Stop-Remotely
|
||||
Get-ChildItem -Path "C:\Program Files\Remotely" | Where-Object {$_.Name -notlike "ConnectionInfo.json"} | Remove-Item -Recurse -Force
|
||||
|
||||
Expand-Archive -Path "$env:TEMP\Remotely-Win10-$Platform.zip" -DestinationPath "$InstallPath" -Force
|
||||
Expand-Archive -Path "$env:TEMP\Remotely-Win-$Platform.zip" -DestinationPath "$InstallPath" -Force
|
||||
|
||||
New-Item -ItemType File -Path "$InstallPath\ConnectionInfo.json" -Value (ConvertTo-Json -InputObject $ConnectionInfo) -Force
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="7.0.10" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="7.0.3" />
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
|
||||
<PackageReference Include="Moq" Version="[4.18.4]" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Remotely.Shared.Interfaces;
|
||||
using Immense.SimpleMessenger;
|
||||
using Remotely.Tests;
|
||||
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ using Remotely.Server.Services.Stores;
|
||||
using Remotely.Server.Tests.Mocks;
|
||||
using Remotely.Shared.Extensions;
|
||||
using Remotely.Shared.Interfaces;
|
||||
using Remotely.Tests;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
@ -4,6 +4,7 @@ using Moq;
|
||||
using Remotely.Server.Services;
|
||||
using Remotely.Shared.Dtos;
|
||||
using Remotely.Shared.Entities;
|
||||
using Remotely.Shared.Enums;
|
||||
using Remotely.Shared.Models;
|
||||
using Remotely.Shared.Utilities;
|
||||
using System;
|
||||
@ -11,7 +12,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Tests;
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class DataServiceTests
|
||||
@ -132,7 +133,7 @@ public class DataServiceTests
|
||||
Name = "GCI",
|
||||
Organization = _testData.Org1Admin1.Organization,
|
||||
OrganizationID = _testData.Org1Id,
|
||||
Shell = Shared.Enums.ScriptingShell.PSCore
|
||||
Shell = ScriptingShell.PSCore
|
||||
};
|
||||
|
||||
await _dataService.AddOrUpdateSavedScript(savedScript, _testData.Org1Admin1.Id);
|
||||
@ -140,7 +141,7 @@ public class DataServiceTests
|
||||
var scriptRun = new ScriptRun()
|
||||
{
|
||||
Devices = new() { _testData.Org1Device1 },
|
||||
InputType = Shared.Enums.ScriptInputType.ScheduledScript,
|
||||
InputType = ScriptInputType.ScheduledScript,
|
||||
SavedScriptId = savedScript.Id,
|
||||
Initiator = _testData.Org1Admin1.UserName,
|
||||
RunAt = now,
|
||||
@ -166,10 +167,10 @@ public class DataServiceTests
|
||||
var dto = new ScriptResultDto()
|
||||
{
|
||||
DeviceID = _testData.Org1Device1.ID,
|
||||
InputType = Shared.Enums.ScriptInputType.ScheduledScript,
|
||||
InputType = ScriptInputType.ScheduledScript,
|
||||
SavedScriptId = savedScript.Id,
|
||||
ScriptRunId = scriptRun.Id,
|
||||
Shell = Shared.Enums.ScriptingShell.PSCore,
|
||||
Shell = ScriptingShell.PSCore,
|
||||
ScriptInput = "echo test"
|
||||
};
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Remotely.Tests;
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class IoCActivator
|
||||
|
||||
@ -14,7 +14,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Tests;
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class ScriptScheduleDispatcherTests
|
||||
@ -68,7 +68,7 @@ public class ScriptScheduleDispatcherTests
|
||||
};
|
||||
|
||||
var scriptSchedules = new List<ScriptSchedule>()
|
||||
{
|
||||
{
|
||||
_schedule1
|
||||
};
|
||||
|
||||
@ -108,9 +108,9 @@ public class ScriptScheduleDispatcherTests
|
||||
|
||||
_dataService.Verify(x => x.GetScriptSchedulesDue(), Times.Once);
|
||||
_dataService.Verify(x => x.AddOrUpdateScriptSchedule(_schedule1), Times.Once);
|
||||
_dataService.Verify(x => x.GetDevices(It.Is<IEnumerable<string>>(x =>
|
||||
_dataService.Verify(x => x.GetDevices(It.Is<IEnumerable<string>>(x =>
|
||||
x.Contains(_schedule1.Devices.First().ID))));
|
||||
_dataService.Verify(x => x.AddScriptRun(It.Is<ScriptRun>(x =>
|
||||
_dataService.Verify(x => x.AddScriptRun(It.Is<ScriptRun>(x =>
|
||||
x.ScheduleId == _schedule1.Id &&
|
||||
x.Devices!.Exists(d => d.ID == _testData.Org1Device1.ID) &&
|
||||
x.Devices!.Exists(d => d.ID == _testData.Org1Device2.ID))));
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
|
||||
<PackageReference Include="Moq" Version="[4.18.4]" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
|
||||
|
||||
@ -13,7 +13,7 @@ using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Remotely.Tests;
|
||||
namespace Remotely.Server.Tests;
|
||||
|
||||
public class TestData
|
||||
{
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
Publishes the Remotely clients.
|
||||
.DESCRIPTION
|
||||
Publishes the Remotely clients.
|
||||
To deploy the server, supply the following arguments: -rid win10-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com
|
||||
To deploy the server, supply the following arguments: -rid win-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com
|
||||
.COPYRIGHT
|
||||
Copyright 2023 Immense Networks. All rights reserved.
|
||||
.EXAMPLE
|
||||
Run it from the Utilities folder (located in the solution directory).
|
||||
Or run "powershell -f Publish.ps1 -rid win10-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com
|
||||
Or run "powershell -f Publish.ps1 -rid win-x64 -outdir path\to\dir -hostname https://mysite.mydomain.com
|
||||
#>
|
||||
|
||||
param (
|
||||
@ -92,25 +92,25 @@ if ([string]::IsNullOrWhiteSpace($MSBuildPath) -or !(Test-Path -Path $MSBuildPat
|
||||
|
||||
|
||||
# Clear publish folders.
|
||||
if ((Test-Path -Path "$Root\Agent\bin\Release\net7.0\win10-x64\publish") -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\Release\net7.0\win10-x64\publish" | Remove-Item -Force -Recurse
|
||||
if ((Test-Path -Path "$Root\Agent\bin\publish\win-x64") -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\publish\win-x64" | Remove-Item -Force -Recurse
|
||||
}
|
||||
if ((Test-Path -Path "$Root\Agent\bin\Release\net7.0\win10-x86\publish" ) -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\Release\net7.0\win10-x86\publish" | Remove-Item -Force -Recurse
|
||||
if ((Test-Path -Path "$Root\Agent\bin\publish\win-x86" ) -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\publish\win-x86" | Remove-Item -Force -Recurse
|
||||
}
|
||||
if ((Test-Path -Path "$Root\Agent\bin\Release\net7.0\linux-x64\publish") -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\Release\net7.0\linux-x64\publish" | Remove-Item -Force -Recurse
|
||||
if ((Test-Path -Path "$Root\Agent\bin\publish\linux-x64") -eq $true) {
|
||||
Get-ChildItem -Path "$Root\Agent\bin\publish\linux-x64" | Remove-Item -Force -Recurse
|
||||
}
|
||||
|
||||
|
||||
# Publish Core clients.
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x64 --self-contained --configuration Release --output "$Root\Agent\bin\Release\net7.0\win10-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --self-contained --configuration Release --output "$Root\Agent\bin\Release\net7.0\linux-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x86 --self-contained --configuration Release --output "$Root\Agent\bin\Release\net7.0\win10-x86\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\win-x64" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\linux-x64" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win-x86 --self-contained --configuration Release --output "$Root\Agent\bin\publish\win-x86" "$Root\Agent"
|
||||
|
||||
New-Item -Path "$Root\Agent\bin\Release\net7.0\win10-x64\publish\Desktop\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\Release\net7.0\win10-x86\publish\Desktop\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\Release\net7.0\linux-x64\publish\Desktop\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\publish\win-x64\Desktop\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\publish\win-x86\Desktop\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\publish\linux-x64\Desktop\" -ItemType Directory -Force
|
||||
|
||||
|
||||
# Publish Linux ScreenCaster
|
||||
@ -155,26 +155,26 @@ if ($SignAssemblies) {
|
||||
}
|
||||
|
||||
# Compress Core clients.
|
||||
$PublishDir = "$Root\Agent\bin\Release\net7.0\win10-x64\publish"
|
||||
Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely-Win10-x64.zip" -Force
|
||||
while ((Test-Path -Path "$PublishDir\Remotely-Win10-x64.zip") -eq $false){
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win10-x64.zip"
|
||||
$PublishDir = "$Root\Agent\bin\publish\win-x64"
|
||||
Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely-Win-x64.zip" -Force
|
||||
while ((Test-Path -Path "$PublishDir\Remotely-Win-x64.zip") -eq $false){
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win-x64.zip"
|
||||
Start-Sleep -Seconds 3
|
||||
}
|
||||
Move-Item -Path "$PublishDir\Remotely-Win10-x64.zip" -Destination "$Root\Server\wwwroot\Content\Remotely-Win10-x64.zip" -Force
|
||||
Move-Item -Path "$PublishDir\Remotely-Win-x64.zip" -Destination "$Root\Server\wwwroot\Content\Remotely-Win-x64.zip" -Force
|
||||
|
||||
$PublishDir = "$Root\Agent\bin\Release\net7.0\win10-x86\publish"
|
||||
Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely-Win10-x86.zip" -Force
|
||||
while ((Test-Path -Path "$PublishDir\Remotely-Win10-x86.zip") -eq $false){
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win10-x86.zip"
|
||||
$PublishDir = "$Root\Agent\bin\publish\win-x86"
|
||||
Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely-Win-x86.zip" -Force
|
||||
while ((Test-Path -Path "$PublishDir\Remotely-Win-x86.zip") -eq $false){
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win-x86.zip"
|
||||
Start-Sleep -Seconds 3
|
||||
}
|
||||
Move-Item -Path "$PublishDir\Remotely-Win10-x86.zip" -Destination "$Root\Server\wwwroot\Content\Remotely-Win10-x86.zip" -Force
|
||||
Move-Item -Path "$PublishDir\Remotely-Win-x86.zip" -Destination "$Root\Server\wwwroot\Content\Remotely-Win-x86.zip" -Force
|
||||
|
||||
$PublishDir = "$Root\Agent\bin\Release\net7.0\linux-x64\publish"
|
||||
$PublishDir = "$Root\Agent\bin\publish\linux-x64"
|
||||
Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely-Linux.zip" -Force
|
||||
while ((Test-Path -Path "$PublishDir\Remotely-Linux.zip") -eq $false){
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win10-x86.zip"
|
||||
Write-Host "Waiting for archive to finish: $PublishDir\Remotely-Win-x86.zip"
|
||||
Start-Sleep -Seconds 3
|
||||
}
|
||||
Move-Item -Path "$PublishDir\Remotely-Linux.zip" -Destination "$Root\Server\wwwroot\Content\Remotely-Linux.zip" -Force
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit b306cc12afcc8c7d758a92682d3a06d2519b9735
|
||||
Subproject commit ab9f9604be3d9ece45de0810e4826fe28ac5a932
|
||||
Loading…
Reference in New Issue
Block a user