@@ -5,7 +5,7 @@ import i18next from 'i18next'
55import { z } from 'zod'
66import { DOMCacheGetOrSet } from './Cache/DOM'
77import { calculateAmbrosiaGenerationSpeed , calculateOffline , calculateRedAmbrosiaGenerationSpeed } from './Calculate'
8- import { dev , device , platform } from './Config'
8+ import { platform } from './Config'
99import { updateGlobalsIsEvent } from './Event'
1010import { addTimers , automaticTools } from './Helper'
1111import { exportData , importSynergism , saveFilename } from './ImportExport'
@@ -298,15 +298,15 @@ async function fetchMeRoute () {
298298
299299 // Build headers - include token for mobile auth
300300 const headers : HeadersInit = { }
301- if ( device === 'mobile' ) {
301+ if ( platform === 'mobile' ) {
302302 const token = localStorage . getItem ( 'synergism_token' )
303303 if ( token ) {
304304 headers . Authorization = `Bearer ${ token } `
305305 }
306306 }
307307
308308 return await fetch ( 'https://synergism.cc/api/v1/users/me' , {
309- credentials : device === 'browser' ? 'same-origin' : undefined ,
309+ credentials : platform === 'browser' ? 'same-origin' : undefined ,
310310 headers
311311 } ) . catch ( ( ) => fallback )
312312}
@@ -337,7 +337,7 @@ export async function handleLogin () {
337337 loggedIn = hasAccount ( account )
338338 subscription = sub
339339
340- if ( location . hostname !== 'synergism.cc' && platform === 'browser' && device === 'browser' ) {
340+ if ( location . hostname !== 'synergism.cc' && platform === 'browser' ) {
341341 subtabElement . innerHTML =
342342 'Login is not available here, go to <a href="https://synergism.cc">https://synergism.cc</a> instead!'
343343 } else if ( hasAccount ( account ) ) {
@@ -557,7 +557,7 @@ export async function handleLogin () {
557557 eventBonusesChevron . style . transform = isCollapsed ? 'rotate(0deg)' : 'rotate(-90deg)'
558558 } )
559559 } else if ( ! hasAccount ( account ) ) {
560- if ( device !== 'mobile' ) {
560+ if ( platform !== 'mobile' ) {
561561 // User is not logged in
562562 subtabElement . querySelector ( '#open-register' ) ?. addEventListener ( 'click' , ( ) => {
563563 subtabElement . querySelector < HTMLElement > ( '#register' ) ?. style . setProperty ( 'display' , 'flex' )
@@ -864,7 +864,7 @@ export const renderCaptcha = platform === 'steam'
864864 * Sign in with Apple
865865 */
866866export async function signInWithApple ( ) : Promise < void > {
867- if ( device !== 'mobile' ) {
867+ if ( platform !== 'mobile' ) {
868868 return
869869 }
870870
0 commit comments