feat: clear btn in web
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
<button id="token2">Token btn 2</button>
|
||||
<button id="colorChangeBtnRed">Color btn Red</button>
|
||||
<button id="colorChangeBtnBlue">Color btn Blue</button>
|
||||
<button id="clearBtn">Clear</button>
|
||||
<section class="contents">
|
||||
<article>
|
||||
<div id="flutter_target"></div>
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
var numColor = parseInt(hexColor, 16);
|
||||
appState.changeColor(numColor, false);
|
||||
});
|
||||
let clearBtn = document.getElementById('clearBtn');
|
||||
clearBtn.addEventListener('click', function () {
|
||||
localStorage.clear();
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
function onError() {
|
||||
console.error('aboba');
|
||||
|
||||
Reference in New Issue
Block a user