Skip to content

Commit 2f75de6

Browse files
committed
SimpleChat:ODS:WIP:TMP: Add UI to load previously saved chat
This is a temporary flow
1 parent 73e8ed5 commit 2f75de6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/server/public_simplechat/simplechat.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,15 @@ class SimpleChat {
189189
} else {
190190
if (bClear) {
191191
div.innerHTML = gUsageMsg;
192+
div.innerHTML += `<p class="role-system">Restore</p>`;
193+
let btn = ui.el_create_button(this.ods_key(), (ev)=>{
194+
console.log("DBUG:SimpleChat:SC:Load", this);
195+
this.load();
196+
queueMicrotask(()=>{
197+
this.show(div);
198+
});
199+
});
200+
div.appendChild(btn);
192201
gMe.show_info(div);
193202
}
194203
}

0 commit comments

Comments
 (0)