17 ? 'settings-text-container-long' : ''}`} style={{ width }} {...divProps}>
+
= ({
diff --git a/src/react/TouchAreasControls.tsx b/src/react/TouchAreasControls.tsx
index 469097bd..ec9d201b 100644
--- a/src/react/TouchAreasControls.tsx
+++ b/src/react/TouchAreasControls.tsx
@@ -1,6 +1,5 @@
import { CSSProperties, PointerEvent, useEffect, useRef, useState } from 'react'
import { proxy, ref, useSnapshot } from 'valtio'
-import activatableItemsMobile from 'mineflayer-mouse/dist/activatableItemsMobile'
import { contro } from '../controls'
import { options } from '../optionsStorage'
import PixelartIcon from './PixelartIcon'
@@ -73,12 +72,10 @@ export default ({ setupActive, closeButtonsSetup, foregroundGameActive }: Props)
break: false,
jump: bot?.getControlState('jump'),
}[name]
- const RIGHT_MOUSE_BUTTON = 2
- const LEFT_MOUSE_BUTTON = 0
const holdDown = {
action () {
if (!bot) return
- document.dispatchEvent(new MouseEvent('mousedown', { button: RIGHT_MOUSE_BUTTON }))
+ document.dispatchEvent(new MouseEvent('mousedown', { button: 2 }))
bot.mouse.update()
},
sneak () {
@@ -90,7 +87,7 @@ export default ({ setupActive, closeButtonsSetup, foregroundGameActive }: Props)
},
break () {
if (!bot) return
- document.dispatchEvent(new MouseEvent('mousedown', { button: LEFT_MOUSE_BUTTON }))
+ document.dispatchEvent(new MouseEvent('mousedown', { button: 0 }))
bot.mouse.update()
active = true
},
@@ -104,7 +101,7 @@ export default ({ setupActive, closeButtonsSetup, foregroundGameActive }: Props)
}
const holdUp = {
action () {
- document.dispatchEvent(new MouseEvent('mouseup', { button: RIGHT_MOUSE_BUTTON }))
+ document.dispatchEvent(new MouseEvent('mouseup', { button: 2 }))
},
sneak () {
void contro.emit('release', {
@@ -115,7 +112,7 @@ export default ({ setupActive, closeButtonsSetup, foregroundGameActive }: Props)
},
break () {
if (!bot) return
- document.dispatchEvent(new MouseEvent('mouseup', { button: LEFT_MOUSE_BUTTON }))
+ document.dispatchEvent(new MouseEvent('mouseup', { button: 0 }))
bot.mouse.update()
active = false
},
diff --git a/src/react/appStorageProvider.ts b/src/react/appStorageProvider.ts
index fd469186..bce6feca 100644
--- a/src/react/appStorageProvider.ts
+++ b/src/react/appStorageProvider.ts
@@ -91,14 +91,6 @@ const setCookieValue = (key: string, value: string): boolean => {
}
document.cookie = cookie
-
- // Verify the cookie was actually saved by reading it back
- const savedValue = getCookieValue(key)
- if (savedValue !== value) {
- console.warn(`Cookie verification failed for key '${key}'. Expected: ${value}, Got: ${savedValue}`)
- return false
- }
-
return true
} catch (error) {
console.error(`Failed to set cookie for key '${key}':`, error)
@@ -237,19 +229,12 @@ export const getRandomUsername = (appConfig: AppConfig) => {
export const appStorage = proxy({ ...defaultStorageData })
-// Track if cookies failed in this session
-let cookiesFailedThisSession = false
-
// Check if cookie storage should be used (will be set by options)
const shouldUseCookieStorage = () => {
- // If cookies failed this session, don't try again
- if (cookiesFailedThisSession) {
- return false
- }
-
+ const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
const isSecureCookiesAvailable = () => {
// either https or localhost
- return window.location.protocol === 'https:' || (window.location.hostname === 'localhost')
+ return window.location.protocol === 'https:' || (window.location.hostname === 'localhost' && !isSafari)
}
if (!isSecureCookiesAvailable()) {
return false
@@ -360,10 +345,8 @@ const saveKey = (key: keyof StorageData) => {
// Remove from localStorage if cookie save was successful
markLocalStorageAsMigrated(key)
} else {
- // Cookie save failed, disable cookies for this session and fallback to localStorage
- console.warn(`Cookie save failed for key '${key}', disabling cookies for this session`)
- cookiesFailedThisSession = true
- useLocalStorage = true
+ // Disabling for now so no confusing conflicts modal after page reload
+ // useLocalStorage = true
}
}
}
diff --git a/src/reactUi.tsx b/src/reactUi.tsx
index 6339686e..b15cb79d 100644
--- a/src/reactUi.tsx
+++ b/src/reactUi.tsx
@@ -66,9 +66,6 @@ import CreditsAboutModal from './react/CreditsAboutModal'
import GlobalOverlayHints from './react/GlobalOverlayHints'
import FullscreenTime from './react/FullscreenTime'
import StorageConflictModal from './react/StorageConflictModal'
-import FireRenderer from './react/FireRenderer'
-import MonacoEditor from './react/MonacoEditor'
-import OverlayModelViewer from './react/OverlayModelViewer'
const isFirefox = ua.getBrowser().name === 'Firefox'
if (isFirefox) {
@@ -174,7 +171,6 @@ const InGameUi = () => {
- {!disabledUiParts.includes('fire') &&
}
@@ -250,6 +246,7 @@ const App = () => {