- detail banner timeAgo: SQLite timestamps are UTC without tz marker, JS was parsing them as local. Fixed by appending Z when absent — same pattern chat uses. "2h ago" for a 30s-old update is gone. - banner Reload button now re-fires detail.opened so the collab-buckets plugin clears the red dot on the board card and calls mark-card-seen. Dismiss (×) still leaves the dot — that's the acknowledgement that nothing was actually read. - instrument /api/relay/poll with a sync_debug field so the JS can console.debug what happened on the sync-events sub-request (status, count, error body). Helps diagnose "no toast" reports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
756 B
PHP
17 lines
756 B
PHP
<?php
|
|
|
|
define('APP_NAME', 'hyprcrd');
|
|
define('APP_VERSION', '1.8.1');
|
|
|
|
// 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);
|