RunReconnectBadge.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <script setup>
  2. /**
  3. * v1.1:断线重连状态徽章
  4. * 内嵌在 AgentThinkingPanel 顶部,显示当前是否正在重连。
  5. */
  6. const props = defineProps({
  7. reconnecting: { type: Boolean, default: false },
  8. })
  9. </script>
  10. <template>
  11. <div v-if="reconnecting" class="badge">
  12. <span class="spinner"></span>
  13. <span>正在重连...</span>
  14. </div>
  15. </template>
  16. <style scoped>
  17. /* v1.1:重连徽章,深色风格(黄色警告色) */
  18. .badge {
  19. display: inline-flex;
  20. align-items: center;
  21. gap: 5px;
  22. padding: 2px 8px;
  23. margin: 4px 10px;
  24. background: rgba(251, 191, 36, 0.12);
  25. color: #fbbf24;
  26. border: 1px solid rgba(251, 191, 36, 0.3);
  27. border-radius: 10px;
  28. font-size: 10px;
  29. font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;
  30. }
  31. .spinner {
  32. width: 7px;
  33. height: 7px;
  34. border: 1.5px solid rgba(251, 191, 36, 0.3);
  35. border-top-color: #fbbf24;
  36. border-radius: 50%;
  37. animation: spin 0.8s linear infinite;
  38. }
  39. @keyframes spin {
  40. to { transform: rotate(360deg); }
  41. }
  42. </style>