Skip to content

Commit

Permalink
v0.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
umi committed Sep 3, 2019
1 parent bc26e09 commit d9f2b83
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fc2live-comment",
"version": "0.9.4",
"version": "0.9.5",
"author": "umi",
"description": "Comment viewer for FC2 Live",
"license": "MIT",
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
sliderWidth () {
return this.width - 10
},
ignoreSystemError () {
return this.$store.getters['Config/ignore_system_error']
},
configStyle () {
return {
comment_box: {
Expand Down Expand Up @@ -219,6 +222,14 @@
case '98':
case '99':
default:
if (this.ignoreSystemError === 1) {
this.timer = setTimeout(() => {
if (this.syncStatus === 1) {
this.sync()
}
}, 1000)
return
}
options.title = ''
options.message = 'エラーが発生しました'
options.detail = `システムエラーが発生しました。(${err.message})`
Expand Down
15 changes: 14 additions & 1 deletion src/renderer/components/Config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
<span>Comment Index</span>
</label>
</div>

<div class="check_group">
<label for="ignore_system_error_checkbox">
<input @change="changeIgnoreSystemError" type="checkbox" id="ignore_system_error_checkbox" name="ignore_system_error_checkbox" v-model="check_ignore_system_error">
<span>システムエラーを無視する</span>
</label>
</div>
</div>

<div class="title">
Expand Down Expand Up @@ -139,7 +146,8 @@
radio_style_type: '1',
platform: require('os').platform(),
check_bouyomi: false,
check_display_index: false
check_display_index: false,
check_ignore_system_error: false
}
},
computed: {
Expand Down Expand Up @@ -229,6 +237,9 @@
changeDisplayIndex () {
this.$store.dispatch('Config/setDisplayIndex', this.check_display_index)
},
changeIgnoreSystemError () {
this.$store.dispatch('Config/setIgnoreSystemError', this.check_ignore_system_error)
},
clearData () {
this.$store.dispatch('Config/clear')
this.$store.dispatch('Comment/clear')
Expand All @@ -240,10 +251,12 @@
const style = this.$store.getters['Config/style_type']
const bouyomi = this.$store.getters['Config/bouyomi']
const displayIndex = this.$store.getters['Config/display_index']
const ignoreSystemError = this.$store.getters['Config/ignore_system_error']
this.$refs['theme' + style].checked = true
this.radio_style_type = style
this.check_bouyomi = bouyomi === 1
this.check_display_index = displayIndex === 1
this.check_ignore_system_error = ignoreSystemError === 1
})
}
}
Expand Down
15 changes: 13 additions & 2 deletions src/renderer/store/modules/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const state = {
style_type: nvl(localStorage.getItem('config_style_type'), 1),
bouyomi: ~~nvl(localStorage.getItem('config_bouyomi'), 0),
bouyomi_port: ~~nvl(localStorage.getItem('config_bouyomi_port'), 50001),
display_index: ~~nvl(localStorage.getItem('config_display_index'), 0)
display_index: ~~nvl(localStorage.getItem('config_display_index'), 0),
ignore_system_error: ~~nvl(localStorage.getItem('config_ignore_system_error'), 0)
}

const mutations = {
Expand All @@ -64,6 +65,9 @@ const mutations = {
},
SET_DISPLAY_INDEX (state, type) {
state.display_index = type
},
SET_IGNORE_SYSTEM_ERROR (state, type) {
state.ignore_system_error = type
}
}

Expand Down Expand Up @@ -115,6 +119,11 @@ const actions = {
state.commit('SET_DISPLAY_INDEX', displayIndex)
localStorage.setItem('config_display_index', displayIndex)
},
setIgnoreSystemError (state, type) {
const ignoreSystemError = type ? 1 : 0
state.commit('SET_IGNORE_SYSTEM_ERROR', ignoreSystemError)
localStorage.setItem('config_ignore_system_error', ignoreSystemError)
},
clear (state) {
state.commit('SET_CHANNEL', '')
state.commit('SET_TOKEN', '')
Expand All @@ -123,6 +132,7 @@ const actions = {
state.commit('SET_BOUYOMI', 0)
state.commit('SET_BOUYOMI_PORT', 50001)
state.commit('SET_DISPLAY_INDEX', 0)
state.commit('SET_IGNORE_SYSTEM_ERROR', 0)
localStorage.clear()
}
}
Expand All @@ -134,7 +144,8 @@ const getters = {
style_type (state) { return state.style_type },
bouyomi (state) { return state.bouyomi },
bouyomi_port (state) { return state.bouyomi_port },
display_index (state) { return state.display_index }
display_index (state) { return state.display_index },
ignore_system_error (state) { return state.ignore_system_error }
}

export default {
Expand Down

0 comments on commit d9f2b83

Please sign in to comment.