mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-04 21:21:54 +02:00
Cloud Profiles (ProfilesPage.tsx):
- Add template visibility control (showInModal flag)
- Eye/EyeOff toggle in templates modal to show/hide templates
- Only templates with showInModal=true appear in preset modals
- Default new templates to showInModal=true in save dialog
- Add preset diff/compare view with two modes:
- Compare button in edit modal (preset vs base)
- Compare mode on main page (two-preset comparison)
- Side-by-side diff with added/removed/changed highlighting
- Stats showing added/removed/changed/same counts
- Search filter and Changes/All toggle
- Type restriction (only compare same preset types)
- Fix array value display (show "value" instead of ["value"])
- Fix printer preset G-code display (format escaped \n as real newlines)
- Fix modal overflow issues with proper flex patterns
- Fix light theme colors for compare selection text
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
from pathlib import Path
|
|
from pydantic_settings import BaseSettings
|
|
|
|
# Application version - single source of truth
|
|
APP_VERSION = "0.1.5b"
|
|
GITHUB_REPO = "maziggy/bambusy"
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "BambuTrack"
|
|
debug: bool = False # Default to production mode
|
|
|
|
# Paths
|
|
base_dir: Path = Path(__file__).resolve().parent.parent.parent.parent
|
|
archive_dir: Path = base_dir / "archive"
|
|
static_dir: Path = base_dir / "static"
|
|
log_dir: Path = base_dir / "logs"
|
|
database_url: str = f"sqlite+aiosqlite:///{base_dir}/bambutrack.db"
|
|
|
|
# Logging
|
|
log_level: str = "INFO" # Override with LOG_LEVEL env var or DEBUG=true
|
|
log_to_file: bool = True # Set to false to disable file logging
|
|
|
|
# API
|
|
api_prefix: str = "/api/v1"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|
|
|
|
# Ensure directories exist
|
|
settings.archive_dir.mkdir(exist_ok=True)
|
|
settings.static_dir.mkdir(exist_ok=True)
|
|
if settings.log_to_file:
|
|
settings.log_dir.mkdir(exist_ok=True)
|