Skip to content

Commit 0949c1b

Browse files
fix(frontend): add Login option to server detail page Actions dropdown
Use unified health.action to show Login button consistently with ServerCard.vue, replacing the narrow needsOAuth check that only matched errors containing 'authorization'.
1 parent dc84c1f commit 0949c1b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

frontend/src/views/ServerDetail.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@
8080
{{ isHttpProtocol ? 'Reconnect' : 'Restart' }}
8181
</button>
8282
</li>
83-
<li v-if="needsOAuth">
83+
<li v-if="healthAction === 'login'">
8484
<button @click="triggerOAuth" :disabled="actionLoading">
8585
<span v-if="actionLoading" class="loading loading-spinner loading-xs"></span>
86-
OAuth Login
86+
Login
8787
</button>
8888
</li>
8989
<li v-if="server.enabled && server.connected">
@@ -478,6 +478,11 @@ const needsOAuth = computed(() => {
478478
server.value.last_error?.includes('authorization')
479479
})
480480
481+
// Suggested action from unified health status
482+
const healthAction = computed(() => {
483+
return server.value?.health?.action || ''
484+
})
485+
481486
const filteredTools = computed(() => {
482487
if (!toolSearch.value) return serverTools.value
483488

0 commit comments

Comments
 (0)