refactoring
This commit is contained in:
37
config.js
Normal file
37
config.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// config.js
|
||||
export const PUBLIC_VAPID_KEY = 'BKfRJXjSQmAJ452gLwlK_8scGrW6qMU1mBRp39ONtcQHkSsQgmLAaODIyGbgHyRpnDEv3HfXV1oGh3SC0fHxY0E';
|
||||
export const BACKEND_URL = 'https://webpush.virtonline.eu';
|
||||
export const FLIC_BUTTON_ID = 'game-button'; // Example ID, might need configuration
|
||||
export const LOCAL_STORAGE_KEY = 'gameTimerData';
|
||||
|
||||
// Default player settings
|
||||
export const DEFAULT_PLAYER_TIME_SECONDS = 300; // 5 minutes
|
||||
export const DEFAULT_PLAYERS = [
|
||||
{ id: 1, name: 'Player 1', timeInSeconds: DEFAULT_PLAYER_TIME_SECONDS, remainingTime: DEFAULT_PLAYER_TIME_SECONDS, image: null },
|
||||
{ id: 2, name: 'Player 2', timeInSeconds: DEFAULT_PLAYER_TIME_SECONDS, remainingTime: DEFAULT_PLAYER_TIME_SECONDS, image: null }
|
||||
];
|
||||
|
||||
// CSS Classes (optional, but can help consistency)
|
||||
export const CSS_CLASSES = {
|
||||
ACTIVE_PLAYER: 'active-player',
|
||||
INACTIVE_PLAYER: 'inactive-player',
|
||||
TIMER_ACTIVE: 'timer-active',
|
||||
TIMER_FINISHED: 'timer-finished',
|
||||
MODAL_ACTIVE: 'active',
|
||||
CAMERA_ACTIVE: 'active'
|
||||
};
|
||||
|
||||
// Game States
|
||||
export const GAME_STATES = {
|
||||
SETUP: 'setup',
|
||||
RUNNING: 'running',
|
||||
PAUSED: 'paused',
|
||||
OVER: 'over'
|
||||
};
|
||||
|
||||
// Flic Actions
|
||||
export const FLIC_ACTIONS = {
|
||||
SINGLE_CLICK: 'SingleClick',
|
||||
DOUBLE_CLICK: 'DoubleClick',
|
||||
HOLD: 'Hold'
|
||||
};
|
||||
Reference in New Issue
Block a user