Updated Dockerfile, renamed config key

This commit is contained in:
2025-02-07 01:14:57 +01:00
parent 6a52546a08
commit 6ba4c1b843
7 changed files with 12 additions and 12 deletions

View File

@ -1,6 +1,6 @@
export default {
name: import.meta.env.VITE_NAME,
development: import.meta.env.VITE_DEVELOPMENT === 'true',
environment: import.meta.env.VITE_ENVIRONMENT,
server_endpoint: import.meta.env.VITE_SERVER_ENDPOINT,
tile_size: {
width: Number(import.meta.env.VITE_TILE_SIZE_WIDTH),

View File

@ -49,7 +49,7 @@ const handleFileUpload = (e: Event) => {
if (!files) return
gameStore.connection?.emit('gm:mapObject:upload', files, (response: boolean) => {
if (!response) {
if (config.development) console.error('Failed to upload object')
if (config.environment === 'development') console.error('Failed to upload map object')
return
}

View File

@ -42,7 +42,7 @@ const elementToScroll = ref()
function newButtonClickHandler() {
gameStore.connection?.emit('gm:sprite:create', {}, (response: boolean) => {
if (!response) {
if (config.development) console.error('Failed to create new sprite')
if (config.environment === 'development') console.error('Failed to create new sprite')
return
}

View File

@ -49,7 +49,7 @@ const handleFileUpload = (e: Event) => {
if (!files) return
gameStore.connection?.emit('gm:tile:upload', files, (response: boolean) => {
if (!response) {
if (config.development) console.error('Failed to upload tile')
if (config.environment === 'development') console.error('Failed to upload tile')
return
}

View File

@ -74,7 +74,7 @@ export const useGameStore = defineStore('game', {
},
initConnection() {
this.connection = io(config.server_endpoint, {
secure: !config.development,
secure: !config.environment.includes('development'),
withCredentials: true,
transports: ['websocket'],
reconnectionAttempts: 5