Skip to content

Commit

Permalink
Remember user choices about hiding alerts. Closes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Aug 18, 2020
1 parent 8252525 commit 8a9f6b8
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/views/Game.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@
</b-alert>
<template v-else>
<b-alert
v-if="mostSkippedRulesNotIgnored.length"
v-if="ignoreRuleAlert && mostSkippedRulesNotIgnored.length"
dismissible
@dismissed="ignoreRuleAlert = false"
show
variant="info"
>It looks like you have skipped the same type of suggestions many
times.<br />
If you don't want Wiper to suggest you these kinds of suggestions, you
can ignore them using the top-left menu.</b-alert
>
<b-alert dismissible show variant="light">
<b-alert
v-if="introAlert"
dismissible
@dismissed="introAlert = false"
show
variant="light"
>
Wiper found Wikipedia articles with potential spelling or grammar
issues.<br />
Click on <decision-button decision="fix" read-only /> to fix the issue
Expand All @@ -43,14 +50,15 @@

<script>
import TileList from "@/components/TileList.vue";
import axios from "axios";
import { mapActions, mapGetters, mapState } from "vuex";
import { mapGetters, mapState } from "vuex";
import DecisionButton from "../components/DecisionButton";
export default {
name: "game",
data: () => ({
error: null,
introAlert: true,
ignoreRuleAlert: true,
}),
computed: {
Expand All @@ -72,6 +80,10 @@ export default {
},
methods: {
test() {
console.log("!");
this.ignoreRuleAlert = false;
},
async applyDecision({ decision, reason = null }) {
const vm = this;
await this.$store
Expand All @@ -94,8 +106,6 @@ export default {
},
},
...mapActions("tiles", ["apply-decision", "nextTile"]),
components: {
DecisionButton,
TileList,
Expand Down

0 comments on commit 8a9f6b8

Please sign in to comment.