Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fix minor settings2 #45

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/components/messageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ export const MessageInput = ({
/>
</div>
</div>
<div className="py-4 bg-[#413D43] text-center text-white font-Montserrat">
powered by VRoid, Koemotion, ChatGPT API, VOICEVOX
</div>
</div>
</div>
);
Expand Down
8 changes: 7 additions & 1 deletion src/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useEffect } from "react";
import { IconButton } from "./iconButton";
import { TextButton } from "./textButton";
import { Message } from "@/features/messages/messages";
import { GitHubLink } from "./githubLink";
import {
KoeiroParam,
PRESET_A,
Expand Down Expand Up @@ -159,13 +160,17 @@ export const Settings = ({

return (
<div className="absolute z-40 w-full h-full bg-white/80 backdrop-blur ">
<GitHubLink />
<div className="absolute m-24">
<IconButton
iconName="24/Close"
isProcessing={false}
onClick={onClickClose}
></IconButton>
</div>
<div className="absolute py-4 bg-[#413D43] text-center text-white font-Montserrat bottom-0 w-full">
powered by Pixiv, VRoid, Koemotion, VOICEVOX, OpenAI, Anthropic, Google, Groq, Dify
</div>
<div className="max-h-full overflow-auto">
<div className="text-text1 max-w-3xl mx-auto px-24 py-64 ">
<div className="my-24 typography-32 font-bold">{t('Settings')}</div>
Expand Down Expand Up @@ -710,8 +715,9 @@ export const Settings = ({
);
}
})()}

</div>


{chatLog.length > 0 && (
<div className="my-40">
<div className="my-8 grid-cols-2">
Expand Down
17 changes: 5 additions & 12 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { getGroqChatResponseStream } from "@/features/chat/groqChat";
import { getDifyChatResponseStream } from "@/features/chat/difyChat";
import { Introduction } from "@/components/introduction";
import { Menu } from "@/components/menu";
import { GitHubLink } from "@/components/githubLink";
import { Meta } from "@/components/meta";
import "@/lib/i18n";
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -292,16 +291,11 @@ export default function Home() {
}
} else {
// ChatVERM original mode
if (selectAIService === "openai" && !openAiKey) {
setAssistantMessage(t('APIKeyNotEntered'));
return;
} else if (selectAIService === "anthropic" && !anthropicKey) {
setAssistantMessage(t('APIKeyNotEntered'));
return;
} else if (selectAIService === "groq" && !groqKey) {
setAssistantMessage(t('APIKeyNotEntered'));
return;
} else if (selectAIService === "dify" && !difyKey) {
if (selectAIService === "openai" && !openAiKey ||
selectAIService === "anthropic" && !anthropicKey ||
selectAIService === "google" && !googleKey ||
selectAIService === "groq" && !groqKey ||
selectAIService === "dify" && !difyKey) {
setAssistantMessage(t('APIKeyNotEntered'));
return;
}
Expand Down Expand Up @@ -564,7 +558,6 @@ export default function Home() {
setSelectVoiceLanguage={setSelectVoiceLanguage}
setBackgroundImageUrl={setBackgroundImageUrl}
/>
<GitHubLink />
</div>
</>
);
Expand Down