Skip to content

Commit

Permalink
chore: renamed live console page file + small stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed May 9, 2024
1 parent ce5b9cc commit 3478d04
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 27 deletions.
17 changes: 3 additions & 14 deletions docs/dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
- [x] better random id (no random id? stable-hash?)
- [x] settings enforce unique id
- [x] added filters to the in-game playerlist
- [x] remove old live console page
- [ ] migrate system logs page & remove xterm files
- [ ] NEW PAGE: Dashboard
- [ ] new performance chart
- [ ] number callouts from legacy players page
Expand Down Expand Up @@ -120,7 +122,7 @@ https://github.com/citizenfx/fivem/commit/84f724ed04d07e0b3a765601ad19ce54412f13
- [ ] Whitelist
- [ ] Admins
- [ ] Settings
- [ ] Maste Actions
- [ ] Master Actions
- [ ] Diagnostics (TODO:)
- [ ] System Logs (TODO:)

Expand Down Expand Up @@ -831,19 +833,6 @@ To check of admin perm, just do `IsPlayerAceAllowed(src, 'txadmin.xxxxxx')`
- have two different status: visited (arr of admins), closed (admin that closed)
- this one is worth having discordwebhook

References (get usage count):
https://forum.cfx.re/t/release-admin-reply-report-command/73894
https://forum.cfx.re/t/release-esx-ban-warning-help-assist-system/786080
https://forum.cfx.re/t/release-badgerreports-reports-through-discord-and-in-game/1145714/1
https://forum.cfx.re/t/release-fivem-advanced-reports-system/1798535
https://forum.cfx.re/t/esx-advanced-report/1636000
https://forum.cfx.re/t/standalone-esx-reportsystem-a-completely-innovative-report-system-paid/3710522
https://forum.cfx.re/t/free-esx-simple-mysql-reports-system/3555465
https://forum.cfx.re/t/paid-esx-new-advanced-report-system/4774382
https://forum.cfx.re/t/standalone-advanced-report-system/4774403/1




=======================================

Expand Down
15 changes: 8 additions & 7 deletions nui/src/components/PlayersPage/PlayerPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,21 @@ export const PlayerPageHeader: React.FC = () => {
setSearchVal(playerSearch);
}, [playerSearch]);


const playerTranslation = t("nui_menu.page_players.misc.players");
const oneSyncStatus = serverCtx.oneSync.status
? `OneSync (${serverCtx.oneSync.type})`
: `OneSync Off`;
const playerCountText = `${allPlayers.length}/${serverCtx.maxClients} ${playerTranslation} - ${oneSyncStatus}`;

return (
<Box display="flex" justifyContent="space-between">
<Box px={2}>
<TypographyTitle variant="h5" color="primary">
{t("nui_menu.page_players.misc.online_players")}
</TypographyTitle>
<TypographyPlayerCount>
{`${allPlayers.length}/${serverCtx.maxClients} ${t(
"nui_menu.page_players.misc.players"
)} - ${
serverCtx.oneSync.status
? `OneSync (${serverCtx.oneSync.type})`
: `OneSync Off`
}`}
{playerCountText}
</TypographyPlayerCount>
</Box>
<Box display="flex" alignItems="center" justifyContent="center" gap={3}>
Expand Down
3 changes: 2 additions & 1 deletion nui/src/hooks/useNuiEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const useNuiEvent = <T = any>(

if (savedHandler.current && savedHandler.current.call) {
if (eventAction === action) {
debugLog(action, data, "NuiMessageReceived");
//omg this is so annoying!!!
// debugLog(action, data, "NuiMessageReceived");
savedHandler.current(data);
}
}
Expand Down
4 changes: 2 additions & 2 deletions panel/src/layout/MainRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { navigate as setLocation } from 'wouter/use-location';
import Iframe from "@/pages/Iframe";
import NotFound from "@/pages/NotFound";
import TestingPage from "@/pages/TestingPage/TestingPage";
import LiveConsole from "@/pages/LiveConsole/LiveConsole";
import LiveConsolePage from "@/pages/LiveConsole/LiveConsolePage";
import PlayersPage from "@/pages/Players/PlayersPage";
import HistoryPage from "@/pages/History/HistoryPage";
import BanTemplatesPage from "@/pages/BanTemplates/BanTemplatesPage";
Expand Down Expand Up @@ -98,7 +98,7 @@ const allRoutes: RouteType[] = [
{
path: '/server/console',
title: 'Live Console',
children: <LiveConsole />
children: <LiveConsolePage />
},
{
path: '/server/resources',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const cleanTermOutput = (data: string) => {
.replace(regexColors, '');
}

export default function LiveConsole() {
export default function LiveConsolePage() {
const [isSaveSheetOpen, setIsSaveSheetOpen] = useState(false);
const [isConnected, setIsConnected] = useState(false);
const [showSearchBar, setShowSearchBar] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions panel/src/pages/TestingPage/TestingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function TestingPage() {

return <div className="flex flex-col gap-4 w-full">
{/* <TmpTestTables /> */}
{/* <TmpFiller /> */}
<TmpFiller />
{/* <TmpApi /> */}
{/* <TmpToasts /> */}
{/* <TmpSocket /> */}
Expand All @@ -26,6 +26,6 @@ export default function TestingPage() {
{/* <TmpMarkdown /> */}
{/* <TmpColors /> */}
{/* <TmpDndSortable /> */}
<BanTemplatesPage />
{/* <BanTemplatesPage /> */}
</div>;
}

0 comments on commit 3478d04

Please sign in to comment.