Skip to content

Commit

Permalink
Merge pull request #45 from tegnike/feature/fix-minor-settings2
Browse files Browse the repository at this point in the history
Feature/fix minor settings2
  • Loading branch information
tegnike authored May 27, 2024
2 parents 0149589 + a0c20b3 commit a7a55b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
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

0 comments on commit a7a55b6

Please sign in to comment.