mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: some more floating component removals
This commit is contained in:
1 parent
9ef6eea4a9
commit
1982604878
3 files changed
+9
-4
No files matched your search
+3
-1
@@ -13,6 +13,7 @@ import Navbar from '../components/Navbar';
|
|||||||
import PageWrapper from '../components/PageWrapper';
|
import PageWrapper from '../components/PageWrapper';
|
||||||
import isDev from '../core/blitzkrieg/isDev';
|
import isDev from '../core/blitzkrieg/isDev';
|
||||||
import { isLocalhost } from '../core/blitzkrieg/isLocalhost';
|
import { isLocalhost } from '../core/blitzkrieg/isLocalhost';
|
||||||
|
import { useFullScreen } from '../hooks/useFullScreen';
|
||||||
import { useApp } from '../stores/app';
|
import { useApp } from '../stores/app';
|
||||||
import { mintTheme } from '../themes/mint';
|
import { mintTheme } from '../themes/mint';
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
|||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const isEmbed = pathname.split('/')[1] === 'embeds';
|
const isEmbed = pathname.split('/')[1] === 'embeds';
|
||||||
const [showDevBuildAlert, setShowDevBuildAlert] = useState(false);
|
const [showDevBuildAlert, setShowDevBuildAlert] = useState(false);
|
||||||
|
const isFullScreen = useFullScreen();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setShowDevBuildAlert(
|
setShowDevBuildAlert(
|
||||||
@@ -100,7 +102,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
|||||||
|
|
||||||
<Flex direction="column">{children}</Flex>
|
<Flex direction="column">{children}</Flex>
|
||||||
|
|
||||||
{!isEmbed && (
|
{!isEmbed && !isFullScreen && (
|
||||||
<PageWrapper>
|
<PageWrapper>
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import {
|
|||||||
import { unionBoundingBox } from '../../../../../../core/blitzkrieg/unionBoundingBox';
|
import { unionBoundingBox } from '../../../../../../core/blitzkrieg/unionBoundingBox';
|
||||||
import { useConsumable } from '../../../../../../hooks/useConsumable';
|
import { useConsumable } from '../../../../../../hooks/useConsumable';
|
||||||
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
import { useEquipment } from '../../../../../../hooks/useEquipment';
|
||||||
|
import { useFullScreen } from '../../../../../../hooks/useFullScreen';
|
||||||
import { useProvision } from '../../../../../../hooks/useProvision';
|
import { useProvision } from '../../../../../../hooks/useProvision';
|
||||||
import { useProvisions } from '../../../../../../hooks/useProvisions';
|
import { useProvisions } from '../../../../../../hooks/useProvisions';
|
||||||
import { mutateDuel, useDuel } from '../../../../../../stores/duel';
|
import { mutateDuel, useDuel } from '../../../../../../stores/duel';
|
||||||
@@ -43,6 +44,7 @@ export function Characteristics() {
|
|||||||
const { tank, turret, gun, engine, track, shell } = useDuel(
|
const { tank, turret, gun, engine, track, shell } = useDuel(
|
||||||
(state) => state.protagonist!,
|
(state) => state.protagonist!,
|
||||||
);
|
);
|
||||||
|
const isFullScreen = useFullScreen();
|
||||||
const hasImprovedVentilation = useEquipment(102);
|
const hasImprovedVentilation = useEquipment(102);
|
||||||
const provisions = useProvisions();
|
const provisions = useProvisions();
|
||||||
const crewMastery = useDuel((state) => state.protagonist!.crewMastery);
|
const crewMastery = useDuel((state) => state.protagonist!.crewMastery);
|
||||||
@@ -260,6 +262,8 @@ export function Characteristics() {
|
|||||||
});
|
});
|
||||||
}, [hasImprovedVerticalStabilizer]);
|
}, [hasImprovedVerticalStabilizer]);
|
||||||
|
|
||||||
|
if (isFullScreen) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="8" style={{ width: '100%' }}>
|
<Flex direction="column" gap="8" style={{ width: '100%' }}>
|
||||||
<Flex direction="column" gap="2">
|
<Flex direction="column" gap="2">
|
||||||
|
|||||||
@@ -65,12 +65,13 @@ export function TankComponentButton({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{children}
|
||||||
|
|
||||||
{discriminator !== undefined && (
|
{discriminator !== undefined && (
|
||||||
<Text
|
<Text
|
||||||
size="1"
|
size="1"
|
||||||
style={{
|
style={{
|
||||||
textShadow: '0 0 4px black',
|
textShadow: '0 0 4px black',
|
||||||
zIndex: 1,
|
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '50%',
|
top: '50%',
|
||||||
right: 8,
|
right: 8,
|
||||||
@@ -81,8 +82,6 @@ export function TankComponentButton({
|
|||||||
{discriminator}
|
{discriminator}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{children}
|
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user