Allow configuration through a file and export images automatically
Introduce a configuration file for all settings, remove the web-based config editor, fix the grid display, and add automatic hourly PNG exports. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 0385ea33-cde8-4bbd-8fce-8d192d30eb41 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/870d08ce-da3b-4822-9874-c2fe2b7628b1/0385ea33-cde8-4bbd-8fce-8d192d30eb41/Zffw2vY
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { type Pixel, type InsertPixel, type CanvasConfig, type InsertCanvasConfig, type UserCooldown, type InsertUserCooldown } from "@shared/schema";
|
||||
import { randomUUID } from "crypto";
|
||||
import { config } from "./config";
|
||||
|
||||
export interface IStorage {
|
||||
// Pixel operations
|
||||
@@ -29,13 +30,13 @@ export class MemStorage implements IStorage {
|
||||
this.userCooldowns = new Map();
|
||||
this.config = {
|
||||
id: randomUUID(),
|
||||
canvasWidth: 100,
|
||||
canvasHeight: 100,
|
||||
defaultCooldown: 5,
|
||||
enableAutomaticEvents: false,
|
||||
eventDuration: 30,
|
||||
eventInterval: 6,
|
||||
showGridByDefault: true,
|
||||
canvasWidth: config.canvasWidth,
|
||||
canvasHeight: config.canvasHeight,
|
||||
defaultCooldown: config.defaultCooldown,
|
||||
enableAutomaticEvents: config.enableAutomaticEvents,
|
||||
eventDuration: config.eventDurationMinutes,
|
||||
eventInterval: config.eventIntervalHours,
|
||||
showGridByDefault: config.showGridByDefault,
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user