RebootConfirmScreen.js 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import {t, extendLocale} from "../lib/i18n";
  2. import {TouchEventManager} from "../lib/TouchEventManager";
  3. extendLocale({
  4. "reboot_confirm": {
  5. "en-US": "Click to confirm",
  6. "zh-TW": "\u8f15\u6309\u4ee5\u91cd\u555f",
  7. "ru-RU": "Нажмите для подтверждения",
  8. "de-DE": "Klick zum Bestätigen"
  9. }
  10. })
  11. let __$$app$$__ = __$$hmAppManager$$__.currentApp;
  12. let __$$module$$__ = __$$app$$__.current;
  13. __$$module$$__.module = DeviceRuntimeCore.Page({
  14. onInit(p) {
  15. const g = hmUI.createWidget(hmUI.widget.GROUP, {
  16. x: 0,
  17. y: 0,
  18. w: 192,
  19. h: 490
  20. });
  21. const w = g.createWidget(hmUI.widget.IMG, {
  22. x: 57,
  23. y: 206,
  24. src: "qs/reboot.png"
  25. });
  26. const events = new TouchEventManager(w);
  27. events.ontouch = () => {
  28. hmUI.deleteWidget(g);
  29. };
  30. g.createWidget(hmUI.widget.TEXT, {
  31. x: 8,
  32. y: 320,
  33. w: 176,
  34. h: 56,
  35. align_h: hmUI.align.CENTER_H,
  36. text_style: hmUI.text_style.WRAP,
  37. color: 0x999999,
  38. text: t("reboot_confirm")
  39. })
  40. }
  41. });