Skip to content

Commit f2d2374

Browse files
committed
tidy up copy to clipboard on a fe wother pages
1 parent d291649 commit f2d2374

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

MyDevTools/Components/Pages/ContainerIds.razor

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
<div class="d-flex justify-content-between">
2222
<button class="btn btn-primary btn-block" @onclick="GenerateCodes">Generate Ids</button>
23-
<button class="btn btn-success btn-block" @onclick="CopyToClipboard">Copy To Clipboard</button>
2423
</div>
2524
</div>
2625
</div>
@@ -101,18 +100,4 @@
101100
}
102101
return sum % 11 % 10;
103102
}
104-
105-
106-
private async Task CopyToClipboard()
107-
{
108-
try
109-
{
110-
await ClipboardService.CopyToClipboardAsync(generatedCodes);
111-
copyConfirmationMessage = "Text copied to clipboard!";
112-
}
113-
catch (Exception ex)
114-
{
115-
Console.WriteLine(ex.Message);
116-
}
117-
}
118103
}

MyDevTools/Components/Pages/CronGenerator.razor

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
</div>
6060

6161
<button class="btn btn-primary btn-block" @onclick="GenerateCronExpression">Generate Cron Expression</button>
62-
<button class="btn btn-success btn-block" @onclick="CopyToClipboard">Copy to Clipboard</button>
6362
</div>
6463
</div>
6564

@@ -98,17 +97,4 @@
9897
cronExpression = "Error: " + ex.Message;
9998
}
10099
}
101-
102-
private async Task CopyToClipboard()
103-
{
104-
try
105-
{
106-
await ClipboardService.CopyToClipboardAsync(cronExpression);
107-
copyConfirmationMessage = "Cron expression copied to clipboard!";
108-
}
109-
catch (Exception ex)
110-
{
111-
copyConfirmationMessage = "Error: " + ex.Message;
112-
}
113-
}
114100
}

MyDevTools/Components/Pages/GuidGenerator.razor

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
</div>
2424

2525
<button class="btn btn-primary btn-block" @onclick="GenerateGUID">Generate GUID</button>
26-
<button class="btn btn-success btn-block" @onclick="CopyToClipboard">Copy to Clipboard</button>
2726
</div>
2827
</div>
2928

@@ -64,16 +63,4 @@
6463
guidResults.Add(guid);
6564
}
6665
}
67-
68-
private async Task CopyToClipboard()
69-
{
70-
try
71-
{
72-
await ClipboardService.CopyToClipboardAsync(string.Join("\n", guidResults));
73-
}
74-
catch (Exception ex)
75-
{
76-
Console.WriteLine("Failed to copy to clipboard: " + ex.Message);
77-
}
78-
}
7966
}

MyDevTools/Components/Pages/JwtDecoder.razor

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</div>
1616

1717
<button class="btn btn-primary btn-block" @onclick="DecodeJwt">Decode JWT</button>
18-
<button class="btn btn-success btn-block" @onclick="CopyToClipboard">Copy to Clipboard</button>
1918
</div>
2019
</div>
2120

@@ -50,16 +49,4 @@
5049
decodedJson = "Error: " + ex.Message;
5150
}
5251
}
53-
54-
private async Task CopyToClipboard()
55-
{
56-
try
57-
{
58-
await ClipboardService.CopyToClipboardAsync(decodedJson);
59-
}
60-
catch (Exception ex)
61-
{
62-
Console.WriteLine(ex.Message);
63-
}
64-
}
6552
}

0 commit comments

Comments
 (0)