Adds ability for dark logo option

This commit is contained in:
Neil Dorin
2020-08-06 15:20:24 -06:00
parent 637ca2f312
commit 192aa4255c
7 changed files with 23 additions and 11 deletions

View File

@@ -156,7 +156,10 @@ namespace PepperDash.Essentials.Room.Config
public EssentialsEnvironmentPropertiesConfig Environment { get; set; } public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
[JsonProperty("logo")] [JsonProperty("logo")]
public EssentialsLogoPropertiesConfig Logo { get; set; } public EssentialsLogoPropertiesConfig LogoLight { get; set; }
[JsonProperty("logoDark")]
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
[JsonProperty("microphonePrivacy")] [JsonProperty("microphonePrivacy")]
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; } public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }

View File

@@ -327,7 +327,8 @@ namespace PepperDash.Essentials
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes); IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
this.LogoUrl = PropertiesConfig.Logo.GetUrl(); this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
this.SourceListKey = PropertiesConfig.SourceListKey; this.SourceListKey = PropertiesConfig.SourceListKey;
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem; this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100); this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);

View File

@@ -250,7 +250,8 @@ namespace PepperDash.Essentials
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes); IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
this.LogoUrl = PropertiesConfig.Logo.GetUrl(); this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
this.SourceListKey = PropertiesConfig.SourceListKey; this.SourceListKey = PropertiesConfig.SourceListKey;
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem; this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100); this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);

View File

@@ -340,7 +340,8 @@ namespace PepperDash.Essentials
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes); IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
} }
this.LogoUrl = PropertiesConfig.Logo.GetUrl(); this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetUrl();
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetUrl();
this.SourceListKey = PropertiesConfig.SourceListKey; this.SourceListKey = PropertiesConfig.SourceListKey;
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem; this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100); this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);

View File

@@ -333,7 +333,7 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void ShowLogo() void ShowLogo()
{ {
if (CurrentRoom.LogoUrl == null) if (CurrentRoom.LogoUrlLightBkgnd == null)
{ {
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true); TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
@@ -342,7 +342,8 @@ namespace PepperDash.Essentials
{ {
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true); TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrl); TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd);
TriList.SetString(UIStringJoin.LogoUrlDarkBkgnd, _CurrentRoom.LogoUrlDarkBkgnd);
} }
} }
@@ -790,7 +791,7 @@ namespace PepperDash.Essentials
} }
// Name and logo // Name and logo
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name; TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
if (_CurrentRoom.LogoUrl == null) if (_CurrentRoom.LogoUrlLightBkgnd == null)
{ {
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true; TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false;
@@ -799,7 +800,9 @@ namespace PepperDash.Essentials
{ {
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false;
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true; TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true;
TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrl; TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlLightBkgnd;
TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlDarkBkgnd;
} }
// Shutdown timer // Shutdown timer

View File

@@ -343,7 +343,7 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void ShowLogo() void ShowLogo()
{ {
if (CurrentRoom.LogoUrl == null) if (CurrentRoom.LogoUrlLightBkgnd == null)
{ {
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true); TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false); TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
@@ -352,7 +352,8 @@ namespace PepperDash.Essentials
{ {
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false); TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true); TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrl); TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd);
TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlDarkBkgnd);
} }
} }

View File

@@ -69,7 +69,9 @@ namespace PepperDash.Essentials.Core
public Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; } public Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; }
public string LogoUrl { get; set; } public string LogoUrlLightBkgnd { get; set; }
public string LogoUrlDarkBkgnd { get; set; }
protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; } protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; }