index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <!--
  5. If you are serving your web app in a path other than the root, change the
  6. href value below to reflect the base path you are serving from.
  7. The path provided below has to start and end with a slash "/" in order for
  8. it to work correctly.
  9. For more details:
  10. * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
  11. This is a placeholder for base href that will be replaced by the value of
  12. the `--base-href` argument provided to `flutter build`.
  13. -->
  14. <base href="/webclient2/" />
  15. <meta charset="UTF-8" />
  16. <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
  17. <meta name="description" content="Remote Desktop." />
  18. <!-- iOS meta tags & icons -->
  19. <meta name="apple-mobile-web-app-capable" content="yes" />
  20. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  21. <meta name="apple-mobile-web-app-title" content="RustDesk" />
  22. <link rel="apple-touch-icon" href="icons/Icon-192.png?v=1a7ad736" />
  23. <!-- Favicon -->
  24. <link rel="icon" type="image/svg+xml" href="favicon.svg?v=8fcccd9a" />
  25. <title>RustDesk</title>
  26. <link rel="manifest" href="manifest.json" />
  27. <script type="module" crossorigin src="js/dist/index.js?v=22564f40"></script>
  28. <link rel="modulepreload" href="js/dist/vendor.js?v=0b990c6e" />
  29. <style>
  30. html,
  31. body,
  32. #root {
  33. height: 100%;
  34. margin: 0;
  35. padding: 0;
  36. }
  37. #root {
  38. background-repeat: no-repeat;
  39. background-size: 100% auto;
  40. }
  41. .loading-title {
  42. font-size: 1.1rem;
  43. }
  44. .loading-sub-title {
  45. margin-top: 20px;
  46. font-size: 1rem;
  47. color: #888;
  48. }
  49. .page-loading-warp {
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. padding: 26px;
  54. }
  55. .ant-spin {
  56. position: absolute;
  57. display: none;
  58. -webkit-box-sizing: border-box;
  59. box-sizing: border-box;
  60. margin: 0;
  61. padding: 0;
  62. color: rgba(0, 0, 0, 0.65);
  63. color: #1890ff;
  64. font-size: 14px;
  65. font-variant: tabular-nums;
  66. line-height: 1.5;
  67. text-align: center;
  68. list-style: none;
  69. opacity: 0;
  70. -webkit-transition: -webkit-transform 0.3s
  71. cubic-bezier(0.78, 0.14, 0.15, 0.86);
  72. transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
  73. transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
  74. transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
  75. -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
  76. -webkit-font-feature-settings: "tnum";
  77. font-feature-settings: "tnum";
  78. }
  79. .ant-spin-spinning {
  80. position: static;
  81. display: inline-block;
  82. opacity: 1;
  83. }
  84. .ant-spin-dot {
  85. position: relative;
  86. display: inline-block;
  87. width: 20px;
  88. height: 20px;
  89. font-size: 20px;
  90. }
  91. .ant-spin-dot-item {
  92. position: absolute;
  93. display: block;
  94. width: 9px;
  95. height: 9px;
  96. background-color: #1890ff;
  97. border-radius: 100%;
  98. -webkit-transform: scale(0.75);
  99. -ms-transform: scale(0.75);
  100. transform: scale(0.75);
  101. -webkit-transform-origin: 50% 50%;
  102. -ms-transform-origin: 50% 50%;
  103. transform-origin: 50% 50%;
  104. opacity: 0.3;
  105. -webkit-animation: antspinmove 1s infinite linear alternate;
  106. animation: antSpinMove 1s infinite linear alternate;
  107. }
  108. .ant-spin-dot-item:nth-child(1) {
  109. top: 0;
  110. left: 0;
  111. }
  112. .ant-spin-dot-item:nth-child(2) {
  113. top: 0;
  114. right: 0;
  115. -webkit-animation-delay: 0.4s;
  116. animation-delay: 0.4s;
  117. }
  118. .ant-spin-dot-item:nth-child(3) {
  119. right: 0;
  120. bottom: 0;
  121. -webkit-animation-delay: 0.8s;
  122. animation-delay: 0.8s;
  123. }
  124. .ant-spin-dot-item:nth-child(4) {
  125. bottom: 0;
  126. left: 0;
  127. -webkit-animation-delay: 1.2s;
  128. animation-delay: 1.2s;
  129. }
  130. .ant-spin-dot-spin {
  131. -webkit-transform: rotate(45deg);
  132. -ms-transform: rotate(45deg);
  133. transform: rotate(45deg);
  134. -webkit-animation: antrotate 1.2s infinite linear;
  135. animation: antRotate 1.2s infinite linear;
  136. }
  137. .ant-spin-lg .ant-spin-dot {
  138. width: 32px;
  139. height: 32px;
  140. font-size: 32px;
  141. }
  142. .ant-spin-lg .ant-spin-dot i {
  143. width: 14px;
  144. height: 14px;
  145. }
  146. @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  147. .ant-spin-blur {
  148. background: #fff;
  149. opacity: 0.5;
  150. }
  151. }
  152. @-webkit-keyframes antSpinMove {
  153. to {
  154. opacity: 1;
  155. }
  156. }
  157. @keyframes antSpinMove {
  158. to {
  159. opacity: 1;
  160. }
  161. }
  162. @-webkit-keyframes antRotate {
  163. to {
  164. -webkit-transform: rotate(405deg);
  165. transform: rotate(405deg);
  166. }
  167. }
  168. @keyframes antRotate {
  169. to {
  170. -webkit-transform: rotate(405deg);
  171. transform: rotate(405deg);
  172. }
  173. }
  174. </style>
  175. </head>
  176. <body>
  177. <div id="root">
  178. <div
  179. id="div-background"
  180. style="
  181. display: flex;
  182. flex-direction: column;
  183. align-items: center;
  184. justify-content: center;
  185. height: 100%;
  186. min-height: 420px;
  187. "
  188. >
  189. <img src="./favicon.svg?v=8fcccd9a" alt="logo" width="256" />
  190. <div class="page-loading-warp">
  191. <div class="ant-spin ant-spin-lg ant-spin-spinning">
  192. <span class="ant-spin-dot ant-spin-dot-spin">
  193. <i class="ant-spin-dot-item"></i>
  194. <i class="ant-spin-dot-item"></i>
  195. <i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i>
  196. </span>
  197. </div>
  198. </div>
  199. <div
  200. style="display: flex; align-items: center; justify-content: center"
  201. >
  202. <img src="./favicon.svg?v=8fcccd9a" width="32" style="margin-right: 8px" />
  203. <span id="span-text">RustDesk Web Client V2 Preview</span>
  204. </div>
  205. </div>
  206. </div>
  207. <!-- This script installs service_worker.js to provide PWA functionality to
  208. application. For more information, see:
  209. https://developers.google.com/web/fundamentals/primers/service-workers -->
  210. <script>
  211. const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
  212. .matches
  213. ? "dark"
  214. : "light";
  215. const myTheme = localStorage.getItem("wc-option:local:theme");
  216. const them = myTheme || systemTheme;
  217. const divBackground = document.querySelector("#div-background");
  218. if (divBackground) {
  219. divBackground.style.backgroundColor = them === "dark" ? "#000" : "#fff";
  220. }
  221. const spanConsole = document.querySelector("#span-text");
  222. if (spanConsole) {
  223. spanConsole.style.color = them === "dark" ? "#fff" : "#000";
  224. }
  225. const serviceWorkerVersion = "3267265270";
  226. var scriptLoaded = false;
  227. function loadMainDartJs() {
  228. if (scriptLoaded) {
  229. return;
  230. }
  231. scriptLoaded = true;
  232. var scriptTag = document.createElement("script");
  233. scriptTag.src = "main.dart.js?v=6d46937e";
  234. scriptTag.type = "application/javascript";
  235. document.body.append(scriptTag);
  236. }
  237. if ("serviceWorker" in navigator) {
  238. // Service workers are supported. Use them.
  239. window.addEventListener("load", function () {
  240. // Wait for registration to finish before dropping the <script> tag.
  241. // Otherwise, the browser will load the script multiple times,
  242. // potentially different versions.
  243. var serviceWorkerUrl =
  244. "flutter_service_worker.js?v=" + serviceWorkerVersion;
  245. navigator.serviceWorker.register(serviceWorkerUrl).then((reg) => {
  246. function waitForActivation(serviceWorker) {
  247. serviceWorker.addEventListener("statechange", () => {
  248. if (serviceWorker.state == "activated") {
  249. console.log("Installed new service worker.");
  250. loadMainDartJs();
  251. }
  252. });
  253. }
  254. if (!reg.active && (reg.installing || reg.waiting)) {
  255. // No active web worker and we have installed or are installing
  256. // one for the first time. Simply wait for it to activate.
  257. waitForActivation(reg.installing || reg.waiting);
  258. } else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
  259. // When the app updates the serviceWorkerVersion changes, so we
  260. // need to ask the service worker to update.
  261. console.log("New service worker available.");
  262. reg.update();
  263. waitForActivation(reg.installing);
  264. } else {
  265. // Existing service worker is still good.
  266. console.log("Loading app from service worker.");
  267. loadMainDartJs();
  268. }
  269. });
  270. // If service worker doesn't succeed in a reasonable amount of time,
  271. // fallback to plaint <script> tag.
  272. setTimeout(() => {
  273. if (!scriptLoaded) {
  274. console.warn(
  275. "Failed to load app from service worker. Falling back to plain <script> tag."
  276. );
  277. loadMainDartJs();
  278. }
  279. }, 4000);
  280. });
  281. } else {
  282. // Service workers not supported. Just drop the <script> tag.
  283. loadMainDartJs();
  284. }
  285. </script>
  286. <script src="libs/stream/ponyfill.min.js"></script>
  287. <script src="libs/stream/StreamSaver.min.js"></script>
  288. <script src="libs/firebase-app.js?8.10.1"></script>
  289. <script src="libs/firebase-analytics.js?8.10.1"></script>
  290. <script>
  291. // Your web app's Firebase configuration
  292. // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  293. const firebaseConfig = {
  294. apiKey: "AIzaSyCgehIZk1aFP0E7wZtYRRqrfvNiNAF39-A",
  295. authDomain: "rustdesk.firebaseapp.com",
  296. databaseURL: "https://rustdesk.firebaseio.com",
  297. projectId: "rustdesk",
  298. storageBucket: "rustdesk.appspot.com",
  299. messagingSenderId: "768133699366",
  300. appId: "1:768133699366:web:d50faf0792cb208d7993e7",
  301. measurementId: "G-9PEH85N6ZQ",
  302. };
  303. // Initialize Firebase
  304. firebase.initializeApp(firebaseConfig);
  305. firebase.analytics();
  306. </script>
  307. </body>
  308. </html>