mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Remove branding properties that no longer exist.
This commit is contained in:
parent
583c870d3b
commit
137db6af40
@ -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;
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
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 />
|
||||
<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="img-fluid" src="data:image/png;base64,@_base64Icon" />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="img-fluid" 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()
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 8d542429b749d462903c15d4668ef932777370c8
|
||||
Subproject commit ea0b95b5dba6ed39b5aaa3087c07b635c64b7ea2
|
||||
Loading…
Reference in New Issue
Block a user