SimpleChat:Show chat session restore button, only if saved session
This commit is contained in:
parent
6ef57cc1bf
commit
bc68803605
1 changed files with 3 additions and 0 deletions
|
@ -766,6 +766,9 @@ class Me {
|
||||||
* @param {SimpleChat} chat
|
* @param {SimpleChat} chat
|
||||||
*/
|
*/
|
||||||
setup_load(div, chat) {
|
setup_load(div, chat) {
|
||||||
|
if (!(chat.ods_key() in localStorage)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
div.innerHTML += `<p class="role-system">Restore</p>
|
div.innerHTML += `<p class="role-system">Restore</p>
|
||||||
<p>Load previously saved chat session, if available</p>`;
|
<p>Load previously saved chat session, if available</p>`;
|
||||||
let btn = ui.el_create_button(chat.ods_key(), (ev)=>{
|
let btn = ui.el_create_button(chat.ods_key(), (ev)=>{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue