| 1 |
<!doctype html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="UTF-8" /> |
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 |
<title>Duke Energy OAuth - Code Captured</title> |
| 7 |
<style> |
| 8 |
* { |
| 9 |
box-sizing: border-box; |
| 10 |
margin: 0; |
| 11 |
padding: 0; |
| 12 |
} |
| 13 |
|
| 14 |
body { |
| 15 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, |
| 16 |
Oxygen, Ubuntu, sans-serif; |
| 17 |
background: linear-gradient(135deg, #1a5276 0%, #2e86ab 100%); |
| 18 |
min-height: 100vh; |
| 19 |
display: flex; |
| 20 |
align-items: center; |
| 21 |
justify-content: center; |
| 22 |
padding: 20px; |
| 23 |
} |
| 24 |
|
| 25 |
.container { |
| 26 |
background: white; |
| 27 |
border-radius: 12px; |
| 28 |
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); |
| 29 |
max-width: 600px; |
| 30 |
width: 100%; |
| 31 |
padding: 40px; |
| 32 |
text-align: center; |
| 33 |
} |
| 34 |
|
| 35 |
h1 { |
| 36 |
color: #1a5276; |
| 37 |
font-size: 24px; |
| 38 |
margin-bottom: 10px; |
| 39 |
} |
| 40 |
|
| 41 |
p { |
| 42 |
color: #666; |
| 43 |
font-size: 14px; |
| 44 |
margin-bottom: 20px; |
| 45 |
} |
| 46 |
|
| 47 |
.icon { |
| 48 |
width: 80px; |
| 49 |
height: 80px; |
| 50 |
border-radius: 50%; |
| 51 |
display: flex; |
| 52 |
align-items: center; |
| 53 |
justify-content: center; |
| 54 |
margin: 0 auto 20px; |
| 55 |
} |
| 56 |
|
| 57 |
.icon-success { |
| 58 |
background: #4caf50; |
| 59 |
} |
| 60 |
.icon-error { |
| 61 |
background: #f44336; |
| 62 |
} |
| 63 |
|
| 64 |
.icon svg { |
| 65 |
width: 40px; |
| 66 |
height: 40px; |
| 67 |
fill: white; |
| 68 |
} |
| 69 |
|
| 70 |
.code-box { |
| 71 |
display: flex; |
| 72 |
align-items: stretch; |
| 73 |
background: #f5f5f5; |
| 74 |
border: 1px solid #ddd; |
| 75 |
border-radius: 8px; |
| 76 |
overflow: hidden; |
| 77 |
margin: 20px 0; |
| 78 |
} |
| 79 |
|
| 80 |
.code-display { |
| 81 |
flex: 1; |
| 82 |
background: #fff; |
| 83 |
padding: 14px 16px; |
| 84 |
font-family: "Consolas", "Monaco", monospace; |
| 85 |
font-size: 14px; |
| 86 |
color: #333; |
| 87 |
letter-spacing: 2px; |
| 88 |
overflow: hidden; |
| 89 |
text-overflow: ellipsis; |
| 90 |
white-space: nowrap; |
| 91 |
} |
| 92 |
|
| 93 |
.copy-btn { |
| 94 |
display: flex; |
| 95 |
align-items: center; |
| 96 |
justify-content: center; |
| 97 |
padding: 0 16px; |
| 98 |
border: none; |
| 99 |
border-left: 1px solid #ddd; |
| 100 |
background: #f5f5f5; |
| 101 |
cursor: pointer; |
| 102 |
transition: background 0.2s; |
| 103 |
} |
| 104 |
|
| 105 |
.copy-btn:hover { |
| 106 |
background: #e8e8e8; |
| 107 |
} |
| 108 |
|
| 109 |
.copy-btn svg { |
| 110 |
width: 20px; |
| 111 |
height: 20px; |
| 112 |
fill: #555; |
| 113 |
} |
| 114 |
|
| 115 |
.copy-btn:hover svg { |
| 116 |
fill: #1a5276; |
| 117 |
} |
| 118 |
|
| 119 |
.toast { |
| 120 |
position: fixed; |
| 121 |
bottom: 20px; |
| 122 |
left: 50%; |
| 123 |
transform: translateX(-50%); |
| 124 |
background: #333; |
| 125 |
color: white; |
| 126 |
padding: 12px 24px; |
| 127 |
border-radius: 6px; |
| 128 |
font-size: 14px; |
| 129 |
opacity: 0; |
| 130 |
transition: opacity 0.3s; |
| 131 |
} |
| 132 |
|
| 133 |
.toast.show { |
| 134 |
opacity: 1; |
| 135 |
} |
| 136 |
</style> |
| 137 |
</head> |
| 138 |
<body> |
| 139 |
<div class="container"> |
| 140 |
<div id="success" style="display: none"> |
| 141 |
<div class="icon icon-success"> |
| 142 |
<svg viewBox="0 0 24 24"> |
| 143 |
<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" /> |
| 144 |
</svg> |
| 145 |
</div> |
| 146 |
<h1>Duke Energy Authorization Code Captured!</h1> |
| 147 |
<p>Copy this code and paste it in your application.</p> |
| 148 |
|
| 149 |
<div class="code-box"> |
| 150 |
<div class="code-display" id="authCode"></div> |
| 151 |
<button class="copy-btn" id="copyCode" title="Copy to clipboard"> |
| 152 |
<svg viewBox="0 0 24 24"> |
| 153 |
<path |
| 154 |
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" |
| 155 |
/> |
| 156 |
</svg> |
| 157 |
</button> |
| 158 |
</div> |
| 159 |
</div> |
| 160 |
|
| 161 |
<div id="noCode" style="display: none"> |
| 162 |
<div class="icon icon-error"> |
| 163 |
<svg viewBox="0 0 24 24"> |
| 164 |
<path |
| 165 |
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" |
| 166 |
/> |
| 167 |
</svg> |
| 168 |
</div> |
| 169 |
<h1>No Authorization Code</h1> |
| 170 |
<p> |
| 171 |
No code was captured. Please complete the Duke Energy login flow |
| 172 |
first. |
| 173 |
</p> |
| 174 |
</div> |
| 175 |
</div> |
| 176 |
|
| 177 |
<div class="toast" id="toast">Copied!</div> |
| 178 |
|
| 179 |
<script src="capture.js"></script> |
| 180 |
</body> |
| 181 |
</html> |