lägg till förkortning autostäd och ingen autocomplete
This commit is contained in:
parent
956cdaad38
commit
b23f0e299a
@ -42,9 +42,9 @@
|
||||
*/
|
||||
const sf = {
|
||||
listid: abbForm.target.value,
|
||||
shortform: abbForm.shortform,
|
||||
phrase: abbForm.phrase,
|
||||
used: new Date(0),
|
||||
shortform: abbForm.shortform.replace(/\s/g,"").toLowerCase(),
|
||||
phrase: abbForm.phrase.trim(),
|
||||
last_used: new Date(0),
|
||||
uses: 0,
|
||||
remind: 0,
|
||||
updated: Date.now(),
|
||||
@ -99,7 +99,7 @@
|
||||
<Card.Description></Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content class="mx-auto">
|
||||
<form class="grid gap-4 py-4" method="post" enctype="multipart/form-data" on:submit={handleCreate}>
|
||||
<form class="grid gap-4 py-4" method="post" enctype="multipart/form-data" on:submit={handleCreate} autocomplete="off">
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<Label>Förkortning</Label>
|
||||
<Input id="shortformEl" bind:value={abbForm.shortform} focus placeholder="" class="w-[290px]" />
|
||||
|
@ -110,6 +110,7 @@
|
||||
on:keyup={change}
|
||||
on:beforeinput={input}
|
||||
bind:value={appState.text}
|
||||
spellcheck="false"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
|
@ -35,7 +35,7 @@ export class SkrivertDB extends Dexie {
|
||||
super("skrivertdb");
|
||||
this.version(1).stores({
|
||||
syncInfo: "key, last_sync",
|
||||
shortforms: "++id, [listid+shortform], phrase, last_use, uses, remind, updated",
|
||||
shortforms: "++id, [listid+shortform], phrase, used, uses, remind, updated",
|
||||
lists: "++id, name, type, updated",
|
||||
});
|
||||
this.on("ready", async (db) => {
|
||||
|
@ -59,7 +59,7 @@ export function expandShortform(
|
||||
const shortform = ShortForm.toLowerCase();
|
||||
if (cache.has(shortform)) {
|
||||
const cachedShortform = cache.get(shortform);
|
||||
cachedShortform.last = u;
|
||||
cachedShortform.used = u;
|
||||
cache.set(shortform, cachedShortform);
|
||||
|
||||
if (shortform.match(/(\d+)/) || ShortForm === shortform) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user