66 fixed-tabs
77 background-color =" quaternary"
88 >
9- <v-tab :key =" 0 " >
9+ <v-tab :key =" 'macros' " >
1010 <v-icon left >{{ icons.fileCode }}</v-icon >
1111 Macros
1212 </v-tab >
13- <v-tab :key =" 1" >
13+ <v-tab :key =" 'power'" v-if =" gpioPowerPluginEnabled" >
14+ <v-icon left >{{ icons.power }}</v-icon >
15+ Power
16+ </v-tab >
17+ <v-tab :key =" 'syscommands'" >
1418 <v-icon left >{{ icons.tools }}</v-icon >
1519 Sys Commands
1620 </v-tab >
17- <v-tab :key =" 2 " >
21+ <v-tab :key =" 'jobs' " >
1822 <v-icon left >{{ icons.files }}</v-icon >
1923 Jobs
2024 </v-tab >
21- <v-tab :key =" 3 " >
25+ <v-tab :key =" 'console' " >
2226 <v-icon left >{{ icons.console }}</v-icon >
2327 Console
2428 </v-tab >
2529 </v-tabs >
2630 <v-divider ></v-divider >
2731
2832 <v-tabs-items v-model =" activeTab" class =" mb-auto rounded" >
29- <v-tab-item :key =" 0 " class =" tertiary rounded" >
33+ <v-tab-item :key =" 'macros' " class =" tertiary rounded" >
3034 <macros-widget ></macros-widget >
3135 </v-tab-item >
32- <v-tab-item :key =" 1" class =" tertiary rounded" >
36+ <v-tab-item :key =" 'power'" class =" tertiary rounded" v-if =" gpioPowerPluginEnabled" >
37+ <power-control-widget ></power-control-widget >
38+ </v-tab-item >
39+ <v-tab-item :key =" 'syscommands'" class =" tertiary rounded" >
3340 <system-commands-widget ></system-commands-widget >
3441 </v-tab-item >
35- <v-tab-item :key =" 2 " class =" tertiary rounded max-height" >
42+ <v-tab-item :key =" 'jobs' " class =" tertiary rounded max-height" >
3643 <file-system-widget
3744 root =" gcodes"
3845 accept =" .gcode"
3946 :show-title =" false"
4047 :show-meta-data =" false"
4148 ></file-system-widget >
4249 </v-tab-item >
43- <v-tab-item :key =" 3 " class =" tertiary rounded max-height" >
50+ <v-tab-item :key =" 'console' " class =" tertiary rounded max-height" >
4451 <console-widget ></console-widget >
4552 </v-tab-item >
4653 </v-tabs-items >
@@ -55,17 +62,23 @@ import MacrosWidget from '@/components/widgets/MacrosWidget.vue'
5562import FileSystemWidget from ' @/components/widgets/filesystem/FileSystemWidget.vue'
5663import SystemCommandsWidget from ' @/components/widgets/SystemCommandsWidget.vue'
5764import ConsoleWidget from ' @/components/widgets/ConsoleWidget.vue'
65+ import PowerControlWidget from ' @/components/widgets/PowerControlWidget.vue'
5866
5967@Component ({
6068 components: {
6169 MacrosWidget ,
6270 FileSystemWidget ,
6371 SystemCommandsWidget ,
64- ConsoleWidget
72+ ConsoleWidget ,
73+ PowerControlWidget
6574 }
6675})
6776export default class ToolsCard extends Mixins (UtilsMixin ) {
68- activeTab = 0
77+ activeTab = ' macros'
78+
79+ get gpioPowerPluginEnabled () {
80+ return (this .$store .state .socket .plugins .includes (' power' ))
81+ }
6982}
7083 </script >
7184
0 commit comments