v.1.1 순서변경.
홈화면에 업데이트 내역 추가
This commit is contained in:
parent
f0b482aea6
commit
933469f82f
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>숙제노기</title>
|
<title>숙제노기</title>
|
||||||
<script type="module" crossorigin src="/assets/index.D8OG0Kkt.js"></script>
|
<script type="module" crossorigin src="/assets/index.B5twrJS6.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { Box, Card, CardContent, Typography, Container, Grid } from '@mui/material'
|
import { Box, Card, CardContent, Typography, Container } from '@mui/material'
|
||||||
|
import { Grid } from '@mui/material'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import api from '../lib/api'
|
import api from '../lib/api'
|
||||||
@ -40,47 +41,49 @@ function SortableCharacterCard({ character }: { character: Character }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid item xs={12} sm={6} md={4} ref={setNodeRef} style={style}>
|
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
|
||||||
<Card
|
<Box ref={setNodeRef} style={style}>
|
||||||
sx={{
|
<Card
|
||||||
cursor: 'pointer',
|
|
||||||
textDecoration: 'none',
|
|
||||||
position: 'relative',
|
|
||||||
}}
|
|
||||||
onClick={() => navigate(`/characters/${character.id}/edit`)}
|
|
||||||
>
|
|
||||||
{/* 드래그 핸들 */}
|
|
||||||
<Box
|
|
||||||
{...attributes}
|
|
||||||
{...listeners}
|
|
||||||
sx={{
|
sx={{
|
||||||
position: 'absolute',
|
cursor: 'pointer',
|
||||||
top: 8,
|
textDecoration: 'none',
|
||||||
right: 8,
|
position: 'relative',
|
||||||
width: 24,
|
|
||||||
height: 24,
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
backgroundColor: 'rgba(0,0,0,0.1)',
|
|
||||||
borderRadius: '50%',
|
|
||||||
cursor: 'grab',
|
|
||||||
zIndex: 10,
|
|
||||||
}}
|
}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={() => navigate(`/characters/${character.id}/edit`)}
|
||||||
>
|
>
|
||||||
<DragIndicatorIcon fontSize="small" />
|
{/* 드래그 핸들 */}
|
||||||
</Box>
|
<Box
|
||||||
|
{...attributes}
|
||||||
|
{...listeners}
|
||||||
|
sx={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 8,
|
||||||
|
right: 8,
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
backgroundColor: 'rgba(0,0,0,0.1)',
|
||||||
|
borderRadius: '50%',
|
||||||
|
cursor: 'grab',
|
||||||
|
zIndex: 10,
|
||||||
|
}}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<DragIndicatorIcon fontSize="small" />
|
||||||
|
</Box>
|
||||||
|
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Typography variant="h6">{character.name}</Typography>
|
<Typography variant="h6">{character.name}</Typography>
|
||||||
<Typography color="text.secondary">서버: {character.server || '-'}</Typography>
|
<Typography color="text.secondary">서버: {character.server || '-'}</Typography>
|
||||||
<Typography color="text.secondary">직업: {character.job || '-'}</Typography>
|
<Typography color="text.secondary">직업: {character.job || '-'}</Typography>
|
||||||
<Typography color="text.secondary">
|
<Typography color="text.secondary">
|
||||||
전투력: {character.combat_power?.toLocaleString() || '-'}
|
전투력: {character.combat_power?.toLocaleString() || '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -122,7 +125,7 @@ export default function CharacterList() {
|
|||||||
{characters.map((char) => (
|
{characters.map((char) => (
|
||||||
<SortableCharacterCard key={char.id} character={char} />
|
<SortableCharacterCard key={char.id} character={char} />
|
||||||
))}
|
))}
|
||||||
<Grid component="div" item xs={12} sm={6} md={4}>
|
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
|
||||||
<Card
|
<Card
|
||||||
onClick={() => (window.location.href = '/characters/register')}
|
onClick={() => (window.location.href = '/characters/register')}
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function SortableHomeworkCard({ homework }: { homework: HomeworkType }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid component="div" item xs={12} sm={6} md={4} ref={setNodeRef} style={style}>
|
<Grid item xs={12} sm={6} md={4} ref={setNodeRef} style={style} {...({} as any)}>
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
@ -120,7 +120,7 @@ export default function HomeworkList() {
|
|||||||
{homeworks.map((hw) => (
|
{homeworks.map((hw) => (
|
||||||
<SortableHomeworkCard key={hw.id} homework={hw} />
|
<SortableHomeworkCard key={hw.id} homework={hw} />
|
||||||
))}
|
))}
|
||||||
<Grid item xs={12} sm={6} md={4}>
|
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
|
||||||
<Card
|
<Card
|
||||||
onClick={() => (window.location.href = '/homeworks/register')}
|
onClick={() => (window.location.href = '/homeworks/register')}
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user