Skip to content

Commit

Permalink
auto open error page and different colors
Browse files Browse the repository at this point in the history
  • Loading branch information
frievoe97 committed Mar 22, 2022
1 parent e4b3606 commit 90afde5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/RunFinderPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
button.button(:class="{'is-dark' : state.isDarkMode}" @click="onScan" :title="$t('sync')"): i.fa.fa-sync
button.button(:class="{'is-dark' : state.isDarkMode}" @click="onDarkLight" :title="$t('theme')"): i.fa.fa-adjust
button.button(:class="{'is-dark' : state.isDarkMode}" @click="onLanguage" :title="$t('lang')"): i.fa.fa-globe
button.button(:class="{'is-dark' : state.isDarkMode}" @click="onWarning" :title="$t('lang')"): i.fa.fa-exclamation-triangle
button.button(v-if="state.statusErrors.length" :class="{'is-dark' : state.isDarkMode}" style="background-color: red; color: white; border-color: red" @click="onWarning" :title="$t('lang')"): i.fa.fa-exclamation-triangle
button.button(v-if="!state.statusErrors.length && state.statusWarnings.length" :class="{'is-dark' : state.isDarkMode}" style="background-color: yellow; border-color: yellow" @click="onWarning" :title="$t('lang')"): i.fa.fa-exclamation-triangle
button.button(v-if="!state.statusErrors.length && !state.statusWarnings.length" :class="{'is-dark' : state.isDarkMode}" @click="onWarning" :title="$t('lang')"): i.fa.fa-exclamation-triangle
button.button(:class="{'is-dark' : state.isDarkMode}" style="margin-right: 0" @click="onSplit" :title="$t('split')"): i.fa.fa-columns

p(style="margin: 0.25rem 0.25rem 0.25rem 0.5rem") {{ globalState.runFolderCount ? `Folders scanned: ${globalState.runFolderCount}` : '' }}
Expand Down Expand Up @@ -104,6 +106,14 @@ class MyComponent extends Vue {
this.debounceRunFoldersChanged()
}
@Watch('$store.state.statusErrors') openErrorPage() {
this.showWarnings = true
}
@Watch('$store.state.statusWarnings') openWarningPage() {
this.showWarnings = true
}
@Watch('state.isDarkMode') updateTheme() {
console.log('Hi!', this.$store.state.statusWarnings)
}
Expand Down

0 comments on commit 90afde5

Please sign in to comment.