Fixed issue that caused the chat to be called "null" if a user submitted an empty prompt. Made the edit button more visible by making it appear when hovering on the whole chat name header element.
This commit is contained in:
parent
313097a019
commit
c6168ef4cb
|
@ -28,7 +28,7 @@ a.is-disabled {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show the edit button on hover of the chat name */
|
/* Show the edit button on hover of the chat name */
|
||||||
.chatname:hover .editbutton {
|
.chat-header:hover .editbutton {
|
||||||
display: inline !important;
|
display: inline !important;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav class="level is-mobile">
|
<nav class="level is-mobile chat-header">
|
||||||
<div class="level-left chatname">
|
<div class="level-left chatname">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<p class="subtitle is-5">
|
<p class="subtitle is-5">
|
||||||
|
@ -114,8 +114,11 @@
|
||||||
href={"#"}
|
href={"#"}
|
||||||
class="greyscale ml-2 is-hidden editbutton"
|
class="greyscale ml-2 is-hidden editbutton"
|
||||||
on:click|preventDefault={() => {
|
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);
|
chatsStorage.set($chatsStorage);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
✏️
|
✏️
|
||||||
|
|
Loading…
Reference in New Issue