Settings angepasst

This commit is contained in:
silas
2018-10-01 13:55:14 +02:00
parent 8dbc0dc3f2
commit 9310230a0d
12 changed files with 74 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-11 medium-9 large-7"><div class="row clickable" id=theme-chooser><span class="columns small-6" data-translation=theme></span> <span class="columns small-6 text-right"><div id=theme-name></div></span></div><label class="switch row max-width"><span class="columns small-6" data-translation=sound></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=play-sound name=play-sound value=1 data-default=1> <span class=slider></span></span></label> <label class="switch row max-width"><span class="columns small-6" data-translation=music></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=play-music name=play-music value=1 data-default=1> <span class=slider></span></span></label><div class="row clickable" id=credits-button><span class="columns small-6" data-translation=credits></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row clickable" id=privacy-policy-button><span class="columns small-6" data-translation=privacy-policy></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row clickable" id=impressum-button><span class="columns small-6" data-translation=impressum></span> <span class="columns small-6 text-right" data-translation=">"></span></div><label class="switch row max-width"><span class="columns small-6" data-translation=track></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=track-switch name=matomoShouldTrack value=1 data-default=1 data-raw=1> <span class=slider></span></span></label> <button id=reset-levels class=button data-translation=reset-levels></button></div></div></div>
<div class="max-height fill-me"><div class="row max-width grow flex-center"><div class="columns small-centered small-12 smedium-11 medium-9 large-7"><div class="row setting-row" id=theme-chooser><span class="columns small-6" data-translation=theme></span> <span class="columns small-6 text-right"><div id=theme-name></div></span></div><label class="switch row setting-row"><span class="columns small-6" data-translation=sound></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=play-sound name=play-sound value=1 data-default=1> <span class=slider></span></span></label> <label class="switch row setting-row"><span class="columns small-6" data-translation=music></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=play-music name=play-music value=1 data-default=1> <span class=slider></span></span></label><div class="row setting-row" id=credits-button><span class="columns small-6" data-translation=credits></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=privacy-policy-button><span class="columns small-6" data-translation=privacy-policy></span> <span class="columns small-6 text-right" data-translation=">"></span></div><div class="row setting-row" id=impressum-button><span class="columns small-6" data-translation=impressum></span> <span class="columns small-6 text-right" data-translation=">"></span></div><label class="switch row setting-row"><span class="columns small-6" data-translation=track></span> <span class="columns small-6 text-right"><input type=checkbox class=setting id=track-switch name=matomoShouldTrack value=1 data-default=1 data-raw=1> <span class=slider></span></span></label> <button id=reset-levels class="button hidden" data-translation=reset-levels></button></div></div></div>

View File

@@ -1 +1 @@
<div class="max-height fill-me overflow-y-scroll"><ul class="menu vertical plain dropdown hidden" id=settings-fragment-list></ul><h2 data-translation=settings></h2><div id=settings-fragments></div></div>
<div class="max-height fill-me overflow-y-scroll"><ul class="menu vertical plain dropdown hidden" id=settings-fragment-list></ul><div class=row><div class="columns small-centered small-12 smedium-11 medium-9 large-7"><h2 data-translation=settings></h2></div></div><div id=settings-fragments></div></div>

View File

@@ -6586,6 +6586,10 @@ class WordRotatorSettingFragment extends LocalStorageSettingsFragment {
WordRotatorDb.getInstance().removeAll(WordRotatorDb.OBJECT_STORE.LEVEL);
});
if (location.hostname.includes("beta") || location.hostname.includes("127.0.0.1")){
this.findBy("#reset-levels").classList.remove("hidden");
}
let playMusicButton = this.findBy("#play-music");
playMusicButton.addEventListener("change", () => {
let soundManager = SoundManager.getInstance();