rename methods

master
David Zálešák 4 years ago
parent d9ffda3088
commit c48313f298

@ -16,7 +16,7 @@
<div class="container"> <div class="container">
<nav> <nav>
<button class="clone">Clone</button> <button class="clone">Clone</button>
<button class="purge">Purge</button> <button class="wipe">Wipe FS</button>
</nav> </nav>
<aside> <aside>
<ul> <ul>

@ -6,13 +6,13 @@ class Controller {
this.redrawDirTree(view); this.redrawDirTree(view);
var cloneBtn = document.getElementsByClassName("clone")[0]; var cloneBtn = document.getElementsByClassName("clone")[0];
var purgeBtn = document.getElementsByClassName("purge")[0]; var purgeBtn = document.getElementsByClassName("wipe")[0];
cloneBtn.addEventListener("click", this.cloneRep.bind(this)); cloneBtn.addEventListener("click", this.cloneRep.bind(this));
purgeBtn.addEventListener("click", this.purgeFS.bind(this)); purgeBtn.addEventListener("click", this.wipeFS.bind(this));
} }
purgeFS() { wipeFS() {
this.model.purgeFS(); this.model.wipeFS();
//window.location.reload(); //window.location.reload();
this.redrawDirTree(this.view); this.redrawDirTree(this.view);
} }

@ -41,7 +41,7 @@ class Model {
return tree; return tree;
} }
purgeFS() { wipeFS() {
delete window.fs; delete window.fs;
window.fs = new LightningFS("fs", { wipe: true }); window.fs = new LightningFS("fs", { wipe: true });
} }