|
316 | 316 | overflow-y: auto;
|
317 | 317 | }
|
318 | 318 |
|
| 319 | + .toast { |
| 320 | + position: fixed; |
| 321 | + top: 10px; |
| 322 | + right: 10px; |
| 323 | + background-color: #fff; |
| 324 | + color: #333; |
| 325 | + border: 1px solid #ddd; |
| 326 | + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| 327 | + padding: 10px 20px; |
| 328 | + z-index: 1000; |
| 329 | + display: flex; |
| 330 | + align-items: center; |
| 331 | + justify-content: space-between; |
| 332 | + border-radius: 5px; |
| 333 | + animation: slideIn 0.5s ease-out; |
| 334 | + max-width: 300px; |
| 335 | + } |
| 336 | + |
| 337 | + @keyframes slideIn { |
| 338 | + from { |
| 339 | + opacity: 0; |
| 340 | + transform: translateX(100%); |
| 341 | + } |
| 342 | + to { |
| 343 | + opacity: 1; |
| 344 | + transform: translateX(0); |
| 345 | + } |
| 346 | + } |
| 347 | + |
| 348 | + .toast p { |
| 349 | + margin: 0; |
| 350 | + } |
| 351 | + |
| 352 | + .toast button { |
| 353 | + background: none; |
| 354 | + border: none; |
| 355 | + cursor: pointer; |
| 356 | + color: #888; |
| 357 | + } |
| 358 | + |
| 359 | + .toast button:hover { |
| 360 | + color: #333; |
| 361 | + } |
| 362 | + |
319 | 363 | </style>
|
320 | 364 | </head>
|
321 | 365 | <body>
|
@@ -355,14 +399,52 @@ <h3>(适配 oneapi/newapi 等中转格式)</h3>
|
355 | 399 | </div>
|
356 | 400 | <div class="copyright">
|
357 | 401 | <!-- 不要删除 感谢 Rick 和 Megasoft 的贡献-->
|
358 |
| - <p> © 2024 linuxdoer 版权所有<br>贡献者:<a href="https://linux.do/u/rick" target="_blank"><img |
| 402 | + <p> © 2024 linuxdoer 版权所有<br>点点star 自行部署 <a href="https://github.com/QAbot-zh/query-key" target="_blank">github仓库</a> |
| 403 | + <br>贡献者:<a href="https://linux.do/u/rick" target="_blank"><img |
359 | 404 | src="https://linux.do/user_avatar/linux.do/rick/288/137821_2.png" alt="rick">rick </a>和<a
|
360 | 405 | href="https://linux.do/u/zhong_little" target="_blank"><img
|
361 | 406 | src="https://linux.do/user_avatar/linux.do/zhong_little/288/104887_2.png" alt="Megasoft">Megasoft</a></p>
|
362 | 407 | </div>
|
363 | 408 | <div id="results" class="response-container"></div>
|
364 | 409 |
|
365 | 410 | <script>
|
| 411 | + // 显示公告 |
| 412 | + function showToast() { |
| 413 | + const message = ` |
| 414 | + <div> |
| 415 | + <p><strong>API CHECKER v1.3</strong></p> |
| 416 | + <br> |
| 417 | + <div>仓库地址: <a href="https://github.com/QAbot-zh/query-key" target="_blank" style="color: #1e88e5">QAbot-zh/query-key</a></div><div>点点star 可以自行部署</div> |
| 418 | + <br> |
| 419 | + <p><strong>如何使用 :</strong></p> |
| 420 | + <ul> |
| 421 | + <div>📝 在表单中输入你的API URL和APIKey</div> |
| 422 | + <div>🔍 选择名称或输入您想要测试的模型</div> |
| 423 | + <div>🖱️ 测试全在本地进行</div> |
| 424 | + <div>🎉 等待结果并查看详细报告</div> |
| 425 | + <div>🕵️ 使用“官转验证”功能确认API的真实性</div> |
| 426 | + </ul> |
| 427 | + <br> |
| 428 | + <p><strong>版本历史:</strong></p> |
| 429 | + <div><a href="https://linux.do/t/topic/191420" target="_blank" style="color: #1e88e5">v1.3版本介绍</a></div> |
| 430 | + <div><a href="https://linux.do/t/topic/190955" target="_blank" style="color: #1e88e5">v1.2版本介绍</a></div> |
| 431 | + <br> |
| 432 | + <p><strong>Tips:</strong></p> |
| 433 | + <div>GPT系列,才有官转验证,系统判断仅供参考,原理请看 <a href="https://linux.do/t/topic/191420" target="_blank" style="color: #1e88e5">v1.3版本介绍</a></div> |
| 434 | + </div> |
| 435 | + `; |
| 436 | + const toast = document.createElement('div'); |
| 437 | + toast.className = 'toast'; |
| 438 | + toast.innerHTML = `${message} |
| 439 | + <button onclick="this.parentElement.style.display='none';" aria-label="close"> |
| 440 | + <svg aria-hidden="true" viewBox="0 0 14 16" width="14" height="16"> |
| 441 | + <path fill-rule="evenodd" d="M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"></path> |
| 442 | + </svg> |
| 443 | + </button>`; |
| 444 | + document.body.appendChild(toast); |
| 445 | + } |
| 446 | + |
| 447 | + showToast(); |
366 | 448 | // 智能提取API信息
|
367 | 449 | document.getElementById('api_info').addEventListener('input', function () {
|
368 | 450 | let text = this.value;
|
|
0 commit comments