Merge pull request #11 from Michael-Tanzer/chat-rename-bugfix
Chat rename bugfix
This commit is contained in:
commit
41fd652aa0
|
@ -28,7 +28,7 @@ a.is-disabled {
|
|||
}
|
||||
|
||||
/* Show the edit button on hover of the chat name */
|
||||
.chatname:hover .editbutton {
|
||||
.chat-header:hover .editbutton {
|
||||
display: inline !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
},
|
||||
});
|
||||
*/
|
||||
|
||||
const response: Response = await (
|
||||
await fetch("https://api.openai.com/v1/chat/completions", {
|
||||
method: "POST",
|
||||
|
@ -105,7 +106,7 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<nav class="level is-mobile">
|
||||
<nav class="level is-mobile chat-header">
|
||||
<div class="level-left chatname">
|
||||
<div class="level-item">
|
||||
<p class="subtitle is-5">
|
||||
|
@ -114,8 +115,11 @@
|
|||
href={"#"}
|
||||
class="greyscale ml-2 is-hidden editbutton"
|
||||
on:click|preventDefault={() => {
|
||||
chat.name = prompt("Enter a new name for this chat", chat.name);
|
||||
let newChatName = prompt("Enter a new name for this chat", chat.name);
|
||||
if (newChatName) {
|
||||
chat.name = newChatName;
|
||||
chatsStorage.set($chatsStorage);
|
||||
}
|
||||
}}
|
||||
>
|
||||
✏️
|
||||
|
|
Loading…
Reference in New Issue