New toggle under Settings → Behavior → Interactions: "Switch to card's bucket on open (search / link)". When enabled, openDetail calls activateBucket(card.bucket_id) so the board and bucket bar update to show the card's context. Skipped when already on 'all' or the correct bucket. Default off. Uses activateBucket() (from buckets.js) instead of raw state assignment so the bucket-bar highlight tracks the switch. Tests: two cases — setting on switches activeBucket + verifies the bucket-tab.active in the bar matches; setting off leaves the bucket unchanged. Both create/delete probe cards in try/finally and restore the setting + activeBucket in afterEach. Bumps to 1.9.27. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
757 B
PHP
17 lines
757 B
PHP
<?php
|
|
|
|
define('APP_NAME', 'hyprcrd');
|
|
define('APP_VERSION', '1.9.27');
|
|
|
|
// Database path — writable directory, outside webroot
|
|
// DB_PATH / UPLOAD_DIR can be pre-defined by the Electron router for app isolation
|
|
if (!defined('DB_PATH')) define('DB_PATH', __DIR__ . '/data/hyprcrd.db');
|
|
if (!defined('UPLOAD_DIR')) define('UPLOAD_DIR', __DIR__ . '/public/uploads');
|
|
|
|
// Base URL auto-detection (works in Docker and hosted environments)
|
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
|
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
|
$scriptDir = dirname($_SERVER['SCRIPT_NAME']);
|
|
$basePath = ($scriptDir === '/' || $scriptDir === '\\') ? '' : $scriptDir;
|
|
define('BASE_URL', $protocol . '://' . $host . $basePath);
|