Commit d70a4b8
authored
feat(not-found): add click-to-copy functionality to 404 terminal (JhaSourav07#1880)
## Description
Fixes JhaSourav07#1798
This PR adds click-to-copy functionality to the custom 404 terminal
page, making the terminal block interactive and allowing users to easily
copy the displayed terminal output.
### Changes Made
* Added clipboard copy support using `navigator.clipboard.writeText()`
* Added success notification using the existing Sonner toast system
* Added error handling for clipboard failures
* Added hover and pointer states to indicate clickability
* Added a "Click to copy" indicator in the terminal header
* Preserved the existing UI and terminal aesthetics
## Pillar
* [ ] 🎨 Pillar 1 — New Theme Design
* [ ] 📐 Pillar 2 — Geometric SVG Improvement
* [ ] 🕐 Pillar 3 — Timezone Logic Optimization
* [x] 🛠️ Other (Bug fix, refactoring, docs)
## Checklist
* [x] I have read the CONTRIBUTING.md file
* [x] I have tested these changes locally
* [x] I have run formatting and build checks
* [x] My commit follows the Conventional Commits format
* [x] This change does not introduce breaking changes
* [x] The UI remains consistent with the existing design system
## Visual Preview
### Before
Users had to manually highlight and copy terminal content.
### After
Users can click anywhere on the terminal block to instantly copy the
terminal output and receive visual feedback through a toast
notification.
### Screenshots
<img width="1920" height="1020" alt="Screenshot 2026-05-31 004706"
src="https://github.com/user-attachments/assets/69cee3c7-093e-492e-8f94-35531580ecf6"
/>
<img width="1707" height="744" alt="Screenshot 2026-05-31 004728"
src="https://github.com/user-attachments/assets/1bc756d3-ecdb-4944-80f1-c1e7661cd361"
/>1 file changed
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
4 | 21 | | |
5 | | - | |
| 22 | + | |
6 | 23 | | |
7 | 24 | | |
8 | 25 | | |
| |||
14 | 31 | | |
15 | 32 | | |
16 | 33 | | |
17 | | - | |
18 | | - | |
| 34 | + | |
| 35 | + | |
19 | 36 | | |
20 | 37 | | |
21 | 38 | | |
| |||
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
41 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
42 | 62 | | |
43 | 63 | | |
44 | 64 | | |
45 | 65 | | |
46 | 66 | | |
| 67 | + | |
47 | 68 | | |
48 | 69 | | |
49 | 70 | | |
| |||
54 | 75 | | |
55 | 76 | | |
56 | 77 | | |
57 | | - | |
58 | | - | |
| 78 | + | |
| 79 | + | |
59 | 80 | | |
60 | 81 | | |
61 | 82 | | |
| 83 | + | |
62 | 84 | | |
| 85 | + | |
63 | 86 | | |
64 | 87 | | |
65 | 88 | | |
| |||
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
| 107 | + | |
84 | 108 | | |
85 | 109 | | |
86 | 110 | | |
87 | 111 | | |
88 | 112 | | |
89 | 113 | | |
90 | 114 | | |
91 | | - | |
92 | | - | |
93 | 115 | | |
94 | 116 | | |
95 | 117 | | |
| |||
0 commit comments