-
@_removeCommand
-
+
+
}
@if (!string.IsNullOrEmpty(_overrideLine))
{
@ReadonlyConfigCommandGenerator.GetOverrideHint(OptionName, Value, ManagedFilePath)
-
-
@_overrideLine
-
+
+
}
@@ -47,30 +44,4 @@
_overrideLine = "";
}
}
-
- private async Task CopyRemoveCommand()
- {
- if (string.IsNullOrEmpty(_removeCommand)) return;
- try
- {
- await JSRuntime.InvokeVoidAsync("copyToClipboard", _removeCommand);
- }
- catch
- {
- // Copy not supported or failed
- }
- }
-
- private async Task CopyOverrideLine()
- {
- if (string.IsNullOrEmpty(_overrideLine)) return;
- try
- {
- await JSRuntime.InvokeVoidAsync("copyToClipboard", _overrideLine);
- }
- catch
- {
- // Copy not supported or failed
- }
- }
}
diff --git a/src/DnsmasqWebUI/Components/Dnsmasq/EffectiveConfig/ReadonlyEditPopover.razor b/src/DnsmasqWebUI/Components/Dnsmasq/EffectiveConfig/ReadonlyEditPopover.razor
index 724b92f..47eb882 100644
--- a/src/DnsmasqWebUI/Components/Dnsmasq/EffectiveConfig/ReadonlyEditPopover.razor
+++ b/src/DnsmasqWebUI/Components/Dnsmasq/EffectiveConfig/ReadonlyEditPopover.razor
@@ -19,18 +19,14 @@
@ReadonlyConfigCommandGenerator.GetEditFileHint(Source)
@if (!string.IsNullOrEmpty(_removeCommand))
{
-
-
@_removeCommand
-
+
+
}
@if (!string.IsNullOrEmpty(_overrideLine))
{
@ReadonlyConfigCommandGenerator.GetOverrideHint(OptionName, Value, ManagedFilePath)
-
- @_overrideLine
-
-
+
}
@@ -48,6 +44,9 @@
[Parameter] public EventCallback OnMouseEnterPopover { get; set; }
[Parameter] public EventCallback OnMouseLeavePopover { get; set; }
+ private const string HiddenPositionStyle = "position: fixed; z-index: 1060; left: 0; top: 0; visibility: hidden;";
+ private const string VisiblePositionStyleFormat = "position: fixed; top: {0}px; left: {1}px; visibility: visible;";
+
private string _positionStyle = "";
private readonly string _popoverId = "ec-readonly-popover-" + Guid.NewGuid().ToString("N")[..8];
private DotNetObjectReference