@@ -151,7 +151,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
151151 < button hx-post ="/api/v3/system/action "
152152 hx-vals ='{"action": "start_display"} '
153153 hx-swap ="none "
154- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display started',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
154+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display started',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
155155 class ="inline-flex items-center px-4 py-2 border border-transparent text-base font-semibold rounded-md text-white bg-green-600 hover:bg-green-700 ">
156156 < i class ="fas fa-play mr-2 "> </ i >
157157 Start Display
@@ -160,7 +160,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
160160 < button hx-post ="/api/v3/system/action "
161161 hx-vals ='{"action": "stop_display"} '
162162 hx-swap ="none "
163- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display stopped',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
163+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display stopped',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
164164 class ="inline-flex items-center px-4 py-2 border border-transparent text-base font-semibold rounded-md text-white bg-red-600 hover:bg-red-700 ">
165165 < i class ="fas fa-stop mr-2 "> </ i >
166166 Stop Display
@@ -170,7 +170,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
170170 hx-vals ='{"action": "git_pull"} '
171171 hx-confirm ="This will stash any local changes and update the code. Continue? "
172172 hx-swap ="none "
173- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Code update completed',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
173+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Code update completed',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
174174 class ="inline-flex items-center px-4 py-2 border border-gray-300 text-base font-semibold rounded-md text-gray-900 bg-white hover:bg-gray-50 ">
175175 < i class ="fas fa-download mr-2 "> </ i >
176176 Update Code
@@ -180,7 +180,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
180180 hx-vals ='{"action": "reboot_system"} '
181181 hx-confirm ="Are you sure you want to reboot the system? "
182182 hx-swap ="none "
183- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='System rebooting...',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
183+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='System rebooting...',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
184184 class ="inline-flex items-center px-4 py-2 border border-transparent text-base font-semibold rounded-md text-white bg-yellow-600 hover:bg-yellow-700 ">
185185 < i class ="fas fa-power-off mr-2 "> </ i >
186186 Reboot System
@@ -190,7 +190,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
190190 hx-vals ='{"action": "shutdown_system"} '
191191 hx-confirm ="Are you sure you want to shut down the system? This will power off the Raspberry Pi. "
192192 hx-swap ="none "
193- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='System shutting down...',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
193+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='System shutting down...',s='info'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
194194 class ="inline-flex items-center px-4 py-2 border border-transparent text-base font-semibold rounded-md text-white bg-red-800 hover:bg-red-900 ">
195195 < i class ="fas fa-power-off mr-2 "> </ i >
196196 Shutdown System
@@ -199,7 +199,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
199199 < button hx-post ="/api/v3/system/action "
200200 hx-vals ='{"action": "restart_display_service"} '
201201 hx-swap ="none "
202- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display service restarted',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
202+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Display service restarted',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
203203 class ="inline-flex items-center px-4 py-2 border border-gray-300 text-base font-semibold rounded-md text-gray-900 bg-white hover:bg-gray-50 ">
204204 < i class ="fas fa-redo mr-2 "> </ i >
205205 Restart Display Service
@@ -208,7 +208,7 @@ <h3 class="text-md font-medium text-gray-900 mb-4">Quick Actions</h3>
208208 < button hx-post ="/api/v3/system/action "
209209 hx-vals ='{"action": "restart_web_service"} '
210210 hx-swap ="none "
211- hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Web service restarted',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) {} showNotification(m,s); } "
211+ hx-on:htmx:after-request ="if (typeof showNotification !== 'undefined') { var m='Web service restarted',s='success'; try { var d=JSON.parse(event.detail.xhr.responseText); m=d.message||m; s=d.status||s; } catch(e) { s=(event.detail.xhr&&event.detail.xhr.status>=400?'error':s); } showNotification(m,s); } "
212212 class ="inline-flex items-center px-4 py-2 border border-gray-300 text-base font-semibold rounded-md text-gray-900 bg-white hover:bg-gray-50 ">
213213 < i class ="fas fa-redo mr-2 "> </ i >
214214 Restart Web Service
0 commit comments