PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.1.4
Plugin Detective – Troubleshooting Conflicts v1.1.4
1.2.35 1.2.33 1.2.32 1.2.31 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2 1.2.1 1.2.10 1.2.12 1.2.13 1.2.14 1.2.16 1.2.19 1.2.20 1.2.22 1.2.23 1.2.24 All 54 releases
plugin-detective / troubleshoot / app / src / components / Test.vue

Test.vue in Plugin Detective – Troubleshooting Conflicts 1.1.4, at troubleshoot/app/src/components/Test.vue

108 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <div class="find-problem">
3 <screen-field v-model="iframeUrl" @load="siteLoaded"></screen-field>
4 <div class="interrogation-status" v-if="!loading">
5 <counter-box
6 :title="translations.interrogation.interrogatingTitle"
7 :loading="loading"
8 :count="interrogatingCount"
9 :avatars="activeCase.suspects_under_interrogation"
10 ></counter-box>
11 <counter-box
12 :title="translations.interrogation.remainingTitle"
13 :loading="loading"
14 :count="remainingCount"
15 :avatars="holdingCell"
16 ></counter-box>
17 <counter-box
18 :title="translations.interrogation.clearedTitle"
19 :loading="loading"
20 :count="clearedCount"
21 :avatars="activeCase.cleared_suspects"
22 ></counter-box>
23 </div>
24 <div class="corner-otto" v-if="!loading">
25 <bubble>
26 <p>{{translations.case.testProblem}}</p>
27 <md-button class="md-raised md-accent" @click.native="sendFixedClue">{{translations.case.yesButton}}</md-button>
28 <md-button class="md-raised md-primary" @click.native="sendBrokenClue">{{translations.case.noButton}}</md-button>
29 </bubble>
30 <img :src="updatedApi.static_url + '/robot-corner.svg'" alt="Otto the Robot">
31 </div>
32 </div>
33 </template>
34
35 <script>
36 import store from '@/store'
37 import Bubble from './Bubble'
38 import ScreenField from './ScreenField'
39 import CounterBox from './CounterBox'
40 import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
41
42 export default {
43 name: 'test',
44 components: { Bubble, ScreenField, CounterBox },
45 store,
46 data () {
47 return {
48 loading: true
49 }
50 },
51 computed: {
52 iframeUrl: {
53 get () {
54 return this.updatedActiveCase.url
55 },
56 set (value) {
57 this.defineCaseUrl(value)
58 }
59 },
60 ...mapState([
61 'api',
62 'activeCase',
63 'router',
64 'translations'
65 ]),
66 ...mapGetters([
67 'clearedCount',
68 'remainingCount',
69 'holdingCell',
70 'interrogatingCount',
71 'updatedApi',
72 'updatedActiveCase'
73 ])
74 },
75 methods: {
76 siteLoaded () {
77 this.loading = false
78 },
79 sendFixedClue () {
80 this.loading = true
81 this.saveClue('fixed')
82 .then(() => {
83 this.checkCaseStage()
84 })
85 },
86 sendBrokenClue () {
87 this.loading = true
88 this.saveClue('broken')
89 .then(() => {
90 this.checkCaseStage()
91 })
92 },
93 checkCaseStage () {
94 if (this.activeCase.stage === 'investigating') {
95 this.router.push('/interrogating')
96 } else {
97 this.router.push('/investigation-complete')
98 }
99 },
100 ...mapActions([
101 'saveClue'
102 ]),
103 ...mapMutations([
104 'defineCaseUrl'
105 ])
106 }
107 }
108 </script>