|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | | - <title>Service Queue - Please Wait</title> |
| 6 | + <title>[[.Translations.PageTitle]]</title> |
7 | 7 |
|
8 | | - <meta http-equiv="refresh" content="[[.RefreshInterval]];url=./"> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0, s-maxage=0"> |
| 8 | + <meta http-equiv="refresh" content="[[.QueueData.RefreshInterval]];url=./"> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0, s-maxage=0"> |
9 | 9 | <meta http-equiv="Pragma" content="no-cache"> |
10 | 10 | <meta http-equiv="Expires" content="0"> <style> |
11 | 11 | body { |
|
49 | 49 | } |
50 | 50 | .progress-bar { |
51 | 51 | height: 28px; /* Taller progress bar */ |
52 | | - width: [[.ProgressPercentage]]%; /* Dynamically set width */ |
| 52 | + width: [[.QueueData.ProgressPercentage]]%; /* Dynamically set width */ |
53 | 53 | background: linear-gradient(90deg, #007bff, #0056b3); /* Blue gradient */ |
54 | 54 | border-radius: 8px; /* Match container's rounding */ |
55 | 55 | text-align: center; |
|
98 | 98 | font-size: 0.8em; |
99 | 99 | color: #444; |
100 | 100 | word-break: break-all; |
101 | | - display: [[if .DebugInfo]]block[[else]]none[[end]]; /* Conditional display */ |
| 101 | + display: [[if .QueueData.DebugInfo]]block[[else]]none[[end]]; /* Conditional display */ |
102 | 102 | } |
103 | 103 | .debug-info pre { |
104 | 104 | white-space: pre-wrap; /* Allow wrapping for long debug lines */ |
|
123 | 123 | </head> |
124 | 124 | <body> |
125 | 125 | <div class="container"> |
126 | | - <div class="spinner"></div> <h1>You're in the Queue</h1> |
127 | | - <p>Our services are currently experiencing high demand. Your patience is appreciated. You will be automatically redirected when it's your turn.</p> |
| 126 | + <div class="spinner"></div> <h1>[[.Translations.Title]]</h1> |
| 127 | + <p>[[.Translations.Introduction]]</p> |
128 | 128 |
|
129 | 129 | <div class="progress-container"> |
130 | | - <div class="progress-bar">[[.ProgressPercentage]]%</div> |
| 130 | + <div class="progress-bar">[[.QueueData.ProgressPercentage]]%</div> |
131 | 131 | </div> |
132 | 132 |
|
133 | 133 | <div class="info-grid"> |
134 | 134 | <div class="info-box"> |
135 | | - <strong>Your Position</strong> |
136 | | - <p>[[.Position]] / [[.QueueSize]]</p> |
| 135 | + <strong>[[.Translations.YourPosition]]</strong> |
| 136 | + <p>[[.QueueData.Position]] / [[.QueueData.QueueSize]]</p> |
137 | 137 | </div> |
138 | 138 | <div class="info-box"> |
139 | | - <strong>Estimated Wait Time</strong> |
140 | | - <p>~[[.EstimatedWaitTime]] min(s)</p> |
| 139 | + <strong>[[.Translations.ETA]]</strong> |
| 140 | + <p>~[[.QueueData.EstimatedWaitTime]] [[.Translations.Mins]]</p> |
141 | 141 | </div> |
142 | 142 | </div> |
143 | 143 |
|
144 | | - <p>[[.Message]]</p> |
145 | | - |
146 | 144 | <div class="countdown-message"> |
147 | | - This page will automatically refresh in <strong id="countdown">[[.RefreshInterval]]</strong> seconds. |
| 145 | + [[ printf .Translations.RefreshTime .QueueData.RefreshInterval ]] |
148 | 146 | </div> |
149 | 147 |
|
150 | 148 | <div class="debug-info"> |
151 | 149 | <strong>Debug Information:</strong> |
152 | | - <pre>[[.DebugInfo]]</pre> |
| 150 | + <pre>[[.QueueData.DebugInfo]]</pre> |
153 | 151 | </div> |
154 | 152 | </div> |
155 | 153 |
|
156 | 154 | <script> |
157 | 155 | document.addEventListener('DOMContentLoaded', function() { |
158 | | - let countdownSeconds = parseInt("[[.RefreshInterval]]", 10); |
| 156 | + let countdownSeconds = parseInt("[[.QueueData.RefreshInterval]]", 10); |
159 | 157 | const countdownElement = document.getElementById('countdown'); |
160 | 158 |
|
161 | 159 | if (countdownElement) { |
|
183 | 181 | setTimeout(function() { |
184 | 182 | const cleanUrl = window.location.pathname; |
185 | 183 | window.location.href = cleanUrl + (cleanUrl.includes('?') ? '&' : '?') + 't_fallback=' + new Date().getTime(); |
186 | | - }, (parseInt("[[.RefreshInterval]]", 10) -1) * 1000); // 1 second before meta refresh |
| 184 | + }, (parseInt("[[.QueueData.RefreshInterval]]", 10) -1) * 1000); // 1 second before meta refresh |
187 | 185 | }); |
188 | 186 | </script> |
189 | 187 | </body> |
|
0 commit comments