passy_scene_known_issues.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "../passy_i.h"
  2. static const char* known_issues_text = "Passy only uses BAC, not PACE for auth\n"
  3. "PACE-only:\n"
  4. " - German Personalausweis\n"
  5. " - German Aufenthaltstitel post 2015\n";
  6. void passy_scene_known_issues_on_enter(void* context) {
  7. Passy* passy = context;
  8. furi_string_reset(passy->text_box_store);
  9. FuriString* str = passy->text_box_store;
  10. furi_string_cat_printf(str, "%s\n", known_issues_text);
  11. text_box_set_font(passy->text_box, TextBoxFontText);
  12. text_box_set_text(passy->text_box, furi_string_get_cstr(passy->text_box_store));
  13. view_dispatcher_switch_to_view(passy->view_dispatcher, PassyViewTextBox);
  14. }
  15. bool passy_scene_known_issues_on_event(void* context, SceneManagerEvent event) {
  16. Passy* passy = context;
  17. bool consumed = false;
  18. if(event.type == SceneManagerEventTypeCustom) {
  19. if(event.event == GuiButtonTypeLeft) {
  20. consumed = scene_manager_previous_scene(passy->scene_manager);
  21. }
  22. } else if(event.type == SceneManagerEventTypeBack) {
  23. consumed = scene_manager_previous_scene(passy->scene_manager);
  24. }
  25. return consumed;
  26. }
  27. void passy_scene_known_issues_on_exit(void* context) {
  28. Passy* passy = context;
  29. // Clear views
  30. text_box_reset(passy->text_box);
  31. }