update css

This commit is contained in:
2026-01-16 15:52:00 +01:00
parent 3e1b938e9a
commit d75a0ecdff
3 changed files with 50 additions and 4 deletions

View File

@@ -82,8 +82,11 @@
<template id="settings-template"> <template id="settings-template">
<h2>General settings</h2> <h2>General settings</h2>
<label for="silksong-path-label">Enter Silksong path: </label> <div class="silksong-path-div">
<input type="text" id="silksong-path-input" name="silksong-path-input"> <button class="default-button">Auto Dectect</button> <label for="silksong-path-label">Enter Silksong path: </label>
<input type="text" class="silksong-path-input" id="silksong-path-input" name="silksong-path-input">
<button class="default-button" onclick="autoDetectGamePath()">Auto Dectect</button>
</div>
</template> </template>
<script src="renderer.js"></script> <script src="renderer.js"></script>

View File

@@ -57,5 +57,8 @@ async function autoDetectGamePath() {
const defaultSilksongPath = "C:/Program Files (x86)/Steam/steamapps/common/Hollow Knight Silksong/Hollow Knight Silksong.exe" const defaultSilksongPath = "C:/Program Files (x86)/Steam/steamapps/common/Hollow Knight Silksong/Hollow Knight Silksong.exe"
if (files.fileExists(defaultSilksongPath)) { if (files.fileExists(defaultSilksongPath)) {
await save.saveSilksongPath(defaultSilksongPath) await save.saveSilksongPath(defaultSilksongPath)
if (document.getElementById("silksong-path-input")) {
document.getElementById("silksong-path-input").value = await save.loadSilksongPath()
}
} }
} }

View File

@@ -135,10 +135,50 @@ input[type="range"] {
width: 100%; width: 100%;
} }
.default-button { .silksong-path-div {
display: flex;
align-items: center;
gap: 20px;
}
.silksong-path-input {
flex: 1;
height: 30px;
padding: 0 12px;
background: rgba(0, 0, 0, 0.4);
border: 1px solid #ff6b6b;
border-radius: 4px;
color: #eee;
font-size: 13px;
outline: none;
transition: all 0.2s ease;
}
.silksong-path-input:hover {
background: rgba(0, 0, 0, 0.55);
border-color: rgba(255, 25, 0, 0.3);
}
.silksong-path-input:focus {
background: rgba(0, 0, 0, 0.65);
border-color: rgba(255, 25, 0, 0.3);
box-shadow: 0 0 0 1px rgba(255, 25, 0, 0.2);
}
.default-button {
width: 40px;
height: 40px;
background: rgba(0, 0, 0, 0.4);
border: 1px solid #ff6b6b;
border-radius: 4px;
color: #eee;
cursor: pointer;
text-align: left;
font-size: 10px;
transition: all 0.2s ease;
} }
.default-button:hover { .default-button:hover {
background: rgba(255, 72, 0, 0.2);
border-color: rgba(255, 25, 0, 0.3);
} }