File tree 3 files changed +5
-8
lines changed
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,7 @@ const bundleOpts = {
24
24
input : "src/app/main.js" ,
25
25
plugins : [
26
26
alias ( resolveAliases ( {
27
- "@utils" : "src/utils" ,
28
- "@data" : "data"
27
+ "@utils" : "src/utils"
29
28
} ) ) ,
30
29
resolve ( ) ,
31
30
commonjs ( ) ,
Original file line number Diff line number Diff line change 3
3
on:keydown ="onkeydown(event) "
4
4
/>
5
5
< svelte:head >
6
- < title > Seeboard</ title >
6
+ < title > Seeboard ({version}) </ title >
7
7
</ svelte:head >
8
8
< div class ="app ">
9
9
< div class ="text ">
26
26
< script >
27
27
import _ from "lamb" ;
28
28
import WORDS from "../../../data/words.json" ;
29
+ import { version } from "../../../package.json" ;
29
30
30
31
const WORDS_AMOUNT_MAX = 3 ;
31
32
58
59
59
60
data ( ) {
60
61
return {
62
+ version,
61
63
...makeNewText ( ) ,
62
64
pressedChars : [ ]
63
65
} ;
93
95
const pressedChars = _ . uniques (
94
96
_ . appendTo ( prevPressedKeys , event . key )
95
97
) ;
98
+ this . set ( { pressedChars} ) ;
96
99
97
100
if ( _ . isIn ( pressedChars , targetChar ) ) {
98
101
const newIndex = currentIndex + 1 ;
105
108
) ;
106
109
107
110
this . set ( {
108
- pressedChars,
109
111
letters : newLetters ,
110
112
currentIndex : newIndex ,
111
113
targetChar : newLetters [ newIndex ] . char
112
114
} ) ;
113
115
} else {
114
116
// press enter to get new text
115
117
this . set ( {
116
- pressedChars,
117
118
letters : _ . setPathIn ( letters , "-1.isDone" , true ) ,
118
119
targetChar : "Enter"
119
120
} ) ;
Original file line number Diff line number Diff line change 924
924
groups : ( { targetKey} ) => _ . mapValues ( keyGroups , _ . some ( _ . is ( targetKey ) ) )
925
925
} ,
926
926
927
- onstate ( { changed, current, previous} ) {
928
- console . log ( 'kb' , current ) ;
929
- } ,
930
927
helpers : { getChar }
931
928
}
932
929
</ script >
You can’t perform that action at this time.
0 commit comments