mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-14 23:17:59 +00:00
fix ios not starting
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "life-trinket",
|
"name": "life-trinket",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useCommanderDamage && (
|
{player.settings.useCommanderDamage && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<CommanderTax size={iconSize} opacity="0.5" />}
|
Icon={<CommanderTax size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.CommanderTax}
|
type={CounterType.CommanderTax}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
@@ -99,7 +99,7 @@ const ExtraCountersBar = ({
|
|||||||
) && (
|
) && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<PartnerTax size={iconSize} opacity="0.5" />}
|
Icon={<PartnerTax size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.PartnerTax}
|
type={CounterType.PartnerTax}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
@@ -112,7 +112,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.usePoison && (
|
{player.settings.usePoison && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Poison size={iconSize} opacity="0.5" />}
|
Icon={<Poison size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Poison}
|
type={CounterType.Poison}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find((counter) => counter.type === 'poison')
|
player.extraCounters?.find((counter) => counter.type === 'poison')
|
||||||
@@ -124,7 +124,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useEnergy && (
|
{player.settings.useEnergy && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Energy size={iconSize} opacity="0.5" />}
|
Icon={<Energy size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Energy}
|
type={CounterType.Energy}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find((counter) => counter.type === 'energy')
|
player.extraCounters?.find((counter) => counter.type === 'energy')
|
||||||
@@ -136,7 +136,7 @@ const ExtraCountersBar = ({
|
|||||||
{player.settings.useExperience && (
|
{player.settings.useExperience && (
|
||||||
<ExtraCounter
|
<ExtraCounter
|
||||||
rotation={player.settings.rotation}
|
rotation={player.settings.rotation}
|
||||||
Icon={<Experience size={iconSize} opacity="0.5" />}
|
Icon={<Experience size={iconSize} opacity="0.5" color="black" />}
|
||||||
type={CounterType.Experience}
|
type={CounterType.Experience}
|
||||||
counterTotal={
|
counterTotal={
|
||||||
player.extraCounters?.find(
|
player.extraCounters?.find(
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from '../../../Data/getInitialPlayers';
|
} from '../../../Data/getInitialPlayers';
|
||||||
import { Player } from '../../../Types/Player';
|
import { Player } from '../../../Types/Player';
|
||||||
import { SupportMe } from '../../Misc/SupportMe';
|
import { SupportMe } from '../../Misc/SupportMe';
|
||||||
import { H2 } from '../../Misc/TextComponents';
|
import { H2, Paragraph } from '../../Misc/TextComponents';
|
||||||
import LayoutOptions from './LayoutOptions';
|
import LayoutOptions from './LayoutOptions';
|
||||||
import { useAnalytics } from '../../../Data/useAnalytics';
|
import { useAnalytics } from '../../../Data/useAnalytics';
|
||||||
|
|
||||||
@@ -108,7 +108,11 @@ const Start = ({
|
|||||||
|
|
||||||
analytics.trackEvent('game_started', { ...initialGameSettings });
|
analytics.trackEvent('game_started', { ...initialGameSettings });
|
||||||
|
|
||||||
document.documentElement.requestFullscreen();
|
try {
|
||||||
|
document.documentElement.requestFullscreen();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
setInitialGameSettings(initialGameSettings);
|
setInitialGameSettings(initialGameSettings);
|
||||||
setPlayers(createInitialPlayers(initialGameSettings));
|
setPlayers(createInitialPlayers(initialGameSettings));
|
||||||
};
|
};
|
||||||
@@ -212,6 +216,11 @@ const Start = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
|
<Paragraph style={{ textAlign: 'center', maxWidth: '75%' }}>
|
||||||
|
If you're on iOS, this page works better if you{' '}
|
||||||
|
<strong>hide the toolbar</strong>
|
||||||
|
</Paragraph>
|
||||||
<StartButtonFooter>
|
<StartButtonFooter>
|
||||||
<Button
|
<Button
|
||||||
size="large"
|
size="large"
|
||||||
|
|||||||
Reference in New Issue
Block a user