upgrade.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!--
  2. ONLY FOR MAC OS:
  3. When the user's device's os version is unfit for the requirements (macOS Sierra and above),
  4. this page will be loaded by the native client.
  5. -->
  6. <!DOCTYPE html>
  7. <html lang="en-US">
  8. <head>
  9. <meta charset="utf-8" />
  10. <title>Mail Client</title>
  11. <meta charset="utf-8" />
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  13. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
  14. <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  15. <title>zoom email</title>
  16. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
  17. <meta
  18. http-equiv="Content-Security-Policy"
  19. content="default-src 'self'; object-src 'none'; img-src * data: zmdf:; media-src * data: zmdf:; style-src 'self' 'unsafe-eval' 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; child-src * mailto: tel: callto: zoomphonecall: zoomus: data: zmdf:;"
  20. />
  21. <style>
  22. :host {
  23. --zm-background-color: #fff;
  24. --zm-text-color: #131619;
  25. }
  26. @media (prefers-color-scheme: dark) {
  27. body {
  28. --zm-background-color: #232323;
  29. --zm-text-color: #848484;
  30. }
  31. }
  32. body.dark {
  33. --zm-background-color: #232323;
  34. --zm-text-color: #848484;
  35. }
  36. * {
  37. box-sizing: border-box;
  38. -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
  39. -webkit-tap-highlight-color: transparent;
  40. -webkit-touch-callout: none;
  41. }
  42. html,
  43. body {
  44. position: fixed;
  45. width: 100%;
  46. max-width: 100%;
  47. height: 100%;
  48. max-height: 100%;
  49. padding: 0;
  50. margin: 0;
  51. overflow: hidden;
  52. overscroll-behavior-y: none;
  53. word-wrap: break-word;
  54. touch-action: manipulation;
  55. -webkit-user-select: none;
  56. user-select: none;
  57. -moz-osx-font-smoothing: grayscale;
  58. -webkit-font-smoothing: antialiased;
  59. text-rendering: optimizelegibility;
  60. -webkit-user-drag: none;
  61. -ms-content-zooming: none;
  62. -webkit-text-size-adjust: none;
  63. text-size-adjust: none;
  64. }
  65. body {
  66. width: 100vw;
  67. height: 100vh;
  68. font-family: Avenir, Helvetica, Arial, sans-serif;
  69. background-color: var(--zm-background-color);
  70. -webkit-font-smoothing: antialiased;
  71. -moz-osx-font-smoothing: grayscale;
  72. }
  73. .upgrade-tips {
  74. position: absolute;
  75. top: 50%;
  76. left: 50%;
  77. display: flex;
  78. flex-direction: row;
  79. align-items: center;
  80. justify-content: center;
  81. width: 80vw;
  82. margin-top: -80px;
  83. margin-left: -40vw;
  84. font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, sans-serif;
  85. font-size: 16px;
  86. font-weight: 400;
  87. color: var(--zm-text-color);
  88. text-align: center;
  89. }
  90. </style>
  91. </head>
  92. <body>
  93. <div class="upgrade-tips" id="app">
  94. <div class="tips-text">Update the OS version (macOS High Sierra and above) for your device to use Zmail.</div>
  95. </div>
  96. </body>
  97. <script>
  98. const darkMedia = window.matchMedia('(prefers-color-scheme: dark)');
  99. let listenerFuncName = darkMedia.addEventListener ? 'addEventListener' : 'addListener';
  100. if (!darkMedia[listenerFuncName]) {
  101. console.warn('this browser core dose not support mediaQuery listener');
  102. } else {
  103. let currentAppearance;
  104. const AppearanceMode = {
  105. DARK: 'dark',
  106. LIGHT: 'light',
  107. };
  108. const mediaQueryListener = (e) => {
  109. const matchPreferDarkDarkMode = e.matches;
  110. if (matchPreferDarkDarkMode) {
  111. currentAppearance = AppearanceMode.DARK;
  112. document.body.classList.add(currentAppearance);
  113. } else {
  114. currentAppearance = AppearanceMode.LIGHT;
  115. document.body.classList.remove(AppearanceMode.DARK);
  116. }
  117. };
  118. if (listenerFuncName === 'addEventListener') {
  119. darkMedia[listenerFuncName]('change', mediaQueryListener);
  120. } else if (listenerFuncName === 'addListener') {
  121. darkMedia[listenerFuncName](mediaQueryListener);
  122. }
  123. currentAppearance = darkMedia.matches ? AppearanceMode.DARK : AppearanceMode.LIGHT;
  124. currentAppearance === 'dark' && document.body.classList.add(currentAppearance);
  125. }
  126. </script>
  127. </html>