From 137db6af40a293b077e3faf973ff8bc1d659252e Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Mon, 21 Aug 2023 12:05:29 -0700 Subject: [PATCH] Remove branding properties that no longer exist. --- Agent.Installer.Win/MainWindow.xaml | 19 +- Agent.Installer.Win/Models/BrandingInfo.cs | 18 - .../ViewModels/MainWindowViewModel.cs | 22 - ...821190450_Remove_TitleBranding.Designer.cs | 1201 ++++++++++++++++ .../20230821190450_Remove_TitleBranding.cs | 117 ++ .../PostgreSqlDbContextModelSnapshot.cs | 29 +- ...821190440_Remove_TitleBranding.Designer.cs | 1204 +++++++++++++++++ .../20230821190440_Remove_TitleBranding.cs | 117 ++ .../SqlServerDbContextModelSnapshot.cs | 29 +- ...821190428_Remove_TitleBranding.Designer.cs | 1197 ++++++++++++++++ .../20230821190428_Remove_TitleBranding.cs | 117 ++ .../Sqlite/SqliteDbContextModelSnapshot.cs | 29 +- Server/Pages/Branding.razor | 65 +- Server/Services/DataService.cs | 24 +- submodules/Immense.RemoteControl | 2 +- 15 files changed, 3976 insertions(+), 214 deletions(-) create mode 100644 Server/Migrations/PostgreSql/20230821190450_Remove_TitleBranding.Designer.cs create mode 100644 Server/Migrations/PostgreSql/20230821190450_Remove_TitleBranding.cs create mode 100644 Server/Migrations/SqlServer/20230821190440_Remove_TitleBranding.Designer.cs create mode 100644 Server/Migrations/SqlServer/20230821190440_Remove_TitleBranding.cs create mode 100644 Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.Designer.cs create mode 100644 Server/Migrations/Sqlite/20230821190428_Remove_TitleBranding.cs diff --git a/Agent.Installer.Win/MainWindow.xaml b/Agent.Installer.Win/MainWindow.xaml index 3f1b4520..fcd6eb9d 100644 --- a/Agent.Installer.Win/MainWindow.xaml +++ b/Agent.Installer.Win/MainWindow.xaml @@ -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 @@ - - - - - - - - - - - @@ -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(); } @@ -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() diff --git a/Server/Services/DataService.cs b/Server/Services/DataService.cs index d2d7c35b..1ad7d7c7 100644 --- a/Server/Services/DataService.cs +++ b/Server/Services/DataService.cs @@ -206,12 +206,9 @@ public interface IDataService Task TempPasswordSignIn(string email, string password); Task UpdateBrandingInfo( - string organizationId, + string organizationId, string productName, - byte[] iconBytes, - ColorPickerModel titleForeground, - ColorPickerModel titleBackground, - ColorPickerModel titleButtonForeground); + byte[] iconBytes); Task> 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(); } diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index 8d542429..ea0b95b5 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit 8d542429b749d462903c15d4668ef932777370c8 +Subproject commit ea0b95b5dba6ed39b5aaa3087c07b635c64b7ea2