mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
feat: set window size (#405)
This commit is contained in:
4
src/hooks/useTable.tsx
vendored
4
src/hooks/useTable.tsx
vendored
@@ -8,8 +8,8 @@ type rowSelectionOptions = {
|
||||
key: 'id' | string;
|
||||
rowType: 'id' | 'row' | 'all';
|
||||
};
|
||||
export function useTableRowSelection(options: Partial<rowSelectionOptions> = {}) {
|
||||
const { key = 'id', rowType = 'id' } = options;
|
||||
export function useTableRowSelection(options?: Partial<rowSelectionOptions>) {
|
||||
const { key = 'id', rowType = 'id' } = options || {};
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
const [selectedRowIDs, setSelectedRowIDs] = useState<string[]>([]);
|
||||
const [selectedRows, setSelectedRows] = useState<Record<string | symbol, any>[]>([]);
|
||||
|
||||
3
src/view/settings/General.tsx
vendored
3
src/view/settings/General.tsx
vendored
@@ -18,6 +18,9 @@ export default function General() {
|
||||
<Form.Item label="Stay On Top" name="stay_on_top" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label="Save Window State" name="save_window_state" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
{platformInfo === 'darwin' && (
|
||||
<Form.Item label="Titlebar" name="titlebar" valuePropName="checked">
|
||||
<Switch />
|
||||
|
||||
8
src/view/settings/MainWindow.tsx
vendored
8
src/view/settings/MainWindow.tsx
vendored
@@ -1,4 +1,4 @@
|
||||
import { Form, Switch, Input, Tooltip } from 'antd';
|
||||
import { Form, Switch, Input, InputNumber, Tooltip } from 'antd';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
import SwitchOrigin from '@/components/SwitchOrigin';
|
||||
@@ -50,6 +50,12 @@ export default function MainWindow() {
|
||||
<Form.Item label={<MainCloseLabel />} name="main_close" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label="Default Width" name="main_width">
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<Form.Item label="Default Height" name="main_height">
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<SwitchOrigin name="main" />
|
||||
<Form.Item label="User Agent (Main)" name="ua_window">
|
||||
<Input.TextArea
|
||||
|
||||
8
src/view/settings/TrayWindow.tsx
vendored
8
src/view/settings/TrayWindow.tsx
vendored
@@ -1,4 +1,4 @@
|
||||
import { Form, Switch, Input, Tooltip } from 'antd';
|
||||
import { Form, Switch, Input, InputNumber, Tooltip } from 'antd';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
|
||||
import { DISABLE_AUTO_COMPLETE } from '@/utils';
|
||||
@@ -23,6 +23,12 @@ export default function TrayWindow() {
|
||||
<Form.Item label="Enable SystemTray" name="tray" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item label="Default Width" name="tray_width">
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<Form.Item label="Default Height" name="tray_height">
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<SwitchOrigin name="tray" />
|
||||
<Form.Item label={<UALabel />} name="ua_tray">
|
||||
<Input.TextArea
|
||||
|
||||
Reference in New Issue
Block a user