ncounter.git

git clone https://git.crispbyte.dev/ncounter.git

commit
e42f365
parent
325c5b0
author
CheddarCrisp
date
2020-03-04 04:32:20 +0100 CET
Make another attempt to get correct keyboard
2 files changed,  +6, -6
M src/ncounter/App.svelte
+2, -2
 1@@ -13,8 +13,8 @@
 2 <div class="dialog">
 3     <div class="dialog-content">
 4         <label>Name<input type="text" bind:value={newCounter.title} use:focus/></label>
 5-        <label>Initial Value<input type="number" inputmode="decimal" bind:value={newCounter.initialValue} /></label>
 6-        <label>Target<input type="number" inputmode="decimal" bind:value={newCounter.max} /></label>
 7+        <label>Initial Value<input type="text" inputmode="decimal" bind:value={newCounter.initialValue} /></label>
 8+        <label>Target<input type="text" inputmode="decimal" bind:value={newCounter.max} /></label>
 9         <label>Save history<input type="checkbox" bind:checked={newCounter.saveHistory} /></label>
10         <button on:click={ () => { showAddDialog = false; } }>Cancel</button>
11         <button class="ok" on:click={ add }>OK</button>
M src/ncounter/Counter.svelte
+4, -4
 1@@ -18,7 +18,7 @@
 2     <div class="dialog">
 3         <div class="dialog-content">
 4             <h1>{ showIncrement ? "Add" : "Set" }</h1>
 5-            <input class="dialog-value" type="number" inputmode="decimal" bind:value={ dialogValue } use:focus />
 6+            <input class="dialog-value" type="text" inputmode="decimal" bind:value={ dialogValue } use:focus />
 7             <button on:click={ dialogCancel }>Cancel</button>
 8             <button class="ok" on:click={ dialogDone }>OK</button>
 9         </div>
10@@ -28,8 +28,8 @@
11     <div class="dialog">
12         <div class="dialog-content">
13             <label>Name<input type="text" bind:value={editingCounter.title} use:focus/></label>
14-            <label>Initial Value<input type="number" inputmode="decimal" bind:value={editingCounter.initialValue} /></label>
15-            <label>Target<input type="number" inputmode="decimal" bind:value={editingCounter.max} /></label>
16+            <label>Initial Value<input type="text" inputmode="decimal" bind:value={editingCounter.initialValue} /></label>
17+            <label>Target<input type="text" inputmode="decimal" bind:value={editingCounter.max} /></label>
18             <label>Save history<input type="checkbox" bind:checked={editingCounter.saveHistory} /></label>
19             <button on:click={ () => { showEditDialog = false; } }>Cancel</button>
20             <button class="ok" on:click={ finishEdit }>OK</button>
21@@ -50,7 +50,7 @@ export let counterId;
22 
23 $: counter = $counters.find(x => x.id == counterId);
24 
25-let dialogValue;
26+let dialogValue = null;
27 let showIncrement;
28 let showSet;
29 let showEditDialog;