Skip to content

Commit f50dd4f

Browse files
committed
chore: style
1 parent 55eb719 commit f50dd4f

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

scripts/chat.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ function chatInit() {
114114
currentIndex = -1;
115115
};
116116
}
117+
118+
init();
117119
}
118120

119121
if (document.readyState === 'complete' || document.readyState === 'interactive') {

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"package": {
99
"productName": "ChatGPT",
10-
"version": "1.0.0"
10+
"version": "0.12.0"
1111
},
1212
"tauri": {
1313
"allowlist": {

src/main.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,7 @@ body,
136136
margin-left: 5px;
137137
}
138138
}
139+
140+
.ant-message {
141+
max-width: 500px;
142+
}

src/view/scripts/config.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,12 @@ export const scriptColumns = ({ scriptsMap }: any) => [
4848
return <a onClick={() => shell.open(uri)}>{uri}</a>;
4949
},
5050
},
51-
{
52-
title: 'Created',
53-
dataIndex: 'created',
54-
key: 'created',
55-
width: 150,
56-
render: fmtDate,
57-
},
5851
{
5952
title: 'Action',
6053
fixed: 'right',
6154
width: 100,
6255
render: (_: any, row: any, actions: any) => {
6356
const isExternal = row.name === 'main.js';
64-
65-
const next = scriptsMap?.[row.name]?.next_version;
66-
const curr = scriptsMap?.[row.name]?.curr_version;
67-
6857
return (
6958
<Space>
7059
<Link
@@ -74,7 +63,7 @@ export const scriptColumns = ({ scriptsMap }: any) => [
7463
>
7564
Edit
7665
</Link>
77-
{!isExternal && next && next !== curr && (
66+
{!isExternal && (
7867
<Popconfirm
7968
placement="topLeft"
8069
title="Are you sure you want to synchronize? It will overwrite all previous modifications made to this file."

src/view/scripts/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useEffect, useState } from 'react';
2-
import { Table } from 'antd';
2+
import { Table, message } from 'antd';
33
import { path, fs, invoke } from '@tauri-apps/api';
44

55
import useInit from '@/hooks/useInit';
@@ -53,6 +53,13 @@ export default function Scripts() {
5353
if (isOk) {
5454
await handleInit();
5555
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+
);
5663
}
5764
}
5865
})();

0 commit comments

Comments
 (0)