SettingsHomePage.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import { t, extendLocale } from "../lib/i18n";
  2. import { SettingsListScreen } from "../utils/SettingsListScreen";
  3. extendLocale({
  4. cfg_timer_keep: {
  5. "en-US": "Keep last timer value",
  6. "zh-CN": "保留最后一个计时器值",
  7. "zh-TW": "保留最後一個計時器值",
  8. "ru-RU": "Запоминать посл. таймер",
  9. "de-DE": "Letzten Timerwert bebehalten"
  10. },
  11. cfg_fs_unit: {
  12. "en-US": "Use Base-2 filesize\n1KB = 1024 B",
  13. "zh-CN": "使用 Base-2 文件大小\n1KB = 1024 B",
  14. "zh-TW": "使用 Base-2 文件大小\n1KB = 1024 B",
  15. "ru-RU": "Считать размер файлов в осн. 2\n1KB = 1024 B",
  16. "de-DE": "Base-2 Dateigröße\n1KB = 1024 B"
  17. },
  18. settings_ui: {
  19. "en-US": "Customize",
  20. "zh-CN": "定制",
  21. "zh-TW": "定製",
  22. "ru-RU": "Главная",
  23. "de-DE": "Anpassen"
  24. },
  25. settings_lang: {
  26. "en-US": "Language",
  27. "zh-CN": "语言",
  28. "zh-TW": "語言",
  29. "ru-RU": "Язык",
  30. "de-DE": "Sprache"
  31. },
  32. action_info: {
  33. "en-US": "About",
  34. "zh-CN": "关于",
  35. "zh-TW": "關於",
  36. "ru-RU": "О Toolbox",
  37. "de-DE": "Über..."
  38. },
  39. });
  40. class SettingsHomePage extends SettingsListScreen {
  41. build() {
  42. this.clickableItem(t("settings_ui"), "menu/ui.png", () =>
  43. this.openPage("SettingsUiScreen")
  44. );
  45. this.clickableItem(t("settings_lang"), "menu/lang.png", () =>
  46. this.openPage("SettingsLangScreen")
  47. );
  48. this.propCheckbox(t("cfg_timer_keep"), "mmk_tb_cfg_timer_keep", true);
  49. this.propCheckbox(t("cfg_fs_unit"), "mmk_tb_fs_unit", false);
  50. this.clickableItem(t("action_info"), "menu/info.png", () =>
  51. this.openPage("AboutScreen")
  52. );
  53. }
  54. openPage(id) {
  55. hmApp.gotoPage({ url: "page/" + id });
  56. }
  57. }
  58. let __$$app$$__ = __$$hmAppManager$$__.currentApp;
  59. let __$$module$$__ = __$$app$$__.current;
  60. __$$module$$__.module = DeviceRuntimeCore.Page({
  61. onInit(p) {
  62. this.screen = new SettingsHomePage();
  63. this.screen.start();
  64. },
  65. });