ncounter.git

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

commit
325c5b0
parent
d149e40
author
CheddarCrisp
date
2020-03-04 04:21:43 +0100 CET
Some style changes
Add input mode to number fields
4 files changed,  +10, -10
M src/ncounter/About.svelte
+3, -3
 1@@ -19,7 +19,7 @@ const dispatch = createEventDispatcher();
 2 .about {
 3     background-color: var(--background-primary);
 4     color: var(--text-primary);
 5-    
 6+
 7     position: fixed;
 8     top: 0;
 9     right: 0;
10@@ -56,8 +56,8 @@ h2 {
11 
12 .close {
13     position: absolute;
14-    top: 15px;
15-    right: 15px;
16+    top: 0;
17+    right: 0;
18 }
19 
20 .licenses {
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" bind:value={newCounter.initialValue} /></label>
 6-        <label>Target<input type="number" bind:value={newCounter.max} /></label>
 7+        <label>Initial Value<input type="number" inputmode="decimal" bind:value={newCounter.initialValue} /></label>
 8+        <label>Target<input type="number" 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
+3, -3
 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" bind:value={ dialogValue } use:focus />
 6+            <input class="dialog-value" type="number" 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" bind:value={editingCounter.initialValue} /></label>
15-            <label>Target<input type="number" bind:value={editingCounter.max} /></label>
16+            <label>Initial Value<input type="number" inputmode="decimal" bind:value={editingCounter.initialValue} /></label>
17+            <label>Target<input type="number" 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>
M src/ncounter/site.css
+2, -2
 1@@ -52,8 +52,8 @@ button {
 2     
 3     color: var(--text-primary);
 4 
 5-    width: 36px;
 6-    height: 36px;
 7+    width: 40px;
 8+    height: 40px;
 9 
10     display: flex;
11     align-items: center;