|
21 | 21 | rounded
|
22 | 22 | >
|
23 | 23 | <v-list-item
|
24 |
| - v-for="item in items" |
| 24 | + v-for="item in pages" |
25 | 25 | :key="item.title"
|
26 | 26 | link
|
27 | 27 | :input-value="item.value == page_selected"
|
|
47 | 47 | <processes v-if="page_selected == 'process'" />
|
48 | 48 | <system-condition v-if="page_selected == 'system_condition'" />
|
49 | 49 | <network v-if="page_selected == 'network'" />
|
| 50 | + <kernel v-if="page_selected == 'kernel'" /> |
50 | 51 | <about-this-system v-if="page_selected == 'about'" />
|
51 | 52 | </v-col>
|
52 | 53 | </v-row>
|
|
57 | 58 | import Vue from 'vue'
|
58 | 59 |
|
59 | 60 | import AboutThisSystem from '@/components/system-information/AboutThisSystem.vue'
|
| 61 | +import Kernel from '@/components/system-information/Kernel.vue' |
60 | 62 | import Network from '@/components/system-information/Network.vue'
|
61 | 63 | import Processes from '@/components/system-information/Processes.vue'
|
62 | 64 | import SystemCondition from '@/components/system-information/SystemCondition.vue'
|
| 65 | +import settings from '@/libs/settings' |
| 66 | +
|
| 67 | +export interface Item { |
| 68 | + title: string, |
| 69 | + icon: string, |
| 70 | + value: string, |
| 71 | + is_pirate?: boolean, |
| 72 | +} |
63 | 73 |
|
64 | 74 | export default Vue.extend({
|
65 | 75 | name: 'SystemInformationView',
|
66 | 76 | components: {
|
67 | 77 | AboutThisSystem,
|
| 78 | + Kernel, |
68 | 79 | Network,
|
69 | 80 | Processes,
|
70 | 81 | SystemCondition,
|
71 | 82 | },
|
72 | 83 | data() {
|
73 | 84 | return {
|
| 85 | + settings, |
74 | 86 | items: [
|
75 | 87 | { title: 'Processes', icon: 'mdi-view-dashboard', value: 'process' },
|
76 | 88 | { title: 'System Condition', icon: 'mdi-speedometer', value: 'system_condition' },
|
77 | 89 | { title: 'Network', icon: 'mdi-ip-network-outline', value: 'network' },
|
| 90 | + { |
| 91 | + title: 'Kernel', icon: 'mdi-text-subject', value: 'kernel', is_pirate: true, |
| 92 | + }, |
78 | 93 | { title: 'About', icon: 'mdi-information', value: 'about' },
|
79 |
| - ], |
| 94 | + ] as Item[], |
80 | 95 | page_selected: 'process',
|
81 | 96 | }
|
82 | 97 | },
|
| 98 | + computed: { |
| 99 | + pages(): Item[] { |
| 100 | + return this.items |
| 101 | + .filter((item: Item) => item?.is_pirate !== true || this.settings.is_pirate_mode) |
| 102 | + }, |
| 103 | + }, |
83 | 104 | })
|
84 | 105 | </script>
|
0 commit comments