|
1 | 1 | <template> |
2 | | - <header class="bg-base-100 border-b border-base-300 sticky top-0 z-30 overflow-x-hidden"> |
3 | | - <div class="flex items-center justify-between px-6 py-4 max-w-full overflow-x-hidden"> |
| 2 | + <header class="bg-base-100 border-b border-base-300 sticky top-0 z-30"> |
| 3 | + <div class="flex items-center justify-between px-6 py-4 max-w-full"> |
4 | 4 | <!-- Left: Mobile menu toggle + Search + Add Server --> |
5 | 5 | <div class="flex items-center space-x-3 flex-1 min-w-0 overflow-x-hidden"> |
6 | 6 | <!-- Mobile menu toggle --> |
|
71 | 71 | </div> |
72 | 72 |
|
73 | 73 | <!-- MCP Endpoints Dropdown --> |
74 | | - <div v-if="systemStore.listenAddr" class="dropdown dropdown-end"> |
75 | | - <label tabindex="0" class="flex items-center space-x-2 px-3 py-2 bg-base-200 rounded-lg cursor-pointer hover:bg-base-300 transition-colors"> |
| 74 | + <div v-if="systemStore.listenAddr" class="relative"> |
| 75 | + <button |
| 76 | + @click="showEndpoints = !showEndpoints" |
| 77 | + class="flex items-center space-x-2 px-3 py-2 bg-base-200 rounded-lg cursor-pointer hover:bg-base-300 transition-colors" |
| 78 | + > |
76 | 79 | <span class="text-xs font-medium opacity-60">MCP:</span> |
77 | 80 | <code class="text-xs font-mono">{{ systemStore.listenAddr }}</code> |
78 | | - <svg class="w-3 h-3 opacity-60" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 81 | + <svg class="w-3 h-3 opacity-60 transition-transform" :class="{ 'rotate-180': showEndpoints }" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
79 | 82 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> |
80 | 83 | </svg> |
81 | | - </label> |
82 | | - <div tabindex="0" class="dropdown-content z-50 mt-2 p-3 shadow-lg bg-base-100 rounded-box w-96 border border-base-300"> |
| 84 | + </button> |
| 85 | + <div |
| 86 | + v-if="showEndpoints" |
| 87 | + class="absolute right-0 top-full mt-2 p-3 shadow-lg bg-base-100 rounded-box w-96 border border-base-300 z-50" |
| 88 | + > |
83 | 89 | <div class="text-xs font-semibold opacity-60 mb-2 px-1">MCP Endpoints</div> |
84 | 90 | <div class="space-y-1"> |
85 | 91 | <div |
|
109 | 115 | </div> |
110 | 116 | </div> |
111 | 117 | </div> |
| 118 | + <!-- Click-outside overlay --> |
| 119 | + <div v-if="showEndpoints" class="fixed inset-0 z-40" @click="showEndpoints = false" /> |
112 | 120 | </div> |
113 | 121 | </div> |
114 | 122 | </div> |
@@ -151,6 +159,7 @@ const routingModeLabel = computed(() => { |
151 | 159 |
|
152 | 160 | const searchQuery = ref('') |
153 | 161 | const showAddServerModal = ref(false) |
| 162 | +const showEndpoints = ref(false) |
154 | 163 |
|
155 | 164 | interface McpEndpoint { |
156 | 165 | path: string |
|
0 commit comments