Skip to content

Commit b393a9e

Browse files
committed
revert previous commit, add pkg.version to the page title
1 parent 1b7a0da commit b393a9e

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

gulp/rollup.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const bundleOpts = {
2424
input: "src/app/main.js",
2525
plugins: [
2626
alias(resolveAliases({
27-
"@utils": "src/utils",
28-
"@data": "data"
27+
"@utils": "src/utils"
2928
})),
3029
resolve(),
3130
commonjs(),

src/app/components/App.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
on:keydown="onkeydown(event)"
44
/>
55
<svelte:head>
6-
<title>Seeboard</title>
6+
<title>Seeboard ({version})</title>
77
</svelte:head>
88
<div class="app">
99
<div class="text">
@@ -26,6 +26,7 @@
2626
<script>
2727
import _ from "lamb";
2828
import WORDS from "../../../data/words.json";
29+
import {version} from "../../../package.json";
2930

3031
const WORDS_AMOUNT_MAX = 3;
3132

@@ -58,6 +59,7 @@
5859

5960
data () {
6061
return {
62+
version,
6163
...makeNewText(),
6264
pressedChars: []
6365
};
@@ -93,6 +95,7 @@
9395
const pressedChars = _.uniques(
9496
_.appendTo(prevPressedKeys, event.key)
9597
);
98+
this.set({pressedChars});
9699

97100
if (_.isIn(pressedChars, targetChar)) {
98101
const newIndex = currentIndex + 1;
@@ -105,15 +108,13 @@
105108
);
106109

107110
this.set({
108-
pressedChars,
109111
letters: newLetters,
110112
currentIndex: newIndex,
111113
targetChar: newLetters[newIndex].char
112114
});
113115
} else {
114116
// press enter to get new text
115117
this.set({
116-
pressedChars,
117118
letters: _.setPathIn(letters, "-1.isDone", true),
118119
targetChar: "Enter"
119120
});

src/app/components/Keyboardio/Keyboard.html

-3
Original file line numberDiff line numberDiff line change
@@ -924,9 +924,6 @@
924924
groups: ({targetKey}) => _.mapValues(keyGroups, _.some(_.is(targetKey)))
925925
},
926926

927-
onstate ({changed, current, previous}) {
928-
console.log('kb', current);
929-
},
930927
helpers: { getChar }
931928
}
932929
</script>

0 commit comments

Comments
 (0)