widgets.js 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  1. /*
  2. The MIT License (MIT)
  3. Copyright (c) 2014-2018 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
  4. */
  5. /*
  6. * Cell widgets
  7. */
  8. class Widgets {
  9. constructor() {
  10. console.log("widget constructor")
  11. }
  12. get divider() {
  13. return {
  14. $cell: true,
  15. $type: "hr",
  16. class: "mdc-list-divider"
  17. }
  18. }
  19. get emptyDiv() {
  20. return {
  21. $type: "div",
  22. style: "padding-bottom: 30px;"
  23. }
  24. }
  25. get break() {
  26. return {
  27. $type: "br"
  28. }
  29. }
  30. get space() {
  31. return {
  32. $type: "span",
  33. $text: " "
  34. }
  35. }
  36. get p() {
  37. return {
  38. $type: "p"
  39. }
  40. }
  41. inputTextFieldOutlined(obj) {
  42. function initFunc() {
  43. new mdc.textField.MDCTextField.attachTo(this);
  44. }
  45. let inputType = obj.type ? obj.type : 'text';
  46. let init = obj.init ? obj.init : initFunc;
  47. let style = obj.style ? obj.style : "";
  48. let fieldStyle = obj.fieldStyle ? obj.fieldStyle : "";
  49. return {
  50. $cell: true,
  51. $type: "div",
  52. class: "mdc-text-field mdc-text-field--outlined mdc-text-field--dense",
  53. style: style,
  54. $init: init,
  55. $components: [
  56. {
  57. $type: "input",
  58. type: inputType,
  59. id: obj.id,
  60. class: "mdc-text-field__input",
  61. value: obj.value,
  62. onchange: obj.change,
  63. style: obj.fieldStyle
  64. },
  65. {
  66. $type: "span",
  67. class: "mdc-notched-outline",
  68. $components: [
  69. {
  70. $type: "span",
  71. class: "mdc-notched-outline__leading"
  72. },
  73. {
  74. $type: "span",
  75. class: "mdc-notched-outline__notch",
  76. $components: [
  77. {
  78. $type: "span",
  79. class: "mdc-floating-label",
  80. for: obj.id,
  81. $text: obj.label
  82. }
  83. ]
  84. },
  85. {
  86. $type: "span",
  87. class: "mdc-notched-outline__trailing"
  88. }
  89. ]
  90. }
  91. ]
  92. //onclick: obj.onclick
  93. }
  94. }
  95. inputTextFieldStandart(obj) {
  96. var propValue = obj.value;
  97. if (_app.helpers.testJSON(obj.value)) {
  98. propValue = JSON.parse(obj.value);
  99. } else {
  100. propValue = obj.value;
  101. }
  102. return {
  103. $cell: true,
  104. $type: "div",
  105. class: "mdc-text-field mdc-text-field--filled",
  106. _mdc: null,
  107. $init: function () {
  108. //new mdc.mdc.notchedOutline.MDCNotchedOutline(document.querySelector('.mdc-notched-outline'));
  109. this._mdc = new mdc.textField.MDCTextField.attachTo(this);
  110. },
  111. $components: [
  112. {
  113. $type: "span",
  114. class: "mdc-text-field__ripple",
  115. },
  116. {
  117. $type: "input",
  118. type: "text",
  119. id: obj.id,
  120. class: "mdc-text-field__input",
  121. value: propValue,
  122. onchange: obj.change
  123. },
  124. {
  125. $type: "span",
  126. class: "mdc-floating-label",
  127. for: obj.id,
  128. $text: obj.label
  129. },
  130. {
  131. $type: "span",
  132. class: "mdc-line-ripple"
  133. }
  134. ]
  135. //onclick: obj.onclick
  136. }
  137. }
  138. headerH3(headertype, label, cssclass) {
  139. return {
  140. $cell: true,
  141. $type: headertype,
  142. class: cssclass,
  143. $text: label
  144. }
  145. }
  146. simpleCard(obj) {
  147. let style = 'background-image: url(' + obj.imgSrc + '); background-size: cover; background-repeat: no-repeat; height:' + obj.imgHeight + ';';
  148. var addonClass = obj.addonClass;
  149. if (!addonClass) {
  150. addonClass = ''
  151. }
  152. return {
  153. $cell: true,
  154. $type: "div",
  155. $components: [
  156. {
  157. $cell: true,
  158. $type: "div",
  159. class: "mdc-card" + ' ' + addonClass,
  160. onclick: obj.onclickfunc,
  161. $components: [
  162. {
  163. $cell: true,
  164. $type: "section",
  165. class: "mdc-card__media",
  166. style: style
  167. },
  168. {
  169. $cell: true,
  170. $type: "section",
  171. class: "mdc-card__supporting-text",
  172. $text: obj.text
  173. }
  174. ]
  175. }
  176. ]
  177. }
  178. }
  179. listDivider() {
  180. return {
  181. $cell: true,
  182. $type: "hr",
  183. class: "mdc-list-divider mdc-list-divider--inset"
  184. }
  185. }
  186. createListItem(obj) {
  187. return {
  188. $cell: true,
  189. $type: "li",
  190. class: "mdc-list-item",
  191. $components: [
  192. {
  193. $cell: true,
  194. $type: "span",
  195. class: "mdc-list-item__graphic",
  196. $components: [
  197. {
  198. $cell: true,
  199. class: "createItems",
  200. $type: "img",
  201. src: obj.imgSrc,
  202. onclick: obj.onclickfunc
  203. }
  204. ]
  205. },
  206. {
  207. $cell: true,
  208. $type: "span",
  209. class: "mdc-list-item__text",
  210. $text: obj.title
  211. // $components: [
  212. // {
  213. // $text: obj.title
  214. // },
  215. // {
  216. // $cell: true,
  217. // $type: "span",
  218. // class: "mdc-list-item__secondary-text",
  219. // $text: obj.subTitle
  220. // }
  221. // ]
  222. }
  223. ]
  224. }
  225. }
  226. createCard(obj) {
  227. return {
  228. $cell: true,
  229. $type: "div",
  230. $components: [
  231. {
  232. $cell: true,
  233. $type: "div",
  234. class: "mdc-card",
  235. $components: [
  236. {
  237. $cell: true,
  238. $type: "div",
  239. class: "mdc-card__horizontal-block",
  240. $components: [
  241. {
  242. $cell: true,
  243. $type: "section",
  244. class: "mdc-card__primary",
  245. $components: [
  246. {
  247. $cell: true,
  248. $type: "h1",
  249. class: "mdc-card__title mdc-card__title--large",
  250. $text: obj.title
  251. },
  252. {
  253. $cell: true,
  254. $type: "h2",
  255. class: "mdc-card__subtitle",
  256. $text: obj.subTitle
  257. }
  258. ]
  259. },
  260. {
  261. $cell: true,
  262. $type: "img",
  263. class: "",
  264. src: obj.imgSrc
  265. }
  266. ]
  267. },
  268. {
  269. $cell: true,
  270. $type: "section",
  271. class: "mdc-card__actions",
  272. $components: [
  273. {
  274. $cell: true,
  275. $type: "button",
  276. class: "mdc-button mdc-button--compact mdc-card__action",
  277. $text: obj.actionLabel
  278. }
  279. ]
  280. }
  281. ]
  282. }
  283. ]
  284. }
  285. }
  286. buttonStroked(obj) {
  287. let initFun = obj.init ? obj.init : function () { }
  288. return {
  289. $cell: true,
  290. $type: "button",
  291. class: "mdc-button mdc-button--outlined",
  292. $text: obj.label,
  293. onclick: obj.onclick,
  294. $init: initFun
  295. }
  296. }
  297. buttonRaised(obj) {
  298. let initFun = obj.init ? obj.init : function () { }
  299. return {
  300. $cell: true,
  301. $type: "button",
  302. class: "mdc-button mdc-button--raised mdc-ripple-upgraded",
  303. $text: obj.label,
  304. onclick: obj.onclick,
  305. $init: initFun
  306. }
  307. }
  308. buttonSimple(obj) {
  309. return {
  310. $cell: true,
  311. $type: "button",
  312. class: "mdc-button",
  313. $components: [
  314. {
  315. $type: "span",
  316. class: "mdc-button__label",
  317. $text: obj.label
  318. }
  319. ],
  320. onclick: obj.onclick
  321. }
  322. }
  323. sliderDiscrete(obj) {
  324. return {
  325. $cell: true,
  326. $type: "div",
  327. class: "mdc-slider mdc-slider--discrete",
  328. role: "slider",
  329. 'aria-valuemin': obj.min,
  330. 'aria-valuemax': obj.max,
  331. 'aria-label': obj.label,
  332. $init: obj.init,
  333. $components: [
  334. {
  335. $cell: true,
  336. $type: "div",
  337. class: "mdc-slider__track-container",
  338. $components: [
  339. {
  340. $cell: true,
  341. $type: "div",
  342. class: "mdc-slider__track",
  343. }
  344. ]
  345. },
  346. {
  347. $cell: true,
  348. $type: "div",
  349. class: "mdc-slider__thumb-container",
  350. $components: [
  351. {
  352. $cell: true,
  353. $type: "div",
  354. class: "mdc-slider__pin",
  355. $components: [
  356. {
  357. $cell: true,
  358. $type: "span",
  359. class: "mdc-slider__pin-value-marker",
  360. }
  361. ]
  362. },
  363. {
  364. $cell: true,
  365. $type: "svg",
  366. class: "mdc-slider__thumb",
  367. width: 21,
  368. height: 21,
  369. $components: [
  370. {
  371. $cell: true,
  372. $type: "circle",
  373. cx: 10.5,
  374. cy: 10.5,
  375. r: 7.875
  376. }
  377. ]
  378. },
  379. {
  380. $cell: true,
  381. $type: "div",
  382. class: "mdc-slider__focus-ring"
  383. }
  384. ]
  385. }
  386. ]
  387. }
  388. }
  389. sliderContinuous(obj) {
  390. return {
  391. $cell: true,
  392. $type: "div",
  393. 'id': obj.id,
  394. class: "mdc-slider",
  395. //tabindex: 0,
  396. $init: obj.init,
  397. $components: [
  398. {
  399. $cell: true,
  400. $type: "input",
  401. class: "mdc-slider__input",
  402. 'value': obj.value,
  403. 'type': "range",
  404. 'step': obj.step,
  405. 'min': obj.min,
  406. 'max': obj.max,
  407. 'aria-label': obj.label
  408. },
  409. {
  410. // $cell: true,
  411. $type: "div",
  412. class: "mdc-slider__track",
  413. $components: [
  414. {
  415. //$cell: true,
  416. $type: "div",
  417. class: "mdc-slider__track--active",
  418. $components: [
  419. {
  420. //$cell: true,
  421. $type: "div",
  422. class: "mdc-slider__track--active_fill"
  423. }
  424. ]
  425. },
  426. {
  427. //$cell: true,
  428. $type: "div",
  429. class: "mdc-slider__track--inactive"
  430. }
  431. ]
  432. },
  433. {
  434. //$cell: true,
  435. $type: "div",
  436. class: "mdc-slider__thumb",
  437. $components: [
  438. {
  439. //$cell: true,
  440. $type: "div",
  441. class: "mdc-slider__thumb-knob"
  442. }
  443. ]
  444. }
  445. // {
  446. // $cell: true,
  447. // $type: "div",
  448. // class: "mdc-slider__thumb-container",
  449. // $components: [
  450. // {
  451. // $cell: true,
  452. // $type: "svg",
  453. // class: "mdc-slider__thumb",
  454. // width: 21,
  455. // height: 21,
  456. // $components: [
  457. // {
  458. // $cell: true,
  459. // $type: "circle",
  460. // cx: 10.5,
  461. // cy: 10.5,
  462. // r: 7.875
  463. // }
  464. // ]
  465. // },
  466. // {
  467. // $cell: true,
  468. // $type: "div",
  469. // class: "mdc-slider__focus-ring"
  470. // }
  471. // ]
  472. // }
  473. ]
  474. }
  475. }
  476. textField(obj) {
  477. return {
  478. class: "mdc-text-field",
  479. style: "width: 100%",
  480. $cell: true,
  481. $type: "div",
  482. $components: [
  483. {
  484. class: "mdc-text-field__input prop-text-field-input",
  485. id: obj.id,
  486. $cell: true,
  487. $type: "input",
  488. type: "text",
  489. value: obj.value,
  490. onchange: obj.funconchange
  491. }
  492. ]
  493. }
  494. }
  495. icontoggle(obj) {
  496. var addClass = "";
  497. if (obj.styleClass) {
  498. addClass = obj.styleClass;
  499. }
  500. return {
  501. $type: "button",
  502. class: addClass + " mdc-icon-button",
  503. //$text: obj.label,
  504. id: obj.id,
  505. //'data-toggle-on': obj.on,
  506. // 'data-toggle-off': obj.off,
  507. 'aria-pressed': obj.state,
  508. 'aria-hidden': true,
  509. $init: obj.init,
  510. $components: [
  511. {
  512. $type: "i",
  513. class: "material-icons mdc-icon-button__icon mdc-icon-button__icon--on",
  514. $text: JSON.parse(obj.on).content
  515. },
  516. {
  517. $type: "i",
  518. class: "material-icons mdc-icon-button__icon",
  519. $text: JSON.parse(obj.off).content
  520. },
  521. ]
  522. }
  523. }
  524. floatActionButton(obj) {
  525. var addClass = "";
  526. if (obj.styleClass) {
  527. addClass = obj.styleClass;
  528. }
  529. return {
  530. $cell: true,
  531. $type: "button",
  532. class: "mdc-fab material-icons " + addClass,
  533. onclick: obj.onclickfunc,
  534. $components: [
  535. {
  536. $cell: true,
  537. $type: "span",
  538. class: "mdc-fab__icon",
  539. $text: obj.label
  540. }
  541. ]
  542. }
  543. }
  544. iconButton(obj) {
  545. var addClass = "";
  546. if (obj.styleClass) {
  547. addClass = obj.styleClass;
  548. }
  549. return {
  550. $cell: true,
  551. $type: "button",
  552. class: "mdc-button " + addClass,
  553. onclick: obj.onclick,
  554. $components: [
  555. {
  556. $cell: true,
  557. $type: "i",
  558. class: "material-icons mdc-button__icon",
  559. $text: obj.label
  560. }
  561. ]
  562. }
  563. }
  564. imageButton(obj) {
  565. return {
  566. $cell: true,
  567. $type: "button",
  568. class: "mdc-button mdc-button--compact",
  569. onclick: obj.onclickfunc,
  570. $components: [
  571. {
  572. $cell: true,
  573. class: obj.styleClass,
  574. $type: "img",
  575. src: obj.imgSrc
  576. }
  577. ]
  578. }
  579. }
  580. listTitle(obj) {
  581. return {
  582. $type: "div",
  583. class: "mdc-layout-grid__inner",
  584. $components: [
  585. {
  586. $type: "div",
  587. class: "mdc-layout-grid__cell",
  588. $components: [
  589. {
  590. $type: "h3",
  591. class: "",
  592. $text: obj.text
  593. }
  594. ]
  595. }
  596. ]
  597. }
  598. }
  599. gridListItemWithIco(obj) {
  600. return {
  601. $type: "div",
  602. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-2 tooltip " + obj.styleClass,
  603. $components: [
  604. {
  605. class: "tooltiptext",
  606. $type: "span",
  607. $text: obj.title
  608. },
  609. // {
  610. // $type: "button",
  611. // class: "mdc-button",
  612. // onclick: obj.onclickfunc,
  613. // $components:[
  614. // {
  615. // $type: "i",
  616. // class: "material-icons mdc-button__icon",
  617. // $text: obj.imgSrc
  618. // }
  619. // ]
  620. // }
  621. {
  622. $type: "div",
  623. style: "background-color: transparent;",
  624. $components: [
  625. {
  626. $type: "i",
  627. class: "material-icons mdc-list-item__graphic",
  628. 'aria-hidden': "true",
  629. $text: obj.imgSrc,
  630. onclick: obj.onclickfunc
  631. }
  632. ]
  633. }
  634. ]
  635. }
  636. }
  637. gridListItem(obj) {
  638. return {
  639. $type: "div",
  640. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-2 tooltip " + obj.styleClass,
  641. $components: [
  642. {
  643. class: "tooltiptext",
  644. $type: "span",
  645. $text: obj.title
  646. },
  647. {
  648. $type: "div",
  649. style: "background-color: transparent;",
  650. $components: [
  651. {
  652. class: "",
  653. $type: "div",
  654. 'aria-label': obj.title,
  655. alt: obj.title,
  656. style: "background-image: url(" + obj.imgSrc + "); background-size: cover; background-repeat: no-repeat; height: " + obj.imgSize + "; width: " + obj.imgSize + ";",
  657. onclick: obj.onclickfunc,
  658. }
  659. ]
  660. }
  661. ]
  662. }
  663. }
  664. switch(obj) {
  665. return {
  666. $cell: true,
  667. $type: "div",
  668. class: "mdc-switch",
  669. _switch: null,
  670. id: obj.id,
  671. //change: obj.onchange,
  672. $init: obj.init,
  673. //function(){
  674. // new mdc.switchControl.MDCSwitch(this);
  675. // },
  676. $components: [
  677. {
  678. $type: "div",
  679. class: "mdc-switch__track",
  680. },
  681. {
  682. $type: "div",
  683. class: "mdc-switch__thumb-underlay",
  684. $components: [
  685. {
  686. $type: "div",
  687. class: "mdc-switch__thumb",
  688. $components: [
  689. {
  690. $type: "input",
  691. "type": "checkbox",
  692. class: "mdc-switch__native-control",
  693. id: 'input-' + obj.id,
  694. //$init: obj.init,
  695. //id: "basic-switch",
  696. "aria-checked": false,
  697. role: "switch"
  698. }
  699. ]
  700. }
  701. ]
  702. }
  703. // {
  704. // $type: "div",
  705. // class: "mdc-switch__background",
  706. // $components: [
  707. // {
  708. // $type: "div",
  709. // class: "mdc-switch__knob"
  710. // }
  711. // ]
  712. // }
  713. ]
  714. }
  715. }
  716. connectionSettingsGUI() {
  717. let connectionSettings = {
  718. id: 'connectionSettings',
  719. $type: 'div',
  720. $components: [
  721. _app.widgets.emptyDiv,
  722. window._app.widgets.buttonRaised(
  723. {
  724. "label": 'Settings',
  725. "onclick": function (e) {
  726. e.preventDefault();
  727. window.location.pathname = '/settings';
  728. }
  729. }), _app.widgets.emptyDiv
  730. ]
  731. }
  732. return connectionSettings
  733. }
  734. debugGUI() {
  735. let self = this;
  736. let debug6DoF = {
  737. $cell: true,
  738. $components: [
  739. {
  740. $type: "p",
  741. class: "mdc-typography--headline5",
  742. $text: "Debug 6DoF mode (for using with WebXR emulator)"
  743. },
  744. {
  745. $type: 'p'
  746. },
  747. _app.widgets.switch({
  748. 'id': 'forceDebug6DoF',
  749. 'init': function () {
  750. this._switch = new mdc.switchControl.MDCSwitch(this);
  751. let config = localStorage.getItem('lcs_config');
  752. this._switch.checked = JSON.parse(config).d6DoF;
  753. // this._replaceSwitch = this._switch;
  754. },
  755. 'onchange': function (e) {
  756. if (this._switch) {
  757. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  758. if (chkAttr) {
  759. let config = JSON.parse(localStorage.getItem('lcs_config'));
  760. config.d6DoF = true;
  761. localStorage.setItem('lcs_config', JSON.stringify(config));
  762. //this._switch.checked = false;
  763. } else {
  764. let config = JSON.parse(localStorage.getItem('lcs_config'));
  765. config.d6DoF = false;
  766. localStorage.setItem('lcs_config', JSON.stringify(config));
  767. }
  768. }
  769. }
  770. }
  771. ),
  772. {
  773. $type: 'label',
  774. for: 'input-forceDebug6DoF',
  775. $text: 'On / Off'
  776. }
  777. ]
  778. }
  779. let debug3DoF = {
  780. $cell: true,
  781. $components: [
  782. {
  783. $type: "p",
  784. class: "mdc-typography--headline5",
  785. $text: "Debug 3DoF mode (for using with WebXR emulator)"
  786. },
  787. {
  788. $type: 'p'
  789. },
  790. _app.widgets.switch({
  791. 'id': 'forceDebug3DoF',
  792. 'init': function () {
  793. this._switch = new mdc.switchControl.MDCSwitch(this);
  794. let config = localStorage.getItem('lcs_config');
  795. this._switch.checked = JSON.parse(config).d3DoF;
  796. // this._replaceSwitch = this._switch;
  797. },
  798. 'onchange': function (e) {
  799. if (this._switch) {
  800. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  801. if (chkAttr) {
  802. let config = JSON.parse(localStorage.getItem('lcs_config'));
  803. config.d3DoF = true;
  804. localStorage.setItem('lcs_config', JSON.stringify(config));
  805. //this._switch.checked = false;
  806. } else {
  807. let config = JSON.parse(localStorage.getItem('lcs_config'));
  808. config.d3DoF = false;
  809. localStorage.setItem('lcs_config', JSON.stringify(config));
  810. }
  811. }
  812. }
  813. }
  814. ),
  815. {
  816. $type: 'label',
  817. for: 'input-forceDebug3DoF',
  818. $text: 'On / Off'
  819. }
  820. ]
  821. }
  822. let allGUI =
  823. {
  824. $type: "div",
  825. id: "allGUI",
  826. //style:"background-color: #efefef",
  827. class: "mdc-layout-grid mdc-layout-grid--align-left",
  828. _d3DoF: null,
  829. _d6DoF: null,
  830. _initData: function () {
  831. let config = JSON.parse(localStorage.getItem('lcs_config'));
  832. if (config.d3DoF) {
  833. this._d3DoF = config.d3DoF
  834. }
  835. if (config.d6DoF) {
  836. this._d6DoF = config.d6DoF
  837. }
  838. this._refresh();
  839. },
  840. $init: function () {
  841. this._initData();
  842. },
  843. _refresh: function () {
  844. this.$components = [
  845. {
  846. $type: "div",
  847. class: "mdc-layout-grid__inner",
  848. $components: [
  849. {
  850. $type: "div",
  851. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  852. $components: [
  853. {
  854. $type: "h4",
  855. class: "mdc-typography--headline4",
  856. $text: "Debug settings"
  857. }
  858. ]
  859. },
  860. {
  861. $type: "div",
  862. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  863. $components: [debug6DoF]
  864. },
  865. {
  866. $type: "div",
  867. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  868. $components: [_app.widgets.divider]
  869. },
  870. {
  871. $type: "div",
  872. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  873. $components: [debug3DoF]
  874. },
  875. {
  876. $type: "div",
  877. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  878. $components: [
  879. // window._app.widgets.buttonRaised(
  880. // {
  881. // "label": 'Update',
  882. // "onclick": function (e) {
  883. // e.preventDefault();
  884. // let config = JSON.parse(localStorage.getItem('lcs_config'));
  885. // config.reflector = this._refHostField.value;
  886. // config.dbhost = this._dbHostField.value;
  887. // config.luminaryPath = this._lpathField.value;
  888. // config.luminaryGlobalHBPath = this._hbpathField.value;
  889. // localStorage.setItem('lcs_config', JSON.stringify(config));
  890. // window.location.reload(true);
  891. // }
  892. // }),
  893. {
  894. $type: 'span',
  895. $text: " "
  896. },
  897. {
  898. $type: "button",
  899. class: "mdc-button mdc-button--raised",
  900. $text: "Close",
  901. onclick: function (e) {
  902. window.history.back();
  903. //window.location.pathname = '/'
  904. }
  905. }
  906. ]
  907. }
  908. ]
  909. }
  910. ]
  911. }
  912. }
  913. document.querySelector("#appGUI").$cell({
  914. id: "appGUI",
  915. $cell: true,
  916. $type: "div",
  917. $components: [allGUI]
  918. }
  919. );
  920. }
  921. streamMsgConfig() {
  922. return {
  923. $cell: true,
  924. _streamMsgConfig: null,
  925. $components: [
  926. {
  927. $type: "p",
  928. class: "mdc-typography--headline5",
  929. $text: "Use Stream of Messages"
  930. },
  931. {
  932. $type: 'p'
  933. },
  934. _app.widgets.switch({
  935. 'id': 'streamMsgConfig',
  936. 'init': function () {
  937. this._switch = new mdc.switchControl.MDCSwitch(this);
  938. this._switch.checked = _app.streamMsg;//JSON.parse(config).streamMsg;
  939. this.addEventListener('change',
  940. function (e) {
  941. if (this._switch) {
  942. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  943. _app.streamMsg = chkAttr;
  944. }
  945. }
  946. )
  947. }
  948. }
  949. ),
  950. {
  951. $type: 'label',
  952. for: 'input-streamMsgConfig',
  953. $text: 'On / Off'
  954. }
  955. ]
  956. }
  957. }
  958. reflectorGUI() {
  959. let self = this;
  960. let webrtcConnection = {
  961. $cell: true,
  962. $components: [
  963. {
  964. $type: "p",
  965. class: "mdc-typography--headline5",
  966. $text: "Use WebRTC for connection"
  967. },
  968. {
  969. $type: 'p'
  970. },
  971. _app.widgets.switch({
  972. 'id': 'forceWebRTC',
  973. 'init': function () {
  974. this._switch = new mdc.switchControl.MDCSwitch(this);
  975. let config = localStorage.getItem('lcs_config');
  976. this._switch.checked = JSON.parse(config).webrtc;
  977. // this._replaceSwitch = this._switch;
  978. this.addEventListener('change',
  979. function (e) {
  980. if (this._switch) {
  981. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  982. if (chkAttr) {
  983. let config = JSON.parse(localStorage.getItem('lcs_config'));
  984. config.webrtc = true;
  985. localStorage.setItem('lcs_config', JSON.stringify(config));
  986. //this._switch.checked = false;
  987. } else {
  988. let config = JSON.parse(localStorage.getItem('lcs_config'));
  989. config.webrtc = false;
  990. localStorage.setItem('lcs_config', JSON.stringify(config));
  991. }
  992. }
  993. }
  994. )
  995. },
  996. 'onchange': ""
  997. }
  998. ),
  999. {
  1000. $type: 'label',
  1001. for: 'input-forceWebRTC',
  1002. $text: 'On / Off'
  1003. }
  1004. ]
  1005. }
  1006. let multiSocket = {
  1007. $cell: true,
  1008. $components: [
  1009. {
  1010. $type: "p",
  1011. class: "mdc-typography--headline5",
  1012. $text: "Use Rooms & Gun DB MultiSocket (no mem)"
  1013. },
  1014. {
  1015. $type: 'p'
  1016. },
  1017. _app.widgets.switch({
  1018. 'id': 'multisocket',
  1019. 'init': function () {
  1020. this._switch = new mdc.switchControl.MDCSwitch(this);
  1021. let config = localStorage.getItem('lcs_config');
  1022. this._switch.checked = JSON.parse(config).multisocket;
  1023. this.addEventListener('change',
  1024. function (e) {
  1025. if (this._switch) {
  1026. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  1027. if (chkAttr) {
  1028. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1029. config.multisocket = true;
  1030. localStorage.setItem('lcs_config', JSON.stringify(config));
  1031. //this._switch.checked = false;
  1032. } else {
  1033. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1034. config.multisocket = false;
  1035. localStorage.setItem('lcs_config', JSON.stringify(config));
  1036. }
  1037. }
  1038. }
  1039. )
  1040. // this._replaceSwitch = this._switch;
  1041. },
  1042. 'onchange': ""
  1043. }
  1044. ),
  1045. {
  1046. $type: 'label',
  1047. for: 'input-multisocket',
  1048. $text: 'On / Off'
  1049. }
  1050. ]
  1051. }
  1052. // let luminaryGlobalHB = {
  1053. // $cell: true,
  1054. // $components: [
  1055. // {
  1056. // $type: "p",
  1057. // class: "mdc-typography--headline5",
  1058. // $text: "Use Global Heartbeat"
  1059. // },
  1060. // {
  1061. // $type: 'p'
  1062. // },
  1063. // _app.widgets.switch({
  1064. // 'id': 'forceLuminary',
  1065. // 'init': function () {
  1066. // this._switch = new mdc.switchControl.MDCSwitch(this);
  1067. // let config = localStorage.getItem('lcs_config');
  1068. // this._switch.checked = JSON.parse(config).luminaryGlobalHB;
  1069. // // this._replaceSwitch = this._switch;
  1070. // },
  1071. // 'onchange': function (e) {
  1072. // if (this._switch) {
  1073. // let chkAttr = this._switch.checked;//this.getAttribute('checked');
  1074. // if (chkAttr) {
  1075. // let config = JSON.parse(localStorage.getItem('lcs_config'));
  1076. // config.luminaryGlobalHB = true;
  1077. // localStorage.setItem('lcs_config', JSON.stringify(config));
  1078. // //this._switch.checked = false;
  1079. // } else {
  1080. // let config = JSON.parse(localStorage.getItem('lcs_config'));
  1081. // config.luminaryGlobalHB = false;
  1082. // localStorage.setItem('lcs_config', JSON.stringify(config));
  1083. // }
  1084. // }
  1085. // }
  1086. // }
  1087. // ),
  1088. // {
  1089. // $type: 'label',
  1090. // for: 'input-forceLuminary',
  1091. // $text: 'On / Off'
  1092. // }
  1093. // ]
  1094. // }
  1095. let luminaryFeature = {
  1096. $type: 'div',
  1097. $components: [
  1098. {
  1099. $type: "p",
  1100. class: "mdc-typography--headline4",
  1101. $text: "Use Krestianstvo Luminary (experimental)"
  1102. },
  1103. {
  1104. $type: 'p'
  1105. },
  1106. _app.widgets.switch({
  1107. 'id': 'forceLuminary',
  1108. 'init': function () {
  1109. this._switch = new mdc.switchControl.MDCSwitch(this);
  1110. let config = localStorage.getItem('lcs_config');
  1111. this._switch.checked = JSON.parse(config).luminary;
  1112. // this._replaceSwitch = this._switch;
  1113. this.addEventListener('change',
  1114. function (e) {
  1115. if (this._switch) {
  1116. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  1117. if (chkAttr) {
  1118. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1119. config.luminary = true;
  1120. localStorage.setItem('lcs_config', JSON.stringify(config));
  1121. window.location.reload(true);
  1122. //this._switch.checked = false;
  1123. } else {
  1124. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1125. config.luminary = false;
  1126. localStorage.setItem('lcs_config', JSON.stringify(config));
  1127. window.location.reload(true);
  1128. }
  1129. }
  1130. }
  1131. )
  1132. },
  1133. 'onchange': ""
  1134. }
  1135. ),
  1136. {
  1137. $type: 'label',
  1138. for: 'input-forceLuminary',
  1139. $text: 'Off / On'
  1140. },
  1141. _app.widgets.p
  1142. ]
  1143. }
  1144. let reflectorGUI =
  1145. {
  1146. $type: "div",
  1147. id: "reflectorGUI",
  1148. //style:"background-color: #efefef",
  1149. class: "mdc-layout-grid mdc-layout-grid--align-left",
  1150. _reflectorHost: null,
  1151. _dbHost: null,
  1152. _refHostField: null,
  1153. _dbHostField: null,
  1154. _lpath: null,
  1155. _lpathField: null,
  1156. _hbpath: null,
  1157. _hbpathField: null,
  1158. //_debug: null,
  1159. _initData: function () {
  1160. this._reflectorHost = '';
  1161. this._dbHost = '';
  1162. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1163. if (config.reflector) {
  1164. this._reflectorHost = config.reflector
  1165. }
  1166. if (config.dbhost) {
  1167. this._dbHost = config.dbhost
  1168. }
  1169. if (config.luminaryPath) {
  1170. this._lpath = config.luminaryPath
  1171. }
  1172. // if (config.luminaryGlobalHBPath) {
  1173. // this._hbpath = config.luminaryGlobalHBPath
  1174. // }
  1175. // if (config.debug) {
  1176. // this._debug = config.debug
  1177. // }
  1178. },
  1179. $init: function () {
  1180. this._initData();
  1181. },
  1182. $update: function () {
  1183. this.$components = [
  1184. {
  1185. $type: "div",
  1186. class: "mdc-layout-grid__inner",
  1187. $components: [
  1188. {
  1189. $type: "div",
  1190. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1191. $components: [
  1192. {
  1193. $type: "h4",
  1194. class: "mdc-typography--headline4",
  1195. $text: "Gun DB settings"
  1196. }
  1197. ]
  1198. },
  1199. {
  1200. $type: "div",
  1201. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1202. $components: [
  1203. {
  1204. $type: "span",
  1205. class: "mdc-typography--headline5",
  1206. $text: "DB Host: "
  1207. },
  1208. window._app.widgets.inputTextFieldOutlined({
  1209. "id": 'dbhostInput',
  1210. "label": "DB Host",
  1211. "value": this._dbHost,
  1212. "type": "text",
  1213. "init": function () {
  1214. this._dbHostField = new mdc.textField.MDCTextField(this);
  1215. },
  1216. "style": 'width: 400px;'
  1217. }),
  1218. ]
  1219. },
  1220. {
  1221. $type: "div",
  1222. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1223. $components: [
  1224. {
  1225. $type: "h4",
  1226. class: "mdc-typography--headline4",
  1227. $text: "Reflector settings"
  1228. }
  1229. ]
  1230. },
  1231. {
  1232. $type: "div",
  1233. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1234. $components: [
  1235. {
  1236. $type: "span",
  1237. class: "mdc-typography--headline5",
  1238. $text: "Reflector: "
  1239. },
  1240. window._app.widgets.inputTextFieldOutlined({
  1241. "id": 'reflectorInput',
  1242. "label": "Reflector",
  1243. "value": this._reflectorHost,
  1244. "type": "text",
  1245. "init": function () {
  1246. this._refHostField = new mdc.textField.MDCTextField(this);
  1247. },
  1248. "style": 'width: 400px;'
  1249. }),
  1250. ]
  1251. },
  1252. {
  1253. $type: "div",
  1254. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1255. $components: [webrtcConnection]
  1256. },
  1257. {
  1258. $type: "div",
  1259. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1260. $components: [_app.widgets.divider]
  1261. },
  1262. // {
  1263. // $type: "div",
  1264. // class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1265. // $components: [
  1266. // {
  1267. // $type: "h4",
  1268. // class: "mdc-typography--headline4",
  1269. // $text: "Krestianstvo Luminary settings (experimental)"
  1270. // }
  1271. // ]
  1272. // },
  1273. {
  1274. $type: "div",
  1275. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1276. $components: [
  1277. luminaryFeature
  1278. ]
  1279. },
  1280. {
  1281. $type: "div",
  1282. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1283. $components: [multiSocket]
  1284. },
  1285. {
  1286. $type: "div",
  1287. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1288. $components: [
  1289. {
  1290. $type: "span",
  1291. class: "mdc-typography--headline5",
  1292. $text: "Multisocket Rooms Host: "
  1293. },
  1294. window._app.widgets.inputTextFieldOutlined({
  1295. "id": 'lpathInput',
  1296. "label": "Multisocket Rooms Host",
  1297. "value": this._lpath,
  1298. "type": "text",
  1299. "init": function () {
  1300. this._lpathField = new mdc.textField.MDCTextField(this);
  1301. },
  1302. "style": 'width: 400px;'
  1303. }),
  1304. ]
  1305. },
  1306. // {
  1307. // $type: "div",
  1308. // class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1309. // $components: [
  1310. // {
  1311. // $type: "span",
  1312. // class: "mdc-typography--headline5",
  1313. // $text: "Global Heartbeat Path: "
  1314. // },
  1315. // window._app.widgets.inputTextFieldOutlined({
  1316. // "id": 'hbpathInput',
  1317. // "label": "Global Heartbeat Path",
  1318. // "value": this._hbpath,
  1319. // "type": "text",
  1320. // "init": function() {
  1321. // this._hbpathField = new mdc.textField.MDCTextField(this);
  1322. // },
  1323. // "style": 'width: 400px;'
  1324. // }),
  1325. // ]
  1326. // },
  1327. // {
  1328. // $type: "div",
  1329. // class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1330. // $components: [luminaryGlobalHB ]
  1331. // },
  1332. {
  1333. $type: "div",
  1334. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1335. $components: [_app.widgets.divider]
  1336. },
  1337. // {
  1338. // $type: "div",
  1339. // class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1340. // $components: [self.streamMsgConfig()]
  1341. // },
  1342. // {
  1343. // $type: "div",
  1344. // class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1345. // $components: [debugGUI]
  1346. // },
  1347. {
  1348. $type: "div",
  1349. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1350. $components: [
  1351. window._app.widgets.buttonRaised(
  1352. {
  1353. "label": 'Update',
  1354. "onclick": function (e) {
  1355. e.preventDefault();
  1356. let config = JSON.parse(localStorage.getItem('lcs_config'));
  1357. config.reflector = this._refHostField.value;
  1358. config.dbhost = this._dbHostField.value;
  1359. config.luminaryPath = this._lpathField.value;
  1360. //config.luminaryGlobalHBPath = this._hbpathField.value;
  1361. localStorage.setItem('lcs_config', JSON.stringify(config));
  1362. window.location.reload(true);
  1363. }
  1364. }),
  1365. {
  1366. $type: 'span',
  1367. $text: " "
  1368. },
  1369. {
  1370. $type: "button",
  1371. class: "mdc-button mdc-button--raised",
  1372. $text: "Close",
  1373. onclick: function (e) {
  1374. window.history.back();
  1375. //window.location.pathname = '/'
  1376. }
  1377. }
  1378. ]
  1379. }
  1380. ]
  1381. }
  1382. ]
  1383. }
  1384. }
  1385. document.querySelector("#appGUI").$cell({
  1386. id: "appGUI",
  1387. $cell: true,
  1388. $type: "div",
  1389. $components: [reflectorGUI]
  1390. }
  1391. );
  1392. }
  1393. getLoginGUI() {
  1394. let loginGUI =
  1395. {
  1396. $type: "div",
  1397. id: "loginGUI",
  1398. //style:"background-color: #efefef",
  1399. class: "mdc-layout-grid mdc-layout-grid--align-left",
  1400. _alias: null,
  1401. _pass: null,
  1402. _passField: null,
  1403. _aliasField: null,
  1404. _initData: function () {
  1405. this._alias = '';
  1406. this._pass = '';
  1407. // if (window.sessionStorage.getItem('alias')) {
  1408. // this._alias = window.sessionStorage.getItem('alias')
  1409. // }
  1410. // if (window.sessionStorage.getItem('tmp')) {
  1411. // this._pass = window.sessionStorage.getItem('tmp')
  1412. // }
  1413. },
  1414. $init: function () {
  1415. this._initData();
  1416. },
  1417. $update: function () {
  1418. this.$components = [
  1419. {
  1420. $type: "div",
  1421. class: "mdc-layout-grid__inner",
  1422. $components: [
  1423. {
  1424. $type: "div",
  1425. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1426. $components: [
  1427. {
  1428. $type: "span",
  1429. class: "mdc-typography--headline5",
  1430. $text: _l.t("login") + ": "
  1431. },
  1432. window._app.widgets.inputTextFieldOutlined({
  1433. "id": 'aliasInput',
  1434. "label": _l.t("login"),
  1435. "value": this._alias,
  1436. "type": "text",
  1437. "init": function () {
  1438. this._aliasField = new mdc.textField.MDCTextField(this);
  1439. }
  1440. }),
  1441. ]
  1442. },
  1443. {
  1444. $type: "div",
  1445. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1446. $components: [
  1447. {
  1448. $type: "span",
  1449. class: "mdc-typography--headline5",
  1450. $text: _l.t("password") + ": "
  1451. },
  1452. window._app.widgets.inputTextFieldOutlined({
  1453. "id": 'passwordInput',
  1454. "label": _l.t("password"),
  1455. "value": this._pass,
  1456. "type": "password",
  1457. "init": function () {
  1458. this._passField = new mdc.textField.MDCTextField(this);
  1459. }
  1460. }),
  1461. ]
  1462. },
  1463. {
  1464. $type: "div",
  1465. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  1466. $components: [
  1467. window._app.widgets.buttonRaised(
  1468. {
  1469. "label": _l.t("sign up"),
  1470. "onclick": function (e) {
  1471. e.preventDefault();
  1472. let alias = this._aliasField.value;
  1473. let pass = this._passField.value
  1474. if (pass.length < 7) {
  1475. new Noty({
  1476. text: "Your passphrase needs to be longer than 7 letters",
  1477. timeout: 2000,
  1478. theme: 'mint',
  1479. layout: 'bottomRight',
  1480. type: 'error'
  1481. }).show();
  1482. } else {
  1483. //
  1484. _LCSDB.user().create(alias, pass,
  1485. function (ack) {
  1486. if (!ack.wait) { }
  1487. if (ack.err) {
  1488. console.log(ack.err)
  1489. return ack.err
  1490. };
  1491. if (ack.pub) {
  1492. let userObj = {
  1493. 'alias': alias,
  1494. 'pub': ack.pub
  1495. };
  1496. _LCSDB.get('users').get(alias).put(userObj);
  1497. }
  1498. _LCSDB.user().auth(alias, pass);
  1499. });
  1500. }
  1501. }
  1502. }),
  1503. _app.widgets.space,
  1504. window._app.widgets.buttonRaised(
  1505. {
  1506. "label": _l.t("sign in"),
  1507. "onclick": function (e) {
  1508. e.preventDefault();
  1509. let alias = this._aliasField.value;
  1510. let pass = this._passField.value
  1511. _app.helpers.authUser(alias, pass);
  1512. // _LCSDB.user().auth.call(_LCSDB, alias, pass
  1513. // // , function(ack) {
  1514. // // if (ack.err) {
  1515. // // new Noty({
  1516. // // text: ack.err,
  1517. // // timeout: 2000,
  1518. // // theme: 'mint',
  1519. // // layout: 'bottomRight',
  1520. // // type: 'error'
  1521. // // }).show();
  1522. // // }
  1523. // //}
  1524. // );
  1525. }
  1526. })
  1527. ]
  1528. }
  1529. ]
  1530. }
  1531. ]
  1532. }
  1533. }
  1534. return loginGUI
  1535. }
  1536. }
  1537. export { Widgets }