diff --git a/equipment/equipment.js b/equipment/equipment.js index 23129dc..2ccc386 100644 --- a/equipment/equipment.js +++ b/equipment/equipment.js @@ -4,6 +4,17 @@ fetch("../header.html") const headerContainer = document.getElementById("header-container"); headerContainer.innerHTML = html; +const logoutForm = document.getElementById("logout-form"); +if (logoutForm && typeof CONFIG !== 'undefined') { + const apiBase = CONFIG.API_BASE_URL.replace(/\/$/, ""); + logoutForm.action = apiBase + "/api/v1/spfn/logout"; + + const originInput = document.getElementById("logout_frontend_origin"); + if (originInput) { + originInput.value = window.location.origin; + } +} + const friendButton = headerContainer.querySelector('.menu-item.equipment'); if (friendButton) { friendButton.classList.add('active'); diff --git a/equipment/index.html b/equipment/index.html index f5dd2f3..5d0cd2f 100644 --- a/equipment/index.html +++ b/equipment/index.html @@ -6,6 +6,7 @@ \ +
diff --git a/friend_list/friendlist.js b/friend_list/friendlist.js index cb16550..ee2e671 100644 --- a/friend_list/friendlist.js +++ b/friend_list/friendlist.js @@ -4,6 +4,17 @@ fetch("../header.html") const headerContainer = document.getElementById("header-container"); headerContainer.innerHTML = html; +const logoutForm = document.getElementById("logout-form"); +if (logoutForm && typeof CONFIG !== 'undefined') { + const apiBase = CONFIG.API_BASE_URL.replace(/\/$/, ""); + logoutForm.action = apiBase + "/api/v1/spfn/logout"; + + const originInput = document.getElementById("logout_frontend_origin"); + if (originInput) { + originInput.value = window.location.origin; + } +} + const friendButton = headerContainer.querySelector('.menu-item.friend'); if (friendButton) { friendButton.classList.add('active'); diff --git a/friend_list/index.html b/friend_list/index.html index e2a27bc..d89e397 100644 --- a/friend_list/index.html +++ b/friend_list/index.html @@ -6,6 +6,7 @@ + diff --git a/header.html b/header.html index 42371f1..32606e4 100644 --- a/header.html +++ b/header.html @@ -1,73 +1,79 @@ - - + + +