* Orphaned items now use mediaTile() instead of a hand-written triple-
ternary, so audio and PDF files render with the same icon/player tile
as linked items. Eliminates the code duplication that caused audio
files to fall through to the <img> path in the orphaned section.
* applyFilter() tracks visibleCount after toggling item display. When
the active filter hides every item (e.g. "Audio" tab with no audio
files) but total assets exist, a type-specific placeholder is shown:
matching icon (ph-image / ph-music-note / ph-file-pdf) + "no {type}
assets" text. Hidden again on the next filter switch that has results.
* Section header hide logic narrowed to [data-section]:not(.gallery-item)
so it only targets the header divs, not the items themselves.
chore: bump version to 0.9.19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
566 B
PHP
15 lines
566 B
PHP
<?php
|
|
|
|
define('APP_NAME', 'hyprcrd');
|
|
define('APP_VERSION', '0.9.19');
|
|
|
|
// Database path — writable directory, outside webroot
|
|
define('DB_PATH', __DIR__ . '/data/hyprcrd.db');
|
|
|
|
// 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);
|