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 / Witnesses.vue

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

85 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <div class="witnesses">
3 <loading :text="translations.witnesses.loading" v-if="loading"></loading>
4 <template v-else>
5 <md-toolbar md-elevation="0" class="md-primary">
6 <h1 class="md-title">{{translations.witnesses.title}}</h1>
7 </md-toolbar>
8 <md-content>
9 <p class="md-body-2">{{translations.witnesses.description}}</p>
10 </md-content>
11 <md-list>
12 <md-list-item v-for="plugin in activeCase.all_suspects" :key="plugin.slug">
13 <md-checkbox v-model="required" :value="plugin.plugin_file"/>
14 <plugin-avatar :slug="plugin.plugin_file"></plugin-avatar>
15 <span class="md-list-item-text">
16 {{plugin.Title}}
17 </span>
18 </md-list-item>
19 </md-list>
20 <div class="corner-otto">
21 <bubble>
22 <p>{{translations.witnesses.ottoQuestion}}</p>
23 <md-button class="md-raised md-primary" @click.native="sendRequired">I'm done</md-button>
24 </bubble>
25 <img :src="updatedApi.static_url + '/robot-corner.svg'" alt="Otto the Robot">
26 </div>
27 </template>
28 </div>
29 </template>
30
31 <script>
32 import store from '@/store'
33 import Bubble from './Bubble'
34 import PluginAvatar from './PluginAvatar'
35 import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
36 import Loading from './Loading'
37
38 export default {
39 name: 'witnesses',
40 components: { Bubble, Loading, PluginAvatar },
41 store,
42 data () {
43 return {
44 loading: false
45 }
46 },
47 computed: {
48 required: {
49 get () {
50 return this.activeCase.required_plugins
51 },
52 set (value) {
53 this.defineRequired(value)
54 }
55 },
56 ...mapState([
57 'router',
58 'api',
59 'activeCase',
60 'translations'
61 ]),
62 ...mapGetters([
63 'updatedApi'
64 ])
65 },
66 methods: {
67 sendRequired () {
68 this.loading = true
69 this.updateCase()
70 .then(() => {
71 this.router.push('/interrogating')
72 })
73 .catch((error) => {
74 console.log(error)
75 })
76 },
77 ...mapMutations([
78 'defineRequired'
79 ]),
80 ...mapActions([
81 'updateCase'
82 ])
83 }
84 }
85 </script>