File tree Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Original file line number Diff line number Diff line change 10
10
< link rel ="stylesheet " href ="/styles/androidstudio.min.css " />
11
11
< script src ="/js/highlight.min.js "> </ script >
12
12
< script src ="/js/highlightjs-line-numbers.min.js "> </ script >
13
+ < link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
13
14
< style >
14
15
.loading-page {
15
16
display : flex;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " api-explorer" ,
3
- "version" : " 1.0.29 " ,
3
+ "version" : " 1.1.1 " ,
4
4
"private" : true ,
5
5
"scripts" : {
6
6
"dev" : " vite & ts-node server/app.ts" ,
Original file line number Diff line number Diff line change @@ -121,8 +121,20 @@ console.log(
121
121
)
122
122
123
123
// Get commit ID
124
- export const commitId = execSync ( 'git rev-parse HEAD' ) . toString ( ) . trim ( ) ;
125
- console . log ( 'Current Commit ID:' , commitId ) ;
124
+ export let commitId = '' ;
125
+
126
+ try {
127
+ // Try to get the commit ID
128
+ commitId = execSync ( 'git rev-parse HEAD' , { encoding : 'utf-8' } ) . trim ( ) ;
129
+ console . log ( 'Current Commit ID:' , commitId ) ;
130
+ } catch ( error ) {
131
+ // Log the error but do not terminate the process
132
+ console . error ( 'Warning: Failed to retrieve the commit ID. Proceeding without it.' ) ;
133
+ console . error ( 'Error details:' , error . message ) ;
134
+ commitId = 'unknown' ; // Assign a fallback value
135
+ }
136
+ // Continue execution with or without a valid commit ID
137
+ console . log ( 'Execution continues with commitId:' , commitId ) ;
126
138
127
139
// Error Handling to Shut Down the App
128
140
server . on ( 'error' , ( err ) => {
Original file line number Diff line number Diff line change @@ -263,11 +263,9 @@ const copyToClipboard = () => {
263
263
<input type =" text" v-show =" exampleRequestBody" v-model =" exampleRequestBody" />
264
264
</div >
265
265
<div v-show =" successResponseBody" >
266
- <pre ><span >{{ responseHeaderTitle }}:</span >
267
- <code >
268
- <div id =" code" v-html =" successResponseBody" ></div >
269
- </code >
270
- </pre >
266
+ <p class =" header-container" >{{ responseHeaderTitle }}:</p >
267
+ <pre ><button @click =" copyToClipboard" class =" copy-button icon-md-heavy" title =" Copy to Clipboard" ><i class =" material-icons" >content_copy</i ></button >
268
+ <code ><div id =" code" v-html =" successResponseBody" ></div ></code ></pre >
271
269
</div >
272
270
<el-form ref =" roleFormRef" :model =" roleForm" >
273
271
<div v-show =" showRequiredRoles" >
@@ -456,4 +454,29 @@ li {
456
454
#conector-method-link {
457
455
color : white !important ;
458
456
}
457
+ .copy-button {
458
+ background : none ;
459
+ border : none ;
460
+ padding : 0 ;
461
+ cursor : pointer ;
462
+ display : flex ;
463
+ align-items : center ;
464
+ justify-content : center ;
465
+ }
466
+
467
+ .copy-button .material-icons {
468
+ font-size : 20px ;
469
+ color : #757575 ;
470
+ transition : color 0.2s ease , transform 0.2s ease ;
471
+ }
472
+
473
+ .copy-button :hover .material-icons {
474
+ color : #424242 ;
475
+ transform : scale (1.1 );
476
+ }
477
+
478
+ .copy-button :active .material-icons {
479
+ color : #212121 ;
480
+ transform : scale (0.95 );
481
+ }
459
482
</style >
You can’t perform that action at this time.
0 commit comments