diff --git a/LiMan.UI/Components/CopyToClipboard.razor b/LiMan.UI/Components/CopyToClipboard.razor
new file mode 100644
index 0000000..639ba62
--- /dev/null
+++ b/LiMan.UI/Components/CopyToClipboard.razor
@@ -0,0 +1,48 @@
+@using System
+@inject IJSRuntime JSRuntime
+
+
+
+
+
+
+@code {
+
+ ///
+ /// Metodi per copia verso clipboard:
+ /// link:
+ /// - https://chrissainty.com/copy-to-clipboard-in-blazor/
+ /// - https://www.daveabrock.com/2021/02/18/copy-to-clipboard-markdown-editor/
+ /// - https://www.meziantou.net/
+ ///
+
+ [Parameter] public string Text { get; set; }
+
+ protected string btnStyle = "btn-primary";
+ protected string btnText = "Copy";
+ protected bool copyDone = false;
+
+ private async Task CopyTextToClipboard()
+ {
+ // cambio colore..
+ btnStyle = "btn-success";
+ btnText = "Done!";
+ copyDone = true;
+ await JSRuntime.InvokeVoidAsync("clipboardCopy.copyText", Text);
+ await Task.Delay(1100);
+ // fix cambio colore..
+ btnStyle = "btn-primary";
+ btnText = "Copy";
+ copyDone = false;
+ await Task.Delay(10);
+ }
+}
\ No newline at end of file
diff --git a/LiMan.UI/Components/ListLicenze.razor b/LiMan.UI/Components/ListLicenze.razor
index 5bb2128..00782e1 100644
--- a/LiMan.UI/Components/ListLicenze.razor
+++ b/LiMan.UI/Components/ListLicenze.razor
@@ -83,9 +83,9 @@
Applicativo |
Installazione |
Scadenza |
+ Descrizione |
Num Licenze |
Codice Licenza |
- Descrizione |
Payload |
Enigma |
Data Enigma |
@@ -119,14 +119,14 @@
@($"{record.Scadenza:yyyy.MM.dd}")
|
+
+ @record.Descrizione
+ |
@record.NumLicenze
|
- @record.Chiave
- |
-
- @record.Descrizione
+
|
@record.Payload
diff --git a/LiMan.UI/Pages/_Host.cshtml b/LiMan.UI/Pages/_Host.cshtml
index 25ea868..0496b11 100644
--- a/LiMan.UI/Pages/_Host.cshtml
+++ b/LiMan.UI/Pages/_Host.cshtml
@@ -36,6 +36,7 @@
+
diff --git a/LiMan.UI/wwwroot/js/CBCopy.js b/LiMan.UI/wwwroot/js/CBCopy.js
new file mode 100644
index 0000000..23ced1c
--- /dev/null
+++ b/LiMan.UI/wwwroot/js/CBCopy.js
@@ -0,0 +1,10 @@
+window.clipboardCopy = {
+ copyText: function (text) {
+ navigator.clipboard.writeText(text).then(function () {
+ //alert("Copiato in clipboard!");
+ })
+ .catch(function (error) {
+ alert(error);
+ });
+ }
+};
\ No newline at end of file
diff --git a/LiMan.sln b/LiMan.sln
index dd12125..631127d 100644
--- a/LiMan.sln
+++ b/LiMan.sln
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiMan.UI", "LiMan.UI\LiMan.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiMan.DB", "LiMan.DB\LiMan.DB.csproj", "{C052CE93-FFDE-4B45-B1BC-BD9882797667}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{4A7686D3-5BD3-44BE-93DE-CDD72CA703B6}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "Core\Core.csproj", "{4A7686D3-5BD3-44BE-93DE-CDD72CA703B6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|