[feat] change with enter

This commit is contained in:
kwaroran
2023-05-26 05:30:13 +09:00
parent c7125a19ec
commit 549cdf3487
4 changed files with 15 additions and 3 deletions

View File

@@ -205,8 +205,10 @@
bind:this={inputEle}
on:keydown={(e) => {
if(e.key.toLocaleLowerCase() === "enter" && (!e.shiftKey)){
send()
e.preventDefault()
if($DataBase.sendWithEnter){
send()
e.preventDefault()
}
}
if(e.key.toLocaleLowerCase() === "m" && (e.ctrlKey)){
reroll()

View File

@@ -20,3 +20,8 @@
<Check bind:check={$DataBase.instantRemove}/>
<span>{language.instantRemove}</span>
</div>
<div class="flex items-center mt-2">
<Check bind:check={$DataBase.sendWithEnter}/>
<span>{language.sendWithEnter}</span>
</div>