| 14 | {} |
| 15 | |
| 16 | void DeleteUserDialog::processIntern() |
| 17 | { |
| 18 | AlienImGui::Text( |
| 19 | "Warning: All the data of the user '" + *NetworkService::get().getLoggedInUserName() |
| 20 | + "' will be deleted on the server side.\nThese include the likes, the simulations and the account data."); |
| 21 | AlienImGui::Separator(); |
| 22 | |
| 23 | AlienImGui::InputText(AlienImGui::InputTextParameters().hint("Re-enter password").password(true).textWidth(0), _reenteredPassword); |
| 24 | AlienImGui::Separator(); |
| 25 | |
| 26 | ImGui::BeginDisabled(_reenteredPassword.empty()); |
| 27 | if (AlienImGui::Button("Delete")) { |
| 28 | close(); |
| 29 | if (_reenteredPassword == *NetworkService::get().getPassword()) { |
| 30 | onDelete(); |
| 31 | } else { |
| 32 | GenericMessageDialog::get().information("Error", "The password does not match."); |
| 33 | } |
| 34 | _reenteredPassword.clear(); |
| 35 | } |
| 36 | ImGui::EndDisabled(); |
| 37 | ImGui::SetItemDefaultFocus(); |
| 38 | |
| 39 | ImGui::SameLine(); |
| 40 | if (AlienImGui::Button("Cancel")) { |
| 41 | close(); |
| 42 | _reenteredPassword.clear(); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void DeleteUserDialog::onDelete() |
| 47 | { |
nothing calls this directly
no test coverage detected