Skip to content

Commit

Permalink
Merge pull request #70 from Sports-day/feature/fix-link
Browse files Browse the repository at this point in the history
リンク修正など Feature/fix link
  • Loading branch information
1nayu authored Oct 30, 2024
2 parents d1641fe + 03f3022 commit f359974
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 44 deletions.
1 change: 1 addition & 0 deletions components/automation/AutomaticMatchEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export function AutomaticMatchEditor(props: AutomaticMatchEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="location-select">開催場所</InputLabel>
<Select
variant={"outlined"}
labelId={"location-select"}
id={"location"}
label={"開催場所"}
Expand Down
1 change: 1 addition & 0 deletions components/automation/AutomaticMatchEditorForImizu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export function AutomaticMatchEditorForImizu(props: AutomaticMatchEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="location-select">開催場所</InputLabel>
<Select
variant={"outlined"}
labelId={"location-select"}
id={"location"}
label={"開催場所"}
Expand Down
2 changes: 2 additions & 0 deletions components/automation/CrossGameAutomaticMatchEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export function CrossGameAutomaticMatchEditor(props: CrossGameAutomaticMatchEdit
<FormControl fullWidth size={"small"}>
<InputLabel id="game-select">リーグ・トーナメント選択</InputLabel>
<Select
variant={"outlined"}
labelId={"game-select"}
id={"game"}
placeholder={"リーグ・トーナメント選択"}
Expand Down Expand Up @@ -312,6 +313,7 @@ export function CrossGameAutomaticMatchEditor(props: CrossGameAutomaticMatchEdit

<InputLabel id="location-select">開催場所</InputLabel>
<Select
variant={"outlined"}
labelId={"location-select"}
id={"location"}
label={"開催場所"}
Expand Down
1 change: 1 addition & 0 deletions components/automation/makeLeagueMatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default function MakeLeagueMatches(props: MakeLeagueMatchesProps) {
<FormControl>
<InputLabel id="location-select">場所(後から変更できます)</InputLabel>
<Select
variant={"outlined"}
labelId={"location-select"}
id={"location"}
label={"場所"}
Expand Down
1 change: 0 additions & 1 deletion components/images/imageEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function ImageEditor(props: ImageEditorProps) {
const handleSubmit = async () => {
await imageFactory().delete(props.image.id);
router.back()
router.refresh()
};

return (
Expand Down
8 changes: 7 additions & 1 deletion components/information/informationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Information} from "@/src/models/InformationModel";
import {Stack, Typography, IconButton, Button} from "@mui/material";
import {HiOutlineInformationCircle} from "react-icons/hi";
import React from "react";
import NextLink from "next/link";

export type InformationListProps = {
informationList: Information[]
Expand All @@ -10,7 +11,12 @@ export type InformationListProps = {
export default function InformationList(props: InformationListProps) {
const list = props.informationList.map((information) => {
return (
<Button href={`/information/${information.id}`} sx={{py:1.5, px:2,mb:1, width:"100%", backgroundColor:"secondary.main", color:"text.primary"}} key={information.id}>
<Button
component={NextLink}
href={`/information/${information.id}`}
sx={{py:1.5, px:2,mb:1, width:"100%", backgroundColor:"secondary.main", color:"text.primary"}}
key={information.id}
>
<Stack spacing={1} direction={"row"} width={"100%"} justifyContent={"flex-start"} alignItems="center">
<Typography
color={"text.primary"}
Expand Down
4 changes: 2 additions & 2 deletions components/layout/navPrivacyPolicyDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const NavPrivacyPolicyDrawer = () => {
position: "fixed",
bottom: 0, left: 0, right: 0,
zIndex: "128",
background:"rgba(62,78,179,0.8)",
background:"${theme.palette.background.paper}",
backdropFilter: 'blur(4px)',
}}
>
Expand All @@ -32,7 +32,7 @@ const NavPrivacyPolicyDrawer = () => {
<Container maxWidth={"xl"}>
<Button
sx={{width:"100%"}}
color="secondary"
color="primary"
onClick={toggleDrawer(false)}
aria-label="close"
startIcon={<HiXMark/>}
Expand Down
8 changes: 4 additions & 4 deletions components/layout/privacyPolicy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const PrivacyPolicy = () => {
return (
<Container maxWidth={"xl"}>
<Stack spacing={2}>
<Typography variant={"h4"}>SPORTSDAYの個人情報取り扱い方針</Typography>
<Typography variant={"h6"} fontWeight={"600"} textAlign={"center"}>プライバシーポリシー</Typography>
<Divider/>
<Typography variant={"h6"}>どのような情報を収集しますか?</Typography>
<Typography>当サイトを利用すると、以下の情報が収集されることがあります。</Typography>
<Card variant={"outlined"} sx={{p:2}}>
<Stack spacing={1}>
<Typography fontWeight={"600"}>基本的なアカウント情報</Typography>
<Divider/>
<Typography>当サイトを利用するためには、Microsoftアカウントの基本的な情報(名前・アイコン)を取得します。また、参加する競技やチーム・リーグ・トーナメント・得点状況といった大会進行にしたがって必要な情報は、SPORTSDAY Adminを用いて登録されます。これらの情報は他のSPORTSDAYユーザーに公開されます。</Typography>
<Typography>当サイトを利用するためには、Microsoftアカウントの基本的な情報(名前・メールアドレス)を取得します。また、参加する競技やチーム・リーグ・トーナメント・得点状況といった大会進行にしたがって必要な情報は、SPORTSDAY Adminを用いて登録されます。これらの情報は他のSPORTSDAYユーザーに公開されます。</Typography>
</Stack>
</Card>
<Card variant={"outlined"} sx={{p:2}}>
Expand Down Expand Up @@ -56,7 +56,7 @@ const PrivacyPolicy = () => {
</Card>
<Divider/>
<Typography variant={"h6"}>情報をどのように保護しますか?</Typography>
<Typography>SPORTSDAY開発者は、ユーザーが入力・送信する際や自身の情報にアクセスする際に個人情報を安全に保つため、さまざまなセキュリティ上の対策を実施しています。アプリケーションとユーザーの間の通信はSSL/TLSによって保護されます。また、ログイン処理はOIDCを用いており、SPORTSDAY開発者はパスワードなどの情報を一切収集することができません。</Typography>
<Typography>SPORTSDAY開発者は、ユーザーが入力・送信する際や自身の情報にアクセスする際に個人情報を安全に保つため、さまざまなセキュリティ上の対策を実施しています。アプリケーションとユーザーの間の通信はSSL/TLSによって保護されます。また、ログイン処理はMicrosoft Entra IDが提供するOpenID Connectを用いており、SPORTSDAY開発者はパスワードなどの情報を一切収集することができません。</Typography>
<Divider/>
<Typography variant={"h6"}>データの保持はどのように行われますか?</Typography>
<Typography>SPORTSDAY開発者は誠意を持って次のように努めます:大会を通して収集されたアンケート結果以外のデータは、大会期間(大会当日の前後約1ヶ月)のみサーバーに保持されます。大会期間を過ぎると直ちに削除され、サーバーのストレージを完全にクリーンな状態にして安全に処理します。</Typography>
Expand All @@ -66,7 +66,7 @@ const PrivacyPolicy = () => {
<Divider/>
<Typography variant={"h6"}>プライバシーポリシーの変更について</Typography>
<Typography>プライバシーポリシーの変更があった場合、このページに変更を掲載します。</Typography>
<Typography>最終更新:2024年4月17日</Typography>
<Typography>最終更新:2024年10月8日</Typography>
<Stack direction={"row"} spacing={0.5}>
<Typography fontWeight={"600"} color={"#99a5d6"}>(C)2024</Typography>
<WiderLogo/>
Expand Down
5 changes: 4 additions & 1 deletion components/match/matchCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export default async function MatchCard(props: MatchCardProps) {
<Chip
color="secondary"
size={"small"}
avatar={<Avatar><HiTrophy/></Avatar>}
avatar={
<Avatar src={sport.iconId ? `${process.env.NEXT_PUBLIC_API_URL}/images/${sport.iconId}/file` : undefined}>
{!sport.iconId && <HiTrophy />}
</Avatar>}
/>
</Tooltip>

Expand Down
2 changes: 2 additions & 0 deletions components/match/matchEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ export default function MatchEditor(props: MatchEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">審判</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={judgeTeamId}
Expand All @@ -420,6 +421,7 @@ export default function MatchEditor(props: MatchEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">場所</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={locationId}
Expand Down
8 changes: 6 additions & 2 deletions components/sports/sportCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default function SportCreator() {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">アイコン</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={iconId}
Expand All @@ -91,8 +92,10 @@ export default function SportCreator() {
>
{images.map((image) => (
<MenuItem key={image.id} value={image.id}>
<Avatar src={image.data}/>
{image.id}
<Stack direction={"row"} alignItems={"center"}>
<Avatar src={`${process.env.NEXT_PUBLIC_API_URL}/images/${image.id}/file`}/>
<Typography ml={2}>{image.id}</Typography>
</Stack>
</MenuItem>
))}
</Select>
Expand All @@ -101,6 +104,7 @@ export default function SportCreator() {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">タグ</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={tagId}
Expand Down
8 changes: 6 additions & 2 deletions components/sports/sportEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default function SportEditor(props: SportEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">アイコン</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={iconId}
Expand All @@ -104,8 +105,10 @@ export default function SportEditor(props: SportEditorProps) {
>
{images.map((image) => (
<MenuItem key={image.id} value={image.id}>
<Avatar src={`${process.env.NEXT_PUBLIC_API_URL}/images/${image.id}/file`}/>
{image.id}
<Stack direction={"row"} alignItems={"center"}>
<Avatar src={`${process.env.NEXT_PUBLIC_API_URL}/images/${image.id}/file`}/>
<Typography ml={2}>{image.id}</Typography>
</Stack>
</MenuItem>
))}
</Select>
Expand All @@ -114,6 +117,7 @@ export default function SportEditor(props: SportEditorProps) {
<FormControl fullWidth size={"small"}>
<InputLabel id="demo-simple-select-label">タグ</InputLabel>
<Select
variant={"outlined"}
labelId="demo-simple-select-label"
id="demo-simple-select"
value={tagId}
Expand Down
61 changes: 31 additions & 30 deletions components/theme/colorModeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,42 +128,43 @@ const lightPalette = {
divider: '#7f8cd6',
};

// const darkPalette = {
// mode: 'dark' as PaletteMode, // 型キャストを追加
// primary: {
// main: '#8d95c9',
// dark: '#050925',
// light: '#373e6e',
// },
// secondary: {
// main: '#303560',
// contrastText: '#eff0f8',
// dark: '#262b57',
// light: '#373e6e',
// },
// background: {
// paper: '#22284F',
// default: '#181D3C',
// },
// text: {
// primary: '#eff0f8',
// secondary: '#99a5d6',
// disabled: '#5c628a',
// },
// warning: {
// main: '#b9891a',
// contrastText: 'rgba(253,252,252,0.87)',
// },
// info: { main: '#3a468f' },
// divider: '#373e6e',
// };
const darkPalette = {
mode: 'dark' as PaletteMode, // 型キャストを追加
primary: {
main: '#8d95c9',
dark: '#050925',
light: '#373e6e',
},
secondary: {
main: '#303560',
contrastText: '#eff0f8',
dark: '#262b57',
light: '#373e6e',
},
background: {
paper: '#22284F',
default: '#181D3C',
},
text: {
primary: '#eff0f8',
secondary: '#99a5d6',
disabled: '#5c628a',
},
warning: {
main: '#b9891a',
contrastText: 'rgba(253,252,252,0.87)',
},
info: { main: '#3a468f' },
divider: '#373e6e',
};

export default function ColorModeProvider({ children }: ColorModeProviderProps) {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');

const theme = useMemo(() => createTheme({
...baseTheme,
palette: lightPalette,
palette: prefersDarkMode ? darkPalette : lightPalette,
// palette: lightPalette,
}), [prefersDarkMode]);

return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function fetchWithToken(url: string, options: RequestInit | undefined = {}
}

const mergedOptions: RequestInit = {
cache: "no-cache",
cache: "no-store",
credentials: "include",
...options,
headers: {
Expand Down

0 comments on commit f359974

Please sign in to comment.