From 427d298994b3a5e51deacd05b92a90ed8b06e062 Mon Sep 17 00:00:00 2001 From: Hayden2018 Date: Sun, 29 Oct 2023 19:11:49 +0800 Subject: [PATCH] Update naming and version --- package.json | 2 +- public/about.html | 2 +- .../{GlobalSettingModal.tsx => GlobalSetting.tsx} | 2 +- .../{GlobalSettingModalHook.ts => GlobalSettingHook.ts} | 0 src/pages/{Greeting/Greeting.tsx => Login/Login.tsx} | 2 +- src/pages/{Greeting => Login}/logo.svg | 0 src/pages/PageSwitch.tsx | 8 ++++---- src/redux/type.d.ts | 1 - 8 files changed, 8 insertions(+), 9 deletions(-) rename src/pages/GlobalSetting/{GlobalSettingModal.tsx => GlobalSetting.tsx} (99%) rename src/pages/GlobalSetting/{GlobalSettingModalHook.ts => GlobalSettingHook.ts} (100%) rename src/pages/{Greeting/Greeting.tsx => Login/Login.tsx} (99%) rename src/pages/{Greeting => Login}/logo.svg (100%) diff --git a/package.json b/package.json index fef85e8..d20e272 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DialogCraft", - "version": "1.0.0", + "version": "1.0.2", "author": "Hayden Chiu", "description": "Chat client for GPT API", "main": "electron-src/main.js", diff --git a/public/about.html b/public/about.html index 4007856..8567807 100644 --- a/public/about.html +++ b/public/about.html @@ -47,7 +47,7 @@

DialogCraft Icon DialogCraft

-

Version: 1.0.0

+

Version: 1.0.2

Craft your conversations with GPT

LICENSE diff --git a/src/pages/GlobalSetting/GlobalSettingModal.tsx b/src/pages/GlobalSetting/GlobalSetting.tsx similarity index 99% rename from src/pages/GlobalSetting/GlobalSettingModal.tsx rename to src/pages/GlobalSetting/GlobalSetting.tsx index 51ca003..374be3e 100644 --- a/src/pages/GlobalSetting/GlobalSettingModal.tsx +++ b/src/pages/GlobalSetting/GlobalSetting.tsx @@ -5,7 +5,7 @@ import { styled } from '@mui/system'; import { toggleTheme, updateChatSetting } from 'redux/settingSlice'; import { AppState, SettingConfig, SettingStatus } from 'redux/type.d'; -import { useDataActions } from './GlobalSettingModalHook'; +import { useDataActions } from './GlobalSettingHook'; import { onElectronEnv, useBackButton, useScreenWidth } from 'utils'; import { back } from 'redux/pageSlice'; diff --git a/src/pages/GlobalSetting/GlobalSettingModalHook.ts b/src/pages/GlobalSetting/GlobalSettingHook.ts similarity index 100% rename from src/pages/GlobalSetting/GlobalSettingModalHook.ts rename to src/pages/GlobalSetting/GlobalSettingHook.ts diff --git a/src/pages/Greeting/Greeting.tsx b/src/pages/Login/Login.tsx similarity index 99% rename from src/pages/Greeting/Greeting.tsx rename to src/pages/Login/Login.tsx index 680e481..536f1ae 100644 --- a/src/pages/Greeting/Greeting.tsx +++ b/src/pages/Login/Login.tsx @@ -121,7 +121,7 @@ const releaseUrl = 'https://github.com/Hayden2018/dialogcraft/releases'; const videoUrl = 'https://www.youtube.com/watch?v=aVog4J6nIAU'; const openTarget = onElectronEnv() ? '' : '_blank'; -export default function GreetingPage() { +export default function Login() { const dispatch = useDispatch(); const { status } = useSelector((state: AppState) => state.setting.global); diff --git a/src/pages/Greeting/logo.svg b/src/pages/Login/logo.svg similarity index 100% rename from src/pages/Greeting/logo.svg rename to src/pages/Login/logo.svg diff --git a/src/pages/PageSwitch.tsx b/src/pages/PageSwitch.tsx index 029efa3..8de7e81 100644 --- a/src/pages/PageSwitch.tsx +++ b/src/pages/PageSwitch.tsx @@ -1,9 +1,9 @@ import { useSelector } from "react-redux"; import { AppState, PageType } from "redux/type.d"; -import GlobalSetting from "pages/GlobalSetting/GlobalSettingModal"; -import GreetingPage from "./Greeting/Greeting"; +import Login from "./Login/Login"; import Chat from "./Chat/Chat"; +import GlobalSetting from "pages/GlobalSetting/GlobalSetting"; import ResetAppWarning from "./ResetAppWarning/ResetAppWarning"; import ImportChats from "components/ChatImport/ChatImport"; @@ -13,7 +13,7 @@ function PageSwitch() { switch (current) { case PageType.LOGIN: - return ; + return ; case PageType.CHAT: return ; case PageType.SETTING_GLOBAL: @@ -23,7 +23,7 @@ function PageSwitch() { case PageType.SETTING_IMPORT: return ; default: - return ; + return ; } } diff --git a/src/redux/type.d.ts b/src/redux/type.d.ts index 98af9f3..1c9c93a 100644 --- a/src/redux/type.d.ts +++ b/src/redux/type.d.ts @@ -41,7 +41,6 @@ export enum ModalType { RESTORE_MESSAGE = 'RESTORE_MESSAGE', REGENERATE_MESSAGE = 'REGEN_MESSAGE', CHAT_SETTING = 'CHAT_SETTING', - GLOBAL_SETTING = 'GLOBAL_SETTING', CHAT_ERROR = 'CHAT_ERROR', CHAT_TIMEOUT = 'CHAT_TIMEOUT', RENAME_CHAT = 'RENAME_CHAT',