mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-07 00:34:41 +00:00
frontend: add functions to remove searches and theme
This commit is contained in:
parent
3fdf67c860
commit
21da78f0f2
1 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
|
function deleteAllSettings() {
|
||||||
|
localStorage.removeItem("mode");
|
||||||
|
localStorage.removeItem("theme");
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteSearchHistory() {
|
||||||
|
localStorage.removeItem("searches");
|
||||||
|
}
|
||||||
|
|
||||||
export default function Settings() {
|
export default function Settings() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -7,21 +18,21 @@ export default function Settings() {
|
||||||
>
|
>
|
||||||
<h5>Настройки</h5>
|
<h5>Настройки</h5>
|
||||||
<nav className="wrap">
|
<nav className="wrap">
|
||||||
<div class="max">
|
<div className="max">
|
||||||
<h6 className="small">сохранение в истории просмотров</h6>
|
<h6 className="small">сохранение в истории просмотров</h6>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label className="switch">
|
||||||
<input type="checkbox" />
|
<input type="checkbox" />
|
||||||
<span></span>
|
<span></span>
|
||||||
</label>
|
</label>
|
||||||
</nav>
|
</nav>
|
||||||
<li className="small-divider"></li>
|
<li className="small-divider"></li>
|
||||||
<nav className="wrap small-space">
|
<nav className="wrap small-space">
|
||||||
<button className="red">
|
<button className="red" onClick={() => deleteAllSettings()}>
|
||||||
<i>delete_forever</i>
|
<i>delete_forever</i>
|
||||||
<span>Удалить все настройки</span>
|
<span>Удалить все настройки</span>
|
||||||
</button>
|
</button>
|
||||||
<button className="red">
|
<button className="red" onClick={() => deleteSearchHistory()}>
|
||||||
<i>delete_history</i>
|
<i>delete_history</i>
|
||||||
<span>Удалить историю поиска</span>
|
<span>Удалить историю поиска</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue