mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-05-24 01:22:50 +00:00
fix
This commit is contained in:
@@ -179,10 +179,10 @@
|
||||
</div>
|
||||
|
||||
<div class="sidebar" id="sidebar">
|
||||
<a id="gameModeButton" onclick="startGameMode()">Game Mode</a>
|
||||
<a id="programmingModeButton" onclick="startProgrammingMode()" style="font-weight: normal;">Programming Mode</a>
|
||||
<a href="#" onclick="showSetCurrentChaosContainer()" style="font-weight: normal;">Chaos Container Editor</a>
|
||||
<a href="#" onclick="showSpecialKeys()" style="font-weight: normal;">Controls and options</a>
|
||||
<a id="gameModeButton" onclick="saveK8sConnection(); startGameMode()">Enable Game Mode</a>
|
||||
<a id="programmingModeButton" onclick="saveK8sConnection(); startProgrammingMode()" style="font-weight: normal;">Programming Mode</a>
|
||||
<a href="#" onclick="saveK8sConnection(); showSetCurrentChaosContainer()" style="font-weight: normal;">Chaos Container Editor</a>
|
||||
<a href="#" onclick="saveK8sConnection(); showSpecialKeys()" style="font-weight: normal;">Controls and options</a>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
@@ -191,6 +191,11 @@
|
||||
<span style="color:white" class="toggler-icon" onclick="toggleSidebar()">
|
||||
<i class="fas fa-bars"></i>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-warning alert-dismissible fade show" role="alert" style="margin-top: 20px; margin-bottom: 10px;">
|
||||
Before starting, configure the Kubernetes connection, click <strong>Test Connection</strong>, then <strong>Save Connection</strong>. After that, click <strong>Enable Game Mode</strong> in the sidebar.
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="main-game-div" style="display: block;">
|
||||
|
||||
@@ -107,8 +107,14 @@ function getK8sToken() {
|
||||
}
|
||||
|
||||
function getStoredK8sConnectionConfig() {
|
||||
var endpointInput = document.getElementById('k8s_api_endpoint');
|
||||
var inputEndpoint = endpointInput ? endpointInput.value.trim() : '';
|
||||
var storedEndpoint = (localStorage.getItem('k8s_api_endpoint') || '').trim();
|
||||
var normalizedInputEndpoint = normalizeK8sEndpoint(inputEndpoint);
|
||||
var normalizedStoredEndpoint = normalizeK8sEndpoint(storedEndpoint);
|
||||
|
||||
return {
|
||||
target: (localStorage.getItem('k8s_api_endpoint') || '').trim(),
|
||||
target: normalizedInputEndpoint || normalizedStoredEndpoint || '',
|
||||
token: getK8sToken().trim(),
|
||||
caCert: getK8sCaCert()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user