forked from React-Group/interstellar_ai
start chatHistory
This commit is contained in:
parent
a60cc7e941
commit
76da6aed0e
8 changed files with 89 additions and 38 deletions
|
@ -11,7 +11,7 @@ import PrivacySettings from './PrivacySettings';
|
|||
import FontSizeSetting from './FontSize';
|
||||
import OpenSourceModeToggle from './OpenSourceToggle';
|
||||
import {
|
||||
changeData,
|
||||
changeSettings,
|
||||
createAccount,
|
||||
deleteAccount,
|
||||
} from '../../backend/database';
|
||||
|
@ -351,7 +351,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
}
|
||||
|
||||
if (await createAccount(useName, useEmail, usePassword)) {
|
||||
if (await changeData(useName, usePassword, settings)) {
|
||||
if (await changeSettings(useName, usePassword, settings)) {
|
||||
localStorage.setItem("currentName", useName)
|
||||
localStorage.setItem("currentPassword", usePassword)
|
||||
localStorage.setItem("currentEmail", useEmail)
|
||||
|
@ -729,7 +729,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
|
|||
<button className="apply" onClick={async () => {
|
||||
getAllLocalStorageItems();
|
||||
closeSettings();
|
||||
await changeData(localStorage.getItem('accountName') ?? "hello", localStorage.getItem('accountPassword') ?? "hello", settings) // ????
|
||||
await changeSettings(localStorage.getItem('accountName') ?? "hello", localStorage.getItem('accountPassword') ?? "hello", settings) // ????
|
||||
window.location.reload();
|
||||
}}>
|
||||
Apply
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue