index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <link rel="icon" type="image/svg+xml" href="/logo.svg" />
  7. <!-- 主题色定义 -->
  8. <meta name="theme-color" content="#6a6de6" />
  9. <!-- SEO元标签 -->
  10. <meta
  11. name="description"
  12. content="AI Proxy"
  13. />
  14. <meta
  15. name="keywords"
  16. content="AI, proxy, security, protection"
  17. />
  18. <!-- 社交媒体分享信息 -->
  19. <meta property="og:title" content="AI Proxy" />
  20. <meta property="og:description" content="AI Proxy" />
  21. <meta property="og:image" content="/og-image.png" />
  22. <!-- 添加页面加载样式,避免初始白屏 -->
  23. <style>
  24. /* 基础样式重置 */
  25. body,
  26. html {
  27. margin: 0;
  28. padding: 0;
  29. height: 100%;
  30. width: 100%;
  31. overflow: hidden;
  32. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
  33. Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
  34. "Helvetica Neue", sans-serif;
  35. }
  36. #root {
  37. height: 100%;
  38. width: 100%;
  39. }
  40. /* 加载动画样式 */
  41. .app-loading {
  42. position: fixed;
  43. top: 0;
  44. left: 0;
  45. width: 100%;
  46. height: 100%;
  47. display: flex;
  48. flex-direction: column;
  49. align-items: center;
  50. justify-content: center;
  51. z-index: 9999;
  52. }
  53. /* 使用蓝紫色渐变背景 */
  54. .app-loading-background {
  55. position: absolute;
  56. inset: 0;
  57. background: linear-gradient(
  58. 135deg,
  59. rgba(106, 109, 230, 0.95) 0%,
  60. rgba(123, 127, 246, 0.9) 50%,
  61. rgba(138, 141, 247, 0.95) 100%
  62. );
  63. background-size: 200% 200%;
  64. }
  65. .app-loading-blur-elements {
  66. position: absolute;
  67. inset: 0;
  68. overflow: hidden;
  69. }
  70. .app-loading-blur-1 {
  71. position: absolute;
  72. width: 80%;
  73. height: 80%;
  74. top: 10%;
  75. left: 10%;
  76. background-color: rgba(255, 255, 255, 0.1); /* white/10 */
  77. border-radius: 9999px;
  78. filter: blur(24px);
  79. animation: preload-float 8s ease-in-out infinite;
  80. }
  81. .app-loading-blur-2 {
  82. position: absolute;
  83. width: 40%;
  84. height: 40%;
  85. top: 5%;
  86. right: 15%;
  87. background-color: rgba(255, 255, 255, 0.15); /* 调整为更接近原AI-Proxy文件 */
  88. border-radius: 9999px;
  89. filter: blur(24px);
  90. animation: preload-float-reverse 9s ease-in-out infinite;
  91. }
  92. .app-loading-blur-3 {
  93. position: absolute;
  94. width: 50%;
  95. height: 50%;
  96. bottom: 5%;
  97. left: 15%;
  98. background-color: rgba(255, 255, 255, 0.1); /* 调整为更接近原AI-Proxy文件 */
  99. border-radius: 9999px;
  100. filter: blur(24px);
  101. animation: preload-pulse-glow 4s ease-in-out infinite;
  102. }
  103. /* 进度条容器 */
  104. .app-loading-content {
  105. position: relative;
  106. z-index: 10;
  107. display: flex;
  108. flex-direction: column;
  109. align-items: center;
  110. gap: 32px; /* 保持原间距 */
  111. }
  112. .app-loading-text {
  113. color: white;
  114. font-size: 24px;
  115. font-weight: 500;
  116. animation: preload-fade-in 0.5s ease-out;
  117. }
  118. .app-loading-progress-container {
  119. width: 256px;
  120. height: 8px;
  121. background-color: rgba(255, 255, 255, 0.2);
  122. border-radius: 9999px;
  123. overflow: hidden;
  124. }
  125. .app-loading-progress-bar {
  126. height: 100%;
  127. width: 0%;
  128. border-radius: 9999px;
  129. background: linear-gradient(
  130. 90deg,
  131. rgba(255, 255, 255, 0.9) 0%,
  132. rgba(255, 255, 255, 0.7) 100%
  133. );
  134. box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  135. transition: width 0.3s ease;
  136. }
  137. .app-loading-percentage {
  138. color: rgba(255, 255, 255, 0.8);
  139. font-size: 14px;
  140. animation: preload-pulse 2s infinite;
  141. }
  142. /* 添加粒子效果 */
  143. .app-loading-particle {
  144. position: absolute;
  145. border-radius: 9999px;
  146. background-color: rgba(255, 255, 255, 0.1);
  147. animation: preload-float 15s ease-in-out infinite;
  148. }
  149. /* 定义动画关键帧 */
  150. @keyframes preload-float {
  151. 0%,
  152. 100% {
  153. transform: translateY(0) scale(1);
  154. }
  155. 50% {
  156. transform: translateY(-20px) scale(1.05);
  157. }
  158. }
  159. @keyframes preload-float-reverse {
  160. 0%,
  161. 100% {
  162. transform: translateY(0) scale(1);
  163. }
  164. 50% {
  165. transform: translateY(20px) scale(1.05);
  166. }
  167. }
  168. @keyframes preload-pulse-glow {
  169. 0%,
  170. 100% {
  171. opacity: 0.6;
  172. transform: scale(1);
  173. }
  174. 50% {
  175. opacity: 0.8;
  176. transform: scale(1.1);
  177. }
  178. }
  179. @keyframes preload-pulse {
  180. 0%,
  181. 100% {
  182. opacity: 0.5;
  183. }
  184. 50% {
  185. opacity: 1;
  186. }
  187. }
  188. @keyframes preload-fade-in {
  189. from {
  190. opacity: 0;
  191. transform: translateY(-20px);
  192. }
  193. to {
  194. opacity: 1;
  195. transform: translateY(0);
  196. }
  197. }
  198. /* 隐藏加载动画,当应用加载完成时使用 */
  199. .app-loading-hidden {
  200. opacity: 0;
  201. visibility: hidden;
  202. transition: opacity 0.5s, visibility 0.5s;
  203. }
  204. </style>
  205. <title>AI Proxy</title>
  206. </head>
  207. <body>
  208. <div id="root">
  209. <!-- 应用加载前显示的加载指示器 -->
  210. <div id="app-loading-screen" class="app-loading">
  211. <div class="app-loading-background"></div>
  212. <div class="app-loading-blur-elements">
  213. <div class="app-loading-blur-1"></div>
  214. <div class="app-loading-blur-2"></div>
  215. <div class="app-loading-blur-3"></div>
  216. <!-- 粒子效果 - 动态生成 -->
  217. <script>
  218. // 动态创建25个粒子元素
  219. for (let i = 0; i < 25; i++) {
  220. const particle = document.createElement("div");
  221. particle.className = "app-loading-particle";
  222. const size = Math.random() * 6 + 2;
  223. particle.style.width = `${size}px`;
  224. particle.style.height = `${size}px`;
  225. particle.style.top = `${Math.random() * 100}%`;
  226. particle.style.left = `${Math.random() * 100}%`;
  227. particle.style.animationDelay = `${
  228. Math.random() * 5
  229. }s`;
  230. document.currentScript.parentNode.appendChild(
  231. particle
  232. );
  233. }
  234. </script>
  235. </div>
  236. <div class="app-loading-content">
  237. <div class="app-loading-text">Loading...</div>
  238. <div class="app-loading-progress-container">
  239. <div
  240. class="app-loading-progress-bar"
  241. id="progressBar"
  242. ></div>
  243. </div>
  244. <div class="app-loading-percentage" id="progressText">
  245. 0% Complete
  246. </div>
  247. </div>
  248. </div>
  249. </div>
  250. <script>
  251. // Match the React component's progress calculation logic exactly
  252. (function () {
  253. const progressBar = document.getElementById("progressBar");
  254. const progressText = document.getElementById("progressText");
  255. let progress = 0;
  256. const timer = setInterval(() => {
  257. // Slow down as it approaches 100%
  258. // 使用Math.floor确保结果是整数
  259. const increment = Math.floor(
  260. Math.max(1, 10 * (1 - progress / 100))
  261. );
  262. progress = Math.min(99, progress + increment);
  263. // 确保最终结果也是整数
  264. progress = Math.floor(progress);
  265. // Update the DOM
  266. progressBar.style.width = `${progress}%`;
  267. progressText.textContent = `${progress}% Complete`;
  268. if (progress >= 99) {
  269. clearInterval(timer);
  270. }
  271. }, 200);
  272. })();
  273. </script>
  274. <script type="module" src="/src/main.tsx"></script>
  275. </body>
  276. </html>