Skip to content

Commit

Permalink
rm voice
Browse files Browse the repository at this point in the history
  • Loading branch information
kei committed Dec 4, 2017
1 parent 2f38a5d commit 8f5b42a
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 31 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ A minimal Chrome / Firefox extension to help you learn Japanese words in each ne
- `1.2.0` Added font size setting
- `1.2.1` Supported Firefox
- `1.3.0`
- Add「日」/「夕」/「月」themes
- Change `likes` to `hides` ( hiddens words will not appear anymore)
- Add voice ( click hinagana )
- Fix words data manually...
+ Add「日」/「夕」/「月」themes
+ Change `likes` to `hides` ( hiddens words will not appear anymore)
+ Fix words data manually...
- `1.3.1`
+ Fixed Firefox safety issue
+ Voice feature is not ready now (looking for a text2voice service)

## TODO

- [x] Add voice
- [x] Night Mode
- [ ] Look for a new words data
- [ ] Add voice
- [ ] Add statistics
- [ ] Add ON/OFF switch button
- [ ] Mobile WPA word cards

Expand Down
23 changes: 13 additions & 10 deletions source/src/components/Book.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</h3>
<span class='level'>N{{ item.level }}</span>
<p class='spelling'>
<span class='hiragana' @click='playVoice(item.word)'>{{ item.hiragana || item.word }}</span>
<!-- <span class='hiragana' @click='playVoice(item.word)'>{{ item.hiragana || item.word }}</span> -->
<span class='hiragana'>{{ item.hiragana || item.word }}</span>
<span class='romaji' :class='{ show: showRomaji }'>{{ item.romaji }}</span>
</p>
<p class='meaning'>{{ item.meaning }}</p>
Expand All @@ -22,14 +23,14 @@
</transition>
</main>
<Settings />
<Voice :word='wordToPlay' ref='voiceRef'/>
<!-- <Voice :word='wordToPlay' ref='voiceRef'/> -->
</div>
</template>

<script>
import bus from '@/utils/bus'
import Settings from '@/components/Settings'
import Voice from '@/components/Voice'
// import Voice from '@/components/Voice'
export default {
data () {
Expand All @@ -39,8 +40,9 @@ export default {
}
},
components: {
Settings,
Voice
Settings
// ,
// Voice
},
computed: {
showRomaji () {
Expand All @@ -52,7 +54,7 @@ export default {
hiddenCards = hides.map(item => {
return hiddenCards.filter(card => item === card.uuid)[0]
})
return hiddenCards
return hiddenCards.reserve()
}
},
methods: {
Expand All @@ -61,11 +63,12 @@ export default {
},
unhide (item) {
bus.unhide(item)
},
playVoice (word) {
this.wordToPlay = word
this.$refs.voiceRef.play()
}
// ,
// playVoice (word) {
// this.wordToPlay = word
// this.$refs.voiceRef.play()
// }
}
}
</script>
Expand Down
29 changes: 16 additions & 13 deletions source/src/components/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,33 @@
<div class='card'>
<div class='meta'>
<p class='romaji' :class='{ show: showRomaji }'>{{card.romaji || '&nbsp;'}}</p>
<p class='hiragana' @click='playVoice'>{{card.hiragana || card.word}}</p>
<!-- <p class='hiragana' @click='playVoice'>{{card.hiragana || card.word}}</p> -->
<p class='hiragana'>{{card.hiragana || card.word}}</p>
</div>
<h1 class='word'>
<a :href='searchUrl' target='_blank'>{{card.word}}</a>
</h1>
<p class='meaning'>{{card.meaning}}</p>
<span class='level'>N{{card.level}}</span>
<Voice :word='card.word' ref='voiceRef' />
<!-- <Voice :word='card.word' ref='voiceRef' /> -->
</div>
</template>

<script>
import bus from '@/utils/bus'
import Voice from '@/components/Voice'
// import Voice from '@/components/Voice'
export default {
data () {
return {
store: bus.store,
voice: ''
store: bus.store
// ,
// voice: ''
}
},
components: {
Voice
},
// components: {
// Voice
// },
computed: {
showRomaji () {
return bus.store.settings.showRomaji
Expand All @@ -37,12 +39,13 @@ export default {
searchUrl () {
return `http://jisho.org/search/${this.store.card.word}`
}
},
methods: {
playVoice () {
this.$refs.voiceRef.play()
}
}
// ,
// methods: {
// playVoice () {
// this.$refs.voiceRef.play()
// }
// }
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion the-tab-of-words/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><title>言葉 の Tab</title><link href=./static/css/app.1fb4427988b8a951c1764826ad83620a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.dcf39a851056d92c6297.js></script><script type=text/javascript src=./static/js/vendor.998f82f908877539ae00.js></script><script type=text/javascript src=./static/js/app.0ad54c2519dd87a295e5.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><title>言葉 の Tab</title><link href=./static/css/app.cf4808053fc7ed41f88df81aad91d12c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.400f36b2ebff2dbdc2ab.js></script><script type=text/javascript src=./static/js/vendor.998f82f908877539ae00.js></script><script type=text/javascript src=./static/js/app.c48d9d89609f733de20c.js></script></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f5b42a

Please sign in to comment.