Kaydet (Commit) d917a403 authored tarafından Tuğba Fıçıcı's avatar Tuğba Fıçıcı

Ayarlar güncellendi.

üst eb025a93
{"user_name":"Haydut","score_list":[],"zorluk_setting":"Orta"}
\ No newline at end of file
......@@ -141,6 +141,7 @@
class="form-control"
type="text"
placeholder="Kullanıcı Adı"
id="kullaniciadi"
/>
</div>
</div>
......@@ -156,6 +157,7 @@
id="customRadioInline1"
name="customRadioInline1"
class="custom-control-input"
value="Kolay"
checked
/>
<label
......@@ -171,6 +173,7 @@
id="customRadioInline2"
name="customRadioInline1"
class="custom-control-input"
value="Orta"
/>
<label
class="custom-control-label yellow"
......@@ -185,6 +188,7 @@
id="customRadioInline3"
name="customRadioInline1"
class="custom-control-input"
value="Zor"
/>
<label
class="custom-control-label yellow"
......@@ -192,6 +196,21 @@
>Zor</label
>
</div>
<br />
<div class="custom-control custom-radio custom-control-inline">
<input
type="radio"
id="customRadioInline4"
name="customRadioInline1"
class="custom-control-input"
value="Cengaver"
/>
<label
class="custom-control-label yellow"
for="customRadioInline4"
>Cengaver</label
>
</div>
</div>
</div>
<div class="row" style="margin-top: 10px">
......@@ -204,12 +223,26 @@
</div>
</div>
</body>
<script src="settings.js"></script>
<script>
const remote = require("electron").remote;
var atananisim=getUsername();
document.getElementById("kullaniciadi").value=atananisim;
document.getElementById("save").addEventListener("click", function (e) {
var window = remote.getCurrentWindow();
window.close();
var name=document.getElementById("kullaniciadi").value;
var radios = document.getElementsByName('customRadioInline1');
var secilen;
for (var i = 0, length = radios.length; i < length; i++) {
if (radios[i].checked) {
secilen=radios[i].value;
break;
}
}
console.log(secilen)
updateSetting(name,secilen);
//var window = remote.getCurrentWindow();
//window.close();
});
</script>
</html>
......@@ -127,3 +127,9 @@ function getSortScoreList(){
}
function updateSetting(isim,zorluk){
var data=readData();
data.user_name=isim;
data.zorluk_setting=zorluk;
writeData(data);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment