File tree Expand file tree Collapse file tree 5 files changed +16
-14
lines changed Expand file tree Collapse file tree 5 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ function chatInit() {
114
114
currentIndex = - 1 ;
115
115
} ;
116
116
}
117
+
118
+ init ( ) ;
117
119
}
118
120
119
121
if ( document . readyState === 'complete' || document . readyState === 'interactive' ) {
Original file line number Diff line number Diff line change 7
7
},
8
8
"package" : {
9
9
"productName" : " ChatGPT" ,
10
- "version" : " 1.0 .0"
10
+ "version" : " 0.12 .0"
11
11
},
12
12
"tauri" : {
13
13
"allowlist" : {
Original file line number Diff line number Diff line change @@ -136,3 +136,7 @@ body,
136
136
margin-left : 5px ;
137
137
}
138
138
}
139
+
140
+ .ant-message {
141
+ max-width : 500px ;
142
+ }
Original file line number Diff line number Diff line change @@ -48,23 +48,12 @@ export const scriptColumns = ({ scriptsMap }: any) => [
48
48
return < a onClick = { ( ) => shell . open ( uri ) } > { uri } </ a > ;
49
49
} ,
50
50
} ,
51
- {
52
- title : 'Created' ,
53
- dataIndex : 'created' ,
54
- key : 'created' ,
55
- width : 150 ,
56
- render : fmtDate ,
57
- } ,
58
51
{
59
52
title : 'Action' ,
60
53
fixed : 'right' ,
61
54
width : 100 ,
62
55
render : ( _ : any , row : any , actions : any ) => {
63
56
const isExternal = row . name === 'main.js' ;
64
-
65
- const next = scriptsMap ?. [ row . name ] ?. next_version ;
66
- const curr = scriptsMap ?. [ row . name ] ?. curr_version ;
67
-
68
57
return (
69
58
< Space >
70
59
< Link
@@ -74,7 +63,7 @@ export const scriptColumns = ({ scriptsMap }: any) => [
74
63
>
75
64
Edit
76
65
</ Link >
77
- { ! isExternal && next && next !== curr && (
66
+ { ! isExternal && (
78
67
< Popconfirm
79
68
placement = "topLeft"
80
69
title = "Are you sure you want to synchronize? It will overwrite all previous modifications made to this file."
Original file line number Diff line number Diff line change 1
1
import { useEffect , useState } from 'react' ;
2
- import { Table } from 'antd' ;
2
+ import { Table , message } from 'antd' ;
3
3
import { path , fs , invoke } from '@tauri-apps/api' ;
4
4
5
5
import useInit from '@/hooks/useInit' ;
@@ -53,6 +53,13 @@ export default function Scripts() {
53
53
if ( isOk ) {
54
54
await handleInit ( ) ;
55
55
opInfo . resetRecord ( ) ;
56
+ message . success (
57
+ `The ${ opInfo ?. opRecord ?. name } script has been synchronized successfully` ,
58
+ ) ;
59
+ } else {
60
+ message . error (
61
+ `The ${ opInfo ?. opRecord ?. name } script synchronization failed. You can try editing the script and click the Remote File link to copy the source code.` ,
62
+ ) ;
56
63
}
57
64
}
58
65
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments