mirror of
https://github.com/lencx/ChatGPT.git
synced 2024-10-01 01:06:13 -04:00
chore: style
This commit is contained in:
parent
55eb719e5c
commit
f50dd4fc6a
2
scripts/chat.js
vendored
2
scripts/chat.js
vendored
@ -114,6 +114,8 @@ function chatInit() {
|
||||
currentIndex = -1;
|
||||
};
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "ChatGPT",
|
||||
"version": "1.0.0"
|
||||
"version": "0.12.0"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
4
src/main.scss
vendored
4
src/main.scss
vendored
@ -136,3 +136,7 @@ body,
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-message {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
13
src/view/scripts/config.tsx
vendored
13
src/view/scripts/config.tsx
vendored
@ -48,23 +48,12 @@ export const scriptColumns = ({ scriptsMap }: any) => [
|
||||
return <a onClick={() => shell.open(uri)}>{uri}</a>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Created',
|
||||
dataIndex: 'created',
|
||||
key: 'created',
|
||||
width: 150,
|
||||
render: fmtDate,
|
||||
},
|
||||
{
|
||||
title: 'Action',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
render: (_: any, row: any, actions: any) => {
|
||||
const isExternal = row.name === 'main.js';
|
||||
|
||||
const next = scriptsMap?.[row.name]?.next_version;
|
||||
const curr = scriptsMap?.[row.name]?.curr_version;
|
||||
|
||||
return (
|
||||
<Space>
|
||||
<Link
|
||||
@ -74,7 +63,7 @@ export const scriptColumns = ({ scriptsMap }: any) => [
|
||||
>
|
||||
Edit
|
||||
</Link>
|
||||
{!isExternal && next && next !== curr && (
|
||||
{!isExternal && (
|
||||
<Popconfirm
|
||||
placement="topLeft"
|
||||
title="Are you sure you want to synchronize? It will overwrite all previous modifications made to this file."
|
||||
|
9
src/view/scripts/index.tsx
vendored
9
src/view/scripts/index.tsx
vendored
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Table } from 'antd';
|
||||
import { Table, message } from 'antd';
|
||||
import { path, fs, invoke } from '@tauri-apps/api';
|
||||
|
||||
import useInit from '@/hooks/useInit';
|
||||
@ -53,6 +53,13 @@ export default function Scripts() {
|
||||
if (isOk) {
|
||||
await handleInit();
|
||||
opInfo.resetRecord();
|
||||
message.success(
|
||||
`The ${opInfo?.opRecord?.name} script has been synchronized successfully`,
|
||||
);
|
||||
} else {
|
||||
message.error(
|
||||
`The ${opInfo?.opRecord?.name} script synchronization failed. You can try editing the script and click the Remote File link to copy the source code.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user