Skip to content

Commit 3ce96d0

Browse files
committed
Merge branch 'main' of https://github.com/MC-Dashify/client
2 parents 9a9f4cc + 916cac1 commit 3ce96d0

File tree

12 files changed

+350
-47
lines changed

12 files changed

+350
-47
lines changed

src/App.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import Overview from './routes/Overview';
2323
import Stats from './routes/Stats';
2424
import Worlds from './routes/Worlds';
2525
import Players from './routes/Players';
26+
import BanList from './routes/BanList';
2627
import Traffic from './routes/Traffic';
2728
import Console from './routes/Console';
2829
import Settings from './routes/Settings';
29-
import InstallPWA from './hooks/pwa';
3030
import Update from './routes/Update';
3131

3232
Sentry.init({
@@ -53,7 +53,6 @@ const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes);
5353
const App = () => {
5454
const location = useLocation();
5555
const background = location.state?.background;
56-
const install = InstallPWA();
5756

5857
const [themeState, setThemeState] = useRecoilState(_themeState);
5958

@@ -82,17 +81,18 @@ const App = () => {
8281
<Route path='stats' element={<Stats />} />
8382
<Route path='world' element={<Worlds />} />
8483
<Route path='player' element={<Players />} />
84+
<Route path='banlist' element={<BanList />} />
8585
<Route path='traffic' element={<Traffic />} />
8686
<Route path='console' element={<Console />} />
8787
</Route>
8888
</Route>
8989

90-
<Route path='/settings' element={<Settings install={install} />} />
90+
<Route path='/settings' element={<Settings />} />
9191
</SentryRoutes>
9292

9393
{background && (
9494
<SentryRoutes>
95-
<Route path='/settings' element={<Settings install={install} />} />
95+
<Route path='/settings' element={<Settings />} />
9696
</SentryRoutes>
9797
)}
9898

src/assets/24x-icons.jsx

+67
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,33 @@ const PeopleIcon = (props) => (
106106
</svg>
107107
);
108108

109+
const HammerIcon = (props) => (
110+
<svg
111+
width='24'
112+
height='24'
113+
viewBox='0 0 24 24'
114+
fill='none'
115+
xmlns='http://www.w3.org/2000/svg'
116+
{...props}
117+
>
118+
<rect x='-1.41421' width='12' height='7.00133' rx='1' transform='matrix(-0.707107 -0.707107 -0.707107 0.707107 20.5858 9.89941)' stroke='currentColor' stroke-width={2}/>
119+
<path
120+
opacity='0.4'
121+
d='M10 14L3 21'
122+
stroke='currentColor'
123+
stroke-width={2}
124+
stroke-linecap='round'
125+
/>
126+
<path
127+
opacity='0.4'
128+
d='M18.5 3.5L20.5 5.5'
129+
stroke='currentColor'
130+
stroke-width={2}
131+
stroke-linecap='round'
132+
/>
133+
</svg>
134+
);
135+
109136
const ConsoleIcon = (props) => (
110137
<svg
111138
xmlns='http://www.w3.org/2000/svg'
@@ -394,6 +421,44 @@ const BanIcon = (props) => (
394421
</svg>
395422
);
396423

424+
const PardonIcon = (props) => (
425+
<svg
426+
width='24'
427+
height='24'
428+
viewBox='0 0 24 24'
429+
fill='none'
430+
xmlns='http://www.w3.org/2000/svg'
431+
{...props}
432+
>
433+
<path
434+
fill-rule='evenodd'
435+
clip-rule='evenodd'
436+
d='M19.2937 14.293C19.6842 13.9024 20.3173 13.9023 20.7079 14.2928C21.0984 14.6833 21.0985 15.3165 20.708 15.707L18.9142 17.5012L20.708 19.2954C21.0985 19.686 21.0985 20.3191 20.7079 20.7096C20.3173 21.1001 19.6842 21.1 19.2937 20.7095L17.5001 18.9156L15.7066 20.7095C15.3161 21.1 14.6829 21.1001 14.2924 20.7096C13.9018 20.3191 13.9017 19.686 14.2922 19.2954L16.086 17.5012L14.2922 15.707C13.9017 15.3165 13.9018 14.6833 14.2924 14.2928C14.6829 13.9023 15.3161 13.9024 15.7066 14.293L17.5001 16.0869L19.2937 14.293Z'
437+
fill='currentColor'
438+
/>
439+
<path
440+
opacity='0.4'
441+
d='M10.5 13.5L3 21'
442+
stroke='currentColor'
443+
stroke-width={2}
444+
stroke-linecap='round'
445+
/>
446+
<path
447+
opacity='0.4'
448+
d='M18.5 3.5L20.5 5.5'
449+
stroke='currentColor'
450+
stroke-width={2}
451+
stroke-linecap='round'
452+
/>
453+
<path
454+
fill-rule='evenodd'
455+
clip-rule='evenodd'
456+
d='M21.842 11.9998C22.3547 11.2235 22.2693 10.1684 21.5858 9.48498L14.5147 2.41391C13.7337 1.63286 12.4674 1.63286 11.6863 2.41391L8.85788 5.24234C8.07683 6.02339 8.07683 7.28972 8.85788 8.07077L12.7869 11.9998H21.842Z'
457+
fill='currentColor'
458+
/>
459+
</svg>
460+
);
461+
397462
const SendAndReceiveIcon = (props) => (
398463
<svg
399464
xmlns='http://www.w3.org/2000/svg'
@@ -438,6 +503,7 @@ export {
438503
ServerIcon,
439504
EarthIcon,
440505
PeopleIcon,
506+
HammerIcon,
441507
ConsoleIcon,
442508
TopBottomArrowIcon,
443509
CogIcon,
@@ -447,6 +513,7 @@ export {
447513
TimerIcon,
448514
KickIcon,
449515
BanIcon,
516+
PardonIcon,
450517
SendAndReceiveIcon,
451518
SendIcon,
452519
ReceiveIcon

src/components/common/ProfileCreateForm.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const ProfileCreateForm = ({
283283
<Connection
284284
profile={{
285285
uuid: uuid4(),
286-
name: profileName,
286+
name: profileName.trim() || '로컬호스트',
287287
address: serverAddress || 'localhost',
288288
port: Number.parseInt(serverPort) || 8080,
289289
key: securityKey,

src/components/common/ProfileList.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const ProfileItem = ({
208208
{isEditing && currentProfile.uuid !== uuid && (
209209
<>
210210
<EditModeButton
211-
onClick={(uuid) => {
211+
onClick={() => {
212212
Profile.delete(uuid);
213213
toast.success('성공적으로 프로필을 삭제했습니다!');
214214
updateProfile();

src/components/common/Searchbar.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const Searchbar = ({
6060
styles={{
6161
control: (baseStyles) => ({
6262
...baseStyles,
63+
cursor: 'pointer',
6364
backgroundColor: 'transparent',
6465
border: 'none',
6566
borderRadius: '12px',

src/components/dashboard/DashboardPageTitle.jsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const DashboardPageTitle = ({ reloadTask }) => {
120120
autoRefreshOptions.find((option) => option.value === refreshRate) ??
121121
autoRefreshOptions[4];
122122

123-
const theme = useContext(ThemeContext)
123+
const theme = useContext(ThemeContext);
124124

125125
return (
126126
<Section>
@@ -157,18 +157,23 @@ const DashboardPageTitle = ({ reloadTask }) => {
157157
styles={{
158158
control: (style) => ({
159159
...style,
160+
cursor: 'pointer',
160161
background: 'transparent',
161162
border: 'none',
162163
height: '24px'
163164
}),
164165
menu: (style) => ({
165166
...style,
167+
cursor: 'pointer',
166168
background: theme.input.bg
167169
}),
168170
option: (styles, { isFocused, isSelected }) => ({
169171
...styles,
172+
cursor: 'pointer',
170173
color: theme.text,
171-
backgroundColor: isSelected ? theme.input.selectBg : theme.input.bg,
174+
backgroundColor: isSelected
175+
? theme.input.selectBg
176+
: theme.input.bg,
172177
'&:hover, &:active': { backgroundColor: theme.input.hoverBg }
173178
}),
174179
indicatorSeparator: () => ({

src/contexts/states.js

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const playersState = atom({
1515
default: {}
1616
});
1717

18+
const banListState = atom({
19+
key: 'banList',
20+
default: {}
21+
});
22+
1823
const profilesState = atom({
1924
key: 'profiles',
2025
default: []
@@ -63,6 +68,7 @@ export {
6368
hideAddressState,
6469
worldsState,
6570
playersState,
71+
banListState,
6672
lastSentCommandsState,
6773
trafficState,
6874
trapPauseState,

src/hooks/pwa.jsx

-34
This file was deleted.

0 commit comments

Comments
 (0)