From 11bdf4eaf22930c42dd5797415483deb5506b574 Mon Sep 17 00:00:00 2001 From: MinamizonoEno Date: Sat, 2 Sep 2023 12:06:40 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + doc/battle.md | 5 --- doc/composition.md | 92 +++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 83 insertions(+), 15 deletions(-) delete mode 100644 doc/battle.md diff --git a/README.md b/README.md index cd43191..95df5e2 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ # ドキュメント - [ディレクトリ構成](./doc/composition.md) +- [chatGPTAPI 仕様](./doc/api.md) # 技術スタック diff --git a/doc/battle.md b/doc/battle.md deleted file mode 100644 index aba7d56..0000000 --- a/doc/battle.md +++ /dev/null @@ -1,5 +0,0 @@ -バトルする -勝つ -ツイートできるようにする -負ける -励ましの言葉をヤギにかける \ No newline at end of file diff --git a/doc/composition.md b/doc/composition.md index 949a9d2..aeda613 100644 --- a/doc/composition.md +++ b/doc/composition.md @@ -4,6 +4,7 @@ ``` . +├── .git ├── .github │ └── workflows │ ├── ci.yml @@ -23,37 +24,106 @@ │ ├── README.md │ └── tsconfig.json ├── public -│ └── favicon.ico +│ ├── favicon.ico +│ └── ogp.png ├── src +│ ├── api +│ │ ├── addWordEmotions.ts +│ │ ├── getEmotionApi.ts +│ │ └── getWordEmotions.ts │ ├── assets │ ├── Audio │ ├── components -│ │ ├── Bgm.tsx +│ │ ├── auth +│ │ │ ├── update +│ │ │ │ ├── BattleWinCount.ts +│ │ │ │ └── TotalEatCount.ts +│ │ │ ├── AddUserData.ts +│ │ │ ├── AuthGoogleSigninPopup.ts +│ │ │ ├── GetUserData.ts +│ │ │ ├── LoginButton.tsx +│ │ │ ├── SetupUserData.ts +│ │ │ ├── UpdateUserData.ts +│ │ │ └── UserDataDisplay.tsx +│ │ ├── battle +│ │ │ ├── BattleAction.tsx +│ │ │ ├── BattleForm.tsx +│ │ │ ├── BattleNavbar.tsx +│ │ │ ├── BattleNavBarcon.tsx +│ │ │ ├── BattleResult.tsx +│ │ │ └── MonsterModal.tsx +│ │ ├── common +│ │ │ ├── CircleProgressCon.tsx +│ │ │ └── VerticalDivider.tsx +│ │ ├── costume +│ │ │ ├── BgImageBox.tsx +│ │ │ ├── ChangeBgImageBox.tsx +│ │ │ ├── ChangeCostumeBox.tsx +│ │ │ ├── CostumeBox.tsx +│ │ │ ├── CostumeHeader.tsx +│ │ │ ├── CostumeNavbar.tsx +│ │ │ └── CostumeNavBarcon.tsx +│ │ ├── navbar +│ │ │ ├── Bgm.tsx +│ │ │ ├── NavBar.tsx +│ │ │ └── NavBarCon.tsx +│ │ ├── settings +│ │ │ ├── SettingsNavbar.tsx +│ │ │ └── SettingsNavBarCon.tsx +│ │ ├── trophy +│ │ │ ├── RequestLogin.tsx +│ │ │ └── TrophyList.tsx │ │ ├── Branch.tsx │ │ ├── Eat.tsx │ │ ├── EvolutionPopup.tsx │ │ ├── EvolutionWalk.tsx -│ │ ├── FlowerPopup.tsx │ │ ├── Form.tsx -│ │ ├── getEmotionApi.ts -│ │ ├── NavBar.tsx │ │ ├── NormalWalk.tsx +│ │ ├── PageContainer.tsx │ │ ├── Pulse.tsx -│ │ └── Tutorial.tsx +│ │ ├── ShowNewGrassModal.tsx +│ │ ├── Tutorial.tsx +│ │ └── TwitterShare.ts +│ ├── const +│ │ └── eatLimit.ts │ ├── hooks -│ │ └── useDiscloser.ts +│ │ ├── useDiscloser.ts +│ │ └── useInput.ts +│ ├── lib +│ │ ├── analytics.ts +│ │ ├── AuthGoogleProviderCreate.ts +│ │ ├── AuthGoogleProviderScopes.ts +│ │ ├── firebase.ts +│ │ └── firestore.ts │ ├── pages -│ │ └── AppView.tsx +│ │ ├── AppView.tsx +│ │ ├── BattleView.tsx +│ │ ├── CostumePage.tsx +│ │ ├── MonsterView.tsx +│ │ ├── SettingsView.tsx +│ │ └── TrophyPage.tsx +│ ├── provider +│ │ ├── ContextProviders.tsx +│ │ └── Providers.tsx │ ├── routes │ │ └── Routers.tsx +│ ├── styles +│ │ ├── modalStyle.ts +│ │ ├── MonsterModalStyle.ts +│ │ └── textFieldStyle.ts │ ├── theme │ │ ├── palette.ts │ │ ├── theme.ts │ │ └── typography.ts │ ├── types -│ │ ├── EatLimit.ts │ │ ├── EmotionDataType.ts -│ │ └── import-image.d.ts +│ │ ├── import-image.d.ts +│ │ └── UserDataType.ts +│ ├── util +│ │ ├── convertBackGroundImg.ts +│ │ ├── convertCostume.ts +│ │ ├── convertGoat.ts +│ │ └── convertMonster.ts │ ├── App.tsx │ ├── main.tsx │ └── vite-env.d.ts @@ -62,6 +132,7 @@ ├── .firebaserc ├── .gitignore ├── .prettierrc +├── eslint-results.sarif ├── firebase.json ├── index.html ├── package-lock.json @@ -76,3 +147,4 @@ - `src/components`: React コンポーネントを格納するディレクトリ - `src/pages`: 各ページのコンポーネントを格納するディレクトリ +- `src/routes`: React ルーティングを格納するディレクトリ From 23a77cfa4cf8a3b18aff224c1bcaadf0dcfefa07 Mon Sep 17 00:00:00 2001 From: Yuma Satake Date: Sat, 2 Sep 2023 13:11:08 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SettingsView.tsx | 20 ++++++++++++++++---- src/provider/ContextProviders.tsx | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/pages/SettingsView.tsx b/src/pages/SettingsView.tsx index f826239..dc2cd04 100644 --- a/src/pages/SettingsView.tsx +++ b/src/pages/SettingsView.tsx @@ -1,4 +1,4 @@ -import { Box, Button, ButtonGroup, Divider, Slider, Typography } from '@mui/material'; +import { Box, Button, ButtonGroup, Divider, Slider, Switch, Typography } from '@mui/material'; import { Container } from '@mui/material'; import { Stack } from '@mui/material'; import Paper from '@mui/material/Paper'; @@ -15,8 +15,8 @@ import VolumeUpIcon from '@mui/icons-material/VolumeDown'; import VolumeOffIcon from '@mui/icons-material/VolumeOff'; export const SettingsView = () => { - const [value, setValue] = useState(50); - const [isPlaying, setIsPlaying] = useState(true); + const [value, setValue] = useState(0); + const [isPlaying, setIsPlaying] = useState(false); const [isMusicPlaying, setMusicPlaying] = useContext(MusicContext); const [backgroundUrl] = useContext(BackgroundContext); @@ -104,11 +104,21 @@ export const SettingsView = () => { mb: 1, }} > - おんりょう + おんがく + + { + toggleBGM(); + }} + /> + オン・オフ + {value === 0 ? : } { @@ -134,6 +144,7 @@ export const SettingsView = () => { }} > { }} /> = ({ children }) => { //チュートリアルモーダルの状態を保持するステート const [isTutorialModal, setIsTutorialModal] = useState(true); + const audioRef = useRef(null); + return ( From e68c999de267d5146db451d0f783b24645f19794 Mon Sep 17 00:00:00 2001 From: Yuma Satake Date: Sat, 2 Sep 2023 13:18:34 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E3=83=88=E3=83=AD=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=BC=E3=83=A0=E3=81=AE=E6=96=87=E8=A8=80?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/trophy/RequestLogin.tsx | 12 ++++-------- src/pages/TrophyPage.tsx | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/trophy/RequestLogin.tsx b/src/components/trophy/RequestLogin.tsx index 39ddee2..12184d0 100644 --- a/src/components/trophy/RequestLogin.tsx +++ b/src/components/trophy/RequestLogin.tsx @@ -1,5 +1,5 @@ import { useContext } from 'react'; -import { Box } from '@mui/material'; +import { Box, Typography } from '@mui/material'; import { IsLoginContext } from '../../provider/ContextProviders'; import { LoginButton } from '../auth/LoginButton'; @@ -7,13 +7,9 @@ export const RequestLogin = () => { const [isLogin] = useContext(IsLoginContext); return isLogin ? null : (
- -

ログインがひつようです

-

- トロフィーきのうをつかうにはログインがひつようです。 -
- おてすうですがログインしていただくようにおねがいいたします。 -

+ + ログインがひつようです +

トロフィーきのうをつかうには ログインがひつようです

diff --git a/src/pages/TrophyPage.tsx b/src/pages/TrophyPage.tsx index 2a5df1f..6a593d9 100644 --- a/src/pages/TrophyPage.tsx +++ b/src/pages/TrophyPage.tsx @@ -27,7 +27,7 @@ export const TrophyPage = () => { }} > Date: Sat, 2 Sep 2023 13:29:19 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20fontSize=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/auth/UserDataDisplay.tsx | 10 ++++++---- src/components/battle/MonsterModal.tsx | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/auth/UserDataDisplay.tsx b/src/components/auth/UserDataDisplay.tsx index 8660d2e..9bf83e3 100644 --- a/src/components/auth/UserDataDisplay.tsx +++ b/src/components/auth/UserDataDisplay.tsx @@ -44,21 +44,23 @@ export const UserDataDisplay: FC = () => { > ゆーざーID - {email} + {email} ゆーざーねーむ - {userData?.userName ?? 'ユーザネームがありません'} + + {userData?.userName === '' ? 'ユーザネームがありません' : ''} + ことばをたべさせたかいすう - + {userData?.totalEatCount ? String(userData?.totalEatCount) : '0'}かい バトルでかったかいすう - + {userData?.battleWinCount ? String(userData?.battleWinCount) : '0'}かい diff --git a/src/components/battle/MonsterModal.tsx b/src/components/battle/MonsterModal.tsx index 2f6627c..6f6c71e 100644 --- a/src/components/battle/MonsterModal.tsx +++ b/src/components/battle/MonsterModal.tsx @@ -21,6 +21,7 @@ export const MonsterModal: FC = ({ open, closeClick, monsternumber }) =>
よわいようだ!
+
ことばをたべさせて
やぎをいかりのかんじょうに @@ -37,6 +38,7 @@ export const MonsterModal: FC = ({ open, closeClick, monsternumber }) =>
よわいようだ!
+
ことばをたべさせて
やぎをかなしいかんじょうに @@ -53,6 +55,7 @@ export const MonsterModal: FC = ({ open, closeClick, monsternumber }) =>
よわいようだ!
+
ことばをたべさせて
やぎをたのしいのかんじょうに @@ -69,6 +72,7 @@ export const MonsterModal: FC = ({ open, closeClick, monsternumber }) =>
よわいようだ!
+
ことばをたべさせて
やぎをよろこびのかんじょうに