Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: atomy/mannco-mastermind
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.1
Choose a base ref
...
head repository: atomy/mannco-mastermind
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

There isn’t anything to compare.

1.0.1 and main are entirely different commit histories.

1 change: 0 additions & 1 deletion src/renderer/components/PlayerTableRow.tsx
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ import plusrepImage from '@assets/banners/plusrep.png';
import cheatImage from '@assets/banners/cheat.png';
import getCountryCode from '@components/GetCountryCode';
import SteamPlaytime from '@components/SteamPlaytime';
import SteamTF2Playtime from './SteamTF2Playtime';

const StyledTableCell = styled(TableCell)({
paddingTop: '4px',
41 changes: 25 additions & 16 deletions src/renderer/components/footer/BottomBox.tsx
Original file line number Diff line number Diff line change
@@ -13,26 +13,33 @@ const containerStyleOpen = {
position: 'absolute',
bottom: 0,
left: 0,
width: '99vw',
width: '100vw',
height: '320px',
overflowY: 'scroll', // Add this to enable scrolling if the content exceeds the box height
backgroundColor: '#5b7a8c',
color: '#f5e7de',
borderRadius: 0,
border: 'none',
display: 'flex',
flexDirection: 'column',
} as React.CSSProperties;

const containerStyleClose = {
position: 'absolute',
bottom: 0,
left: 0,
width: '99vw',
width: '100vw',
maxHeight: '400px',
overflowY: 'scroll', // Add this to enable scrolling if the content exceeds the box height
backgroundColor: '#5b7a8c',
color: '#f5e7de',
borderRadius: 0,
border: 'none',
display: 'flex',
flexDirection: 'column',
} as React.CSSProperties;

const contentStyle = {
overflowY: 'auto',
height: '100%',
} as React.CSSProperties;

export default function BottomBox(props: {
@@ -56,18 +63,20 @@ export default function BottomBox(props: {
setSelectedButton(buttonName);
}}
/>
{selectedButton === 'CONSOLE' && (
<BottomBoxConsole logs={consoleContent} />
)}
{selectedButton === 'ALL' && <BottomBoxAll logs={consoleContent} />}
{selectedButton === 'CHAT' && <BottomBoxChat logs={chatContent} />}
{selectedButton === 'FRAGS' && <BottomBoxFrags frags={fragContent} />}
{selectedButton === 'CLASSES-MINE' && (
<BottomBoxTeamClasses players={players} ownTeam />
)}
{selectedButton === 'CLASSES-OTHER' && (
<BottomBoxTeamClasses players={players} ownTeam={false} />
)}
<div style={contentStyle}>
{selectedButton === 'CONSOLE' && (
<BottomBoxConsole logs={consoleContent} />
)}
{selectedButton === 'ALL' && <BottomBoxAll logs={consoleContent} />}
{selectedButton === 'CHAT' && <BottomBoxChat logs={chatContent} />}
{selectedButton === 'FRAGS' && <BottomBoxFrags frags={fragContent} />}
{selectedButton === 'CLASSES-MINE' && (
<BottomBoxTeamClasses players={players} ownTeam />
)}
{selectedButton === 'CLASSES-OTHER' && (
<BottomBoxTeamClasses players={players} ownTeam={false} />
)}
</div>
</div>
);
}
32 changes: 20 additions & 12 deletions src/renderer/components/footer/NavigationBar.tsx
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@ const navigationBarStyle = {
display: 'flex',
flexDirection: 'row',
alignItems: 'flex-start',
position: 'sticky',
top: 0,
zIndex: 1000,
width: '100%',
} as React.CSSProperties;

// Define the prop types, including children
@@ -52,18 +56,22 @@ function NavigationBar({
>
FRAGS
</NavigationButton>
<NavigationButton
onClick={() => handleNavigationClick('CLASSES-MINE')}
selected={selectedButton === 'CLASSES-MINE'}
>
CLASSES-MINE
</NavigationButton>
<NavigationButton
onClick={() => handleNavigationClick('CLASSES-OTHER')}
selected={selectedButton === 'CLASSES-OTHER'}
>
CLASSES-OTHER
</NavigationButton>
{(window as any).electronAPI.sourceGame === 'TF2' && (
<>
<NavigationButton
onClick={() => handleNavigationClick('CLASSES-MINE')}
selected={selectedButton === 'CLASSES-MINE'}
>
CLASSES-MINE
</NavigationButton>
<NavigationButton
onClick={() => handleNavigationClick('CLASSES-OTHER')}
selected={selectedButton === 'CLASSES-OTHER'}
>
CLASSES-OTHER
</NavigationButton>
</>
)}
<NavigationButton
onClick={() => handleNavigationClick('NONE')}
selected={selectedButton === 'NONE'}
4 changes: 3 additions & 1 deletion src/renderer/components/footer/NavigationButton.tsx
Original file line number Diff line number Diff line change
@@ -16,18 +16,20 @@ type NavigationButtonProps = {
onClick: () => void;
selected: boolean;
children: ReactNode;
disabled?: boolean;
};

// Use a function declaration for the component
function NavigationButton({
onClick,
selected,
children,
disabled = false,
}: NavigationButtonProps) {
const buttonStyle = selected ? { ...baseStyle, ...selectedStyle } : baseStyle;

return (
<Button style={buttonStyle} onClick={onClick}>
<Button style={buttonStyle} onClick={onClick} disabled={disabled}>
{children}
</Button>
);