Simple Fix Popup
There is a popup that tells the user simple ways to fix things and also increments a counter if it worked
This commit is contained in:
@@ -170,10 +170,25 @@ pub fn submit_ticket_component() -> Html {
|
||||
let valid_rooms: HashSet<i16> = VALID_ROOMS.iter().copied().collect();
|
||||
|
||||
{
|
||||
let message = "Bevor sie zum Support weitergeleitet werden prüfen sie ob: \r\n - Ob das Problem durch Neustarten gelößt wird \r\n - Ob sie die richtigen Anmeldedaten genutzt habem \r\n - Alle notwendigen Kabel eingesteckt sind".to_string();
|
||||
let message = "Bevor sie zum Support weitergeleitet werden prüfen sie ob:
|
||||
- Ob das Problem durch Neustarten gelößt wird
|
||||
- Ob sie die richtigen Anmeldedaten genutzt habem
|
||||
- Alle notwendigen Kabel eingesteckt sind
|
||||
|
||||
Wenn es funktioniert hat klicken sie bitte \"Abbrechen\""
|
||||
.to_string();
|
||||
use_effect(move || {
|
||||
if let Some(win) = web_sys::window() {
|
||||
let _ = win.alert_with_message(&message);
|
||||
let _ = if win.confirm_with_message(&message).unwrap() {
|
||||
} else {
|
||||
spawn_local(async move {
|
||||
let _ = Request::post("/api/count")
|
||||
.credentials(web_sys::RequestCredentials::Include)
|
||||
.send()
|
||||
.await;
|
||||
});
|
||||
let _ = win.location().set_href("/");
|
||||
};
|
||||
}
|
||||
|| ()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user