File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 21
21
<a class =" tab-link" @click =" selectedTab = 'debug'" >{{ t('application.debugConsole') }}</a >
22
22
</li >
23
23
</ul >
24
- <button class =" btn btn-clear mr-1" @click =" resizeConsole(0)" />
24
+ <div class =" d-flex" >
25
+ <div
26
+ v-if =" isDevelopment"
27
+ class =" c-hand mr-2"
28
+ @click =" openDevTools()"
29
+ >
30
+ <BaseIcon icon-name =" mdiBugPlayOutline" :size =" 22" />
31
+ </div >
32
+ <div
33
+ v-if =" isDevelopment"
34
+ class =" c-hand mr-2"
35
+ @click =" reload()"
36
+ >
37
+ <BaseIcon icon-name =" mdiRefresh" :size =" 22" />
38
+ </div >
39
+ <button class =" btn btn-clear mr-1" @click =" resizeConsole(0)" />
40
+ </div >
25
41
</div >
26
42
<div
27
43
v-show =" selectedTab === 'query'"
71
87
</BaseContextMenu >
72
88
</template >
73
89
<script setup lang="ts">
90
+ import { getCurrentWindow } from ' @electron/remote' ;
74
91
import * as moment from ' moment' ;
75
92
import { storeToRefs } from ' pinia' ;
76
93
import { highlight } from ' sql-highlight' ;
@@ -112,6 +129,8 @@ const isHover = ref(false);
112
129
const isContext = ref (false );
113
130
const contextContent: Ref <string > = ref (null );
114
131
const contextEvent: Ref <MouseEvent > = ref (null );
132
+ const w = ref (getCurrentWindow ());
133
+ const isDevelopment = ref (process .env .NODE_ENV === ' development' );
115
134
116
135
const resize = (e : MouseEvent ) => {
117
136
const el = queryConsole .value ;
@@ -142,6 +161,14 @@ const copyLog = () => {
142
161
isContext .value = false ;
143
162
};
144
163
164
+ const openDevTools = () => {
165
+ w .value .webContents .openDevTools ();
166
+ };
167
+
168
+ const reload = () => {
169
+ w .value .reload ();
170
+ };
171
+
145
172
watch (workspaceQueryLogs , async () => {
146
173
if (! isHover .value ) {
147
174
await nextTick ();
You can’t perform that action at this time.
0 commit comments