|
40 | 40 | <h3 class="text-xs-left"> {{ $t('message.settings_actions') }} </h3>
|
41 | 41 | <v-card>
|
42 | 42 | <div class="d-flex justify-space-around align-center">
|
43 |
| - <v-btn @click="shutdown" color="info"> |
44 |
| - <v-icon icon="mdi-power"></v-icon> {{ $t('message.settings_actions_off') }} |
| 43 | + <v-btn color="info" @click="dialog_shutdown=true"> |
| 44 | + <v-icon icon="mdi-power"></v-icon> {{ $t('message.settings_actions_halt') }} |
45 | 45 | </v-btn>
|
46 |
| - <v-btn @click="reboot" color="info"> |
| 46 | + <v-btn color="info" @click="dialog_reboot=true"> |
47 | 47 | <v-icon icon="mdi-restart"></v-icon> {{ $t('message.settings_actions_restart') }}
|
48 | 48 | </v-btn>
|
49 |
| - <v-btn @click="restoreSettings" color="warning"> |
| 49 | + <v-btn color="warning" @click="dialog_restore=true"> |
50 | 50 | <v-icon icon="mdi-restore"></v-icon> {{ $t('message.settings_actions_reset') }}
|
51 | 51 | </v-btn>
|
52 |
| - <v-btn slot="activator" color="error" dark @click="dialog_reset = true"> |
| 52 | + <v-btn slot="activator" color="error" dark @click="dialog_reset=true"> |
53 | 53 | <v-icon icon="mdi-store-cog"></v-icon> {{ $t('message.settings_actions_reset_factory') }}
|
54 | 54 | </v-btn>
|
55 |
| - <v-btn slot="activator" color="warning" dark @click="dialog_logs = true"> |
56 |
| - <v-icon icon="mdi-format-list-text"></v-icon> {{ $t('message.settings_actions_show_logs') }} |
57 |
| - </v-btn> |
58 | 55 | <!-- ** Restore button + dialog box** -->
|
59 |
| - <v-dialog v-model="dialog_reset" width="500"> |
| 56 | + <v-dialog v-model="dialog_shutdown" width="500"> |
60 | 57 | <v-card>
|
61 | 58 | <v-card-title class="headline grey lighten-2" primary-title>
|
62 |
| - <h3>CoderBot - {{ $t('message.settings_actions_reset_factory_title') }}</h3> |
| 59 | + <h3>CoderBot - {{ $t('message.settings_actions_halt_title') }}</h3> |
63 | 60 | </v-card-title>
|
64 | 61 | <v-card-text>
|
65 |
| - {{ $t('message.settings_actions_reset_factory_text_1') }} |
| 62 | + {{ $t('message.settings_actions_halt_text_1') }} |
66 | 63 | </v-card-text>
|
67 | 64 | <v-divider></v-divider>
|
68 | 65 | <v-card-actions>
|
69 | 66 | <v-spacer></v-spacer>
|
70 |
| - <v-btn color="primary" @click="dialog_reset = false"> |
| 67 | + <v-btn color="primary" @click="dialog_shutdown=false"> |
| 68 | + {{ $t('message.cancel') }} |
| 69 | + </v-btn> |
| 70 | + <v-btn color="error" @click="reboot"> |
| 71 | + <b>{{ $t('message.settings_actions_halt') }}</b> |
| 72 | + </v-btn> |
| 73 | + </v-card-actions> |
| 74 | + </v-card> |
| 75 | + </v-dialog> |
| 76 | + <v-dialog v-model="dialog_reboot" width="500"> |
| 77 | + <v-card> |
| 78 | + <v-card-title class="headline grey lighten-2" primary-title> |
| 79 | + <h3>CoderBot - {{ $t('message.settings_actions_reboot_title') }}</h3> |
| 80 | + </v-card-title> |
| 81 | + <v-card-text> |
| 82 | + {{ $t('message.settings_actions_reboot_text_1') }} |
| 83 | + </v-card-text> |
| 84 | + <v-divider></v-divider> |
| 85 | + <v-card-actions> |
| 86 | + <v-spacer></v-spacer> |
| 87 | + <v-btn color="primary" @click="dialog_reboot=false"> |
| 88 | + {{ $t('message.cancel') }} |
| 89 | + </v-btn> |
| 90 | + <v-btn color="error" @click="reboot"> |
| 91 | + <b>{{ $t('message.settings_actions_reboot') }}</b> |
| 92 | + </v-btn> |
| 93 | + </v-card-actions> |
| 94 | + </v-card> |
| 95 | + </v-dialog> |
| 96 | + <v-dialog v-model="dialog_restore" width="500"> |
| 97 | + <v-card> |
| 98 | + <v-card-title class="headline grey lighten-2" primary-title> |
| 99 | + <h3>CoderBot - {{ $t('message.settings_actions_restore_title') }}</h3> |
| 100 | + </v-card-title> |
| 101 | + <v-card-text> |
| 102 | + {{ $t('message.settings_actions_restore_text_1') }} |
| 103 | + </v-card-text> |
| 104 | + <v-divider></v-divider> |
| 105 | + <v-card-actions> |
| 106 | + <v-spacer></v-spacer> |
| 107 | + <v-btn color="primary" @click="dialog_restore = false"> |
71 | 108 | {{ $t('message.cancel') }}
|
72 | 109 | </v-btn>
|
73 | 110 | <v-btn color="error" @click="reset">
|
74 |
| - <b>{{ $t('message.settings_actions_reset_factory_restore') }}</b> |
| 111 | + <b>{{ $t('message.settings_actions_restore') }}</b> |
75 | 112 | </v-btn>
|
76 | 113 | </v-card-actions>
|
77 | 114 | </v-card>
|
78 | 115 | </v-dialog>
|
79 |
| - <!-- Logs --> |
80 |
| - <v-dialog v-model="dialog_logs" width="700"> |
| 116 | + <v-dialog v-model="dialog_reset" width="500"> |
81 | 117 | <v-card>
|
82 | 118 | <v-card-title class="headline grey lighten-2" primary-title>
|
83 |
| - <h3>CoderBot - {{ $t('message.settings_actions_show_logs_title') }}</h3> |
| 119 | + <h3>CoderBot - {{ $t('message.settings_actions_reset_title') }}</h3> |
84 | 120 | </v-card-title>
|
85 |
| - <div class="cardContent"> |
86 |
| - <div v-for="value, key in cb.logs.log" :key="key"> |
87 |
| - {{ value }} |
88 |
| - </div> |
89 |
| - </div> |
| 121 | + <v-card-text> |
| 122 | + {{ $t('message.settings_actions_reset_text_1') }} |
| 123 | + </v-card-text> |
90 | 124 | <v-divider></v-divider>
|
91 | 125 | <v-card-actions>
|
92 | 126 | <v-spacer></v-spacer>
|
93 |
| - <v-btn color="primary" @click="dialog_logs = false"> |
94 |
| - {{ $t('message.close') }} |
| 127 | + <v-btn color="primary" @click="dialog_reset = false"> |
| 128 | + {{ $t('message.cancel') }} |
| 129 | + </v-btn> |
| 130 | + <v-btn color="error" @click="reset"> |
| 131 | + <b>{{ $t('message.settings_actions_reset_do') }}</b> |
95 | 132 | </v-btn>
|
96 | 133 | </v-card-actions>
|
97 | 134 | </v-card>
|
@@ -1009,8 +1046,10 @@ export default {
|
1009 | 1046 | return {
|
1010 | 1047 | formdata: null,
|
1011 | 1048 | files: null,
|
| 1049 | + dialog_shutdown: false, |
| 1050 | + dialog_reboot: false, |
| 1051 | + dialog_restore: false, |
1012 | 1052 | dialog_reset: false,
|
1013 |
| - dialog_logs: false, |
1014 | 1053 | lastCommit: 'N/A',
|
1015 | 1054 | snackbar: null,
|
1016 | 1055 | snackText: null,
|
|
0 commit comments