index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
  6. name="viewport" />
  7. <link rel="shortcut icon" type="image/x-icon" href="resources/favicon.ico">
  8. <link rel="manifest" href="manifest.json">
  9. <link rel="bookmark" type="image/x-icon" href="resources/favicon.ico">
  10. <link rel="apple-touch-icon" href="resources/icon-modern-precomposed.png">
  11. <link rel="apple-touch-icon-precomposed" href="resources/icon-modern-precomposed.png">
  12. <meta name="apple-mobile-web-app-capable" content="yes">
  13. <meta name="mobile-web-app-capable" content="yes">
  14. <style>
  15. .theme-changing * {
  16. transition: all .5s !important
  17. }
  18. .lds-ring div {
  19. box-sizing: border-box;
  20. display: block;
  21. position: absolute;
  22. width: 51px;
  23. height: 51px;
  24. margin: 6px;
  25. border: 6px solid #A57AE6;
  26. border-radius: 50%;
  27. animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  28. border-color: #A57AE6 transparent transparent transparent;
  29. }
  30. @keyframes lds-ring {
  31. 0% {
  32. transform: rotate(0deg);
  33. }
  34. 100% {
  35. transform: rotate(360deg);
  36. }
  37. }
  38. .no-animation,
  39. .no-animation * {
  40. transition: none !important;
  41. }
  42. </style>
  43. <script>
  44. (function () {
  45. if (typeof global === 'undefined') { window.global = window; }
  46. if (!global.process) { global.process = { type: 'renderer', env: {} }; }
  47. const { env } = process;
  48. const params = new URLSearchParams(window.location.search);
  49. for (const [name, value] of params.entries()) env[name] = value;
  50. if (env.HOT_SERVER === '_SELF') env.HOT_SERVER = location.origin;
  51. env.ENTRY = env.ENTRY || 'main';
  52. if (!env.HOT) {
  53. const link = document.createElement('link');
  54. link.rel = 'stylesheet';
  55. link.href = `./dist/${env.ENTRY}.css?v=9.6.0.202601231420`;
  56. link.id = 'theme';
  57. document.getElementsByTagName('head')[0].appendChild(link);
  58. }
  59. }());
  60. </script>
  61. </head>
  62. <body class="no-animation">
  63. <script defer src="assets/emoji-toolkit.js"></script>
  64. <div class="page" id="app-container"></div>
  65. <div class="page flex flex-center flex-middle" id="loading">
  66. <div
  67. style="position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;text-align:center;font-family:'Helvetica Neue',Helvetica,Tahoma,Arial,sans-serif;">
  68. <div>
  69. <div class="lds-ring" style="display:inline-block;position:relative;width:64px;height:64px;">
  70. <div></div>
  71. <div style="animation-delay:-0.45s;"></div>
  72. <div style="animation-delay:-0.3s;"></div>
  73. <div style="animation-delay:-0.15s;"></div>
  74. </div>
  75. <div style="color:#A57AE6;font-size:12px;font-weight:bold;">Loading</div>
  76. </div>
  77. </div>
  78. </div>
  79. <input style="position: fixed!important;bottom: -50px!important;left: 0!important;opacity: 0!important;" type="file"
  80. id="fileOpenButton" />
  81. <script>
  82. (() => {
  83. const script = document.createElement('script');
  84. const { HOT_SERVER, HOT, HTTPS, ENTRY, WIN_NAME } = process.env;
  85. script.src = HOT
  86. ? ((HOT_SERVER || (HOT.length > 5 ? HOT : `http${HTTPS ? 's' : ''}://localhost:3000`)) + `/dist/${ENTRY}.js`)
  87. : `./dist/${ENTRY}.js?v=9.6.0.202601231420`;
  88. document.body.appendChild(script);
  89. document.body.dataset.entry = ENTRY;
  90. function getMainWindow() {
  91. let win = window;
  92. while (win.opener !== null) {
  93. win = win.opener;
  94. }
  95. return win;
  96. }
  97. if (WIN_NAME) {
  98. const id = WIN_NAME.split('__id__')[1];
  99. const win = getMainWindow();
  100. if (ENTRY === 'chathistory') {
  101. Object.defineProperty(window, 'chathistoryAPI', {
  102. get() {
  103. return win.chathistoryAPI;
  104. },
  105. });
  106. } else if (ENTRY === 'gallery') {
  107. Object.defineProperty(window, 'galleryAPI', {
  108. get() {
  109. return win[`galleryAPI_${id}`];
  110. }
  111. })
  112. } else if (ENTRY === 'webview') {
  113. Object.defineProperty(window, 'webviewAPI', {
  114. get() {
  115. return win[`webviewAPI_${id}`];
  116. }
  117. })
  118. } else if (ENTRY === 'texteditor') {
  119. Object.defineProperty(window, 'texteditorAPI', {
  120. get() {
  121. return win[`texteditorAPI_${id}`];
  122. }
  123. })
  124. } else if (ENTRY === 'mindmap') {
  125. Object.defineProperty(window, 'mindmapAPI', {
  126. get() {
  127. return win[`mindmapAPI_${id}`];
  128. }
  129. })
  130. } else if (ENTRY === 'jitsimeet') {
  131. Object.defineProperty(window, 'jitsimeetAPI', {
  132. get() {
  133. return win.jitsimeetAPI;
  134. }
  135. })
  136. } else if (ENTRY === 'mergedmsg') {
  137. Object.defineProperty(window, 'mergedmsgAPI', {
  138. get() {
  139. return win[`mergedmsgAPI_${id}`];
  140. }
  141. })
  142. }
  143. }
  144. })();
  145. </script>
  146. </body>
  147. </html>