mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
fix some issues after new release
This commit is contained in:
1 parent
18f32e1d46
commit
9e8e77d89b
12 files changed
+2842
-2875
No files matched your search
@@ -93,7 +93,7 @@
|
||||
{
|
||||
<input class="form-check-input me-1" style="font-size: 1rem" title="Apply these settings" type="checkbox" @bind="Preset.DisplayConfig.ApplyResolution" id="applyResolution">
|
||||
}
|
||||
<button class="accordion-button py-2 @(Preset.DisplayConfig.ApplyResolution ? "text-warning fw-bold" : "")" type="button" data-bs-toggle="collapse" data-bs-target="#resolutionSettings">
|
||||
<button class="accordion-button py-2 @(!Preset.IsDisplayPreset ? "collapsed" : "") @(Preset.DisplayConfig.ApplyResolution ? "text-warning fw-bold" : "")" type="button" data-bs-toggle="collapse" data-bs-target="#resolutionSettings">
|
||||
Resolution
|
||||
</button>
|
||||
</span>
|
||||
@@ -157,7 +157,7 @@
|
||||
</button>
|
||||
</span>
|
||||
</h2>
|
||||
<div id="refreshRateSettings" class="accordion-collapse collapse show" data-bs-parent="#presetAccordion">
|
||||
<div id="refreshRateSettings" class="accordion-collapse collapse" data-bs-parent="#presetAccordion">
|
||||
<div class="accordion-body">
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="refreshRate">Refresh Rate</label>
|
||||
@@ -356,7 +356,7 @@
|
||||
|
||||
if (Preset.IsDisplayPreset)
|
||||
{
|
||||
//Preset.UpdateAutoApplySettings(PresetParam);
|
||||
Preset.UpdateAutoApplySettings(PresetParam);
|
||||
|
||||
await ApplyDisplayPreset();
|
||||
return;
|
||||
|
||||
@@ -38,31 +38,35 @@
|
||||
else
|
||||
{
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
@if (!DisplayPresets.Any())
|
||||
{
|
||||
<span>No displays found</span>
|
||||
}
|
||||
@foreach (var preset in DisplayPresets)
|
||||
{
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
@preset.displayName
|
||||
@if (preset.DisplayConfig.IsPrimary == true)
|
||||
{
|
||||
<small class="text-muted ms-2">Primary</small>
|
||||
}
|
||||
<button type="button" class="btn btn-sm btn-primary ms-2" data-bs-toggle="modal" data-bs-target="#presetModal" @onclick="() => DisplayPresetOnClick(preset)">
|
||||
Settings
|
||||
</button>
|
||||
@if (!DisplayPresets.Any())
|
||||
{
|
||||
<span>No displays found</span>
|
||||
}
|
||||
@foreach (var preset in DisplayPresets)
|
||||
{
|
||||
<div class="col-lg-6 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-header d-flex align-items-baseline">
|
||||
<span>
|
||||
@preset.displayName
|
||||
@if (preset.DisplayConfig.IsPrimary == true)
|
||||
{
|
||||
<small class="text-muted ms-2">Primary</small>
|
||||
}
|
||||
</span>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn btn-sm btn-primary ms-2" data-bs-toggle="modal" data-bs-target="#presetModal" @onclick="() => DisplayPresetOnClick(preset)">
|
||||
Settings
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<small class="text-body">@preset.DisplayConfig.Resolution.ToString() @@ @preset.DisplayConfig.RefreshRate.ToString()Hz</small>
|
||||
<small class="text-muted">@preset.colorDepth, @preset.pixelFormat</small>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -157,6 +161,7 @@ else
|
||||
private async Task PresetOnCloneClick(AmdPreset preset)
|
||||
{
|
||||
CurrentPreset = new AmdPreset(preset);
|
||||
CurrentPreset.name = preset.name;
|
||||
CurrentPreset.SetCloneValues();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="nvPreset">NVIDIA preset</label>
|
||||
<select class="form-select" id="nvPreset" @bind="NvPresetToAddId">
|
||||
<option value="null">Select preset</option>
|
||||
<option value="">Select preset</option>
|
||||
@foreach (var preset in NvPresets)
|
||||
{
|
||||
<option value="@preset.id">@preset.IdOrName</option>
|
||||
@@ -40,7 +40,7 @@
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="samsungPreset">Samsung preset</label>
|
||||
<select class="form-select" id="samsungPreset" @bind="SamsungPresetToAddId">
|
||||
<option value="null">Select preset</option>
|
||||
<option value="">Select preset</option>
|
||||
@foreach (var preset in SamsungPresets)
|
||||
{
|
||||
<option value="@preset.id">@preset.IdOrName</option>
|
||||
@@ -53,7 +53,7 @@
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="lgPreset">LG preset</label>
|
||||
<select class="form-select" id="lgPreset" @bind="LgPresetToAddId">
|
||||
<option value="null">Select preset</option>
|
||||
<option value="">Select preset</option>
|
||||
@foreach (var preset in LgPresets)
|
||||
{
|
||||
<option value="@preset.id">@preset.IdOrName</option>
|
||||
@@ -68,7 +68,7 @@
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="customItem">@customItem.Name</label>
|
||||
<select class="form-select" id="customItem" @bind="customItem.SelectedItem">
|
||||
<option value="null">Select item</option>
|
||||
<option value="">Select item</option>
|
||||
@foreach (var item in customItem.Items)
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
@@ -84,7 +84,7 @@
|
||||
<div class="mb-2">
|
||||
<label class="form-label" for="advancedCustomItem">@customItem.Name</label>
|
||||
<select class="form-select" id="advancedCustomItem" @bind="customItem.SelectedActionName" @bind:after="() => AdvancedItemChanged(customItem)">
|
||||
<option value="null">Select action</option>
|
||||
<option value="">Select action</option>
|
||||
@foreach (var keyValue in customItem.GroupedActions)
|
||||
{
|
||||
<optgroup label="@keyValue.Key">
|
||||
|
||||
@@ -49,31 +49,35 @@
|
||||
else
|
||||
{
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
@if (!DisplayPresets.Any())
|
||||
{
|
||||
<span>No displays found</span>
|
||||
}
|
||||
@foreach (var preset in DisplayPresets)
|
||||
{
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
@preset.displayName
|
||||
@if (preset.DisplayConfig.IsPrimary == true)
|
||||
{
|
||||
<span class="ms-2 badge text-bg-primary" title="Primary display">Primary</span>
|
||||
}
|
||||
<button type="button" class="btn btn-sm btn-primary ms-2" data-bs-toggle="modal" data-bs-target="#presetModal" @onclick="() => DisplayPresetOnClick(preset)">
|
||||
Settings
|
||||
</button>
|
||||
@if (!DisplayPresets.Any())
|
||||
{
|
||||
<span>No displays found</span>
|
||||
}
|
||||
@foreach (var preset in DisplayPresets)
|
||||
{
|
||||
<div class="col-lg-6 mb-3">
|
||||
<div class="card h-100">
|
||||
<div class="card-header d-flex align-items-baseline">
|
||||
<span>
|
||||
@preset.displayName
|
||||
@if (preset.DisplayConfig.IsPrimary == true)
|
||||
{
|
||||
<span class="ms-2 badge text-bg-primary" title="Primary display">Primary</span>
|
||||
}
|
||||
</span>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn btn-sm btn-primary ms-2" data-bs-toggle="modal" data-bs-target="#presetModal" @onclick="() => DisplayPresetOnClick(preset)">
|
||||
Settings
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<small class="text-body">@preset.DisplayConfig.Resolution.ToString() @@ @preset.DisplayConfig.RefreshRate.ToString()Hz</small>
|
||||
<small class="text-muted">@preset.colorData</small>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -187,6 +191,7 @@ else
|
||||
private async Task PresetOnCloneClick(NvPreset preset)
|
||||
{
|
||||
CurrentPreset = new NvPreset(preset);
|
||||
CurrentPreset.name = preset.name;
|
||||
CurrentPreset.SetCloneValues();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ else
|
||||
<label class="form-label" for="elevationMethod">
|
||||
Elevation Method
|
||||
</label>
|
||||
<select class="form-select" @bind="elevationMethod" id="elevationMethod" @oninput="ElevationMethodInput" aria-describedby="elevationMethodHelp">
|
||||
<option value="0">None</option>
|
||||
<option value="1">Run as administrator</option>
|
||||
<option value="2">Use service</option>
|
||||
<option value="3">Use elevated process</option>
|
||||
<select class="form-select" @bind="config.ElevationMethod" id="elevationMethod" @oninput="ElevationMethodInput" aria-describedby="elevationMethodHelp">
|
||||
@foreach (var method in Enum.GetValues<ElevationMethod>())
|
||||
{
|
||||
<option value="@method">@method.GetDescription()</option>
|
||||
}
|
||||
</select>
|
||||
<div id="elevationMethodHelp" class="form-text">
|
||||
Elevation is needed in some cases where ColorControl needs administrator rights.
|
||||
@@ -186,12 +186,10 @@ else
|
||||
|
||||
@code {
|
||||
private Config? config;
|
||||
private string elevationMethod = "0";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
config = await _rpcClientService.CallAsync<Config>("OptionsService", "GetConfig");
|
||||
elevationMethod = ((int)config.ElevationMethod).ToString();
|
||||
}
|
||||
|
||||
private async Task SaveConfig()
|
||||
@@ -299,8 +297,6 @@ else
|
||||
{
|
||||
var value = e.Value != null ? (ElevationMethod)int.Parse((string)e.Value) : ElevationMethod.None;
|
||||
await _rpcClientService.CallAsync<bool>("OptionsService", "SetElevationMethod", value);
|
||||
|
||||
config!.ElevationMethod = value;
|
||||
}
|
||||
|
||||
private async Task UiTypeOnInput(ChangeEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user