is_array($section) )); $assetVersion = static function (string $relativePath): string { $fullPath = __DIR__ . '/' . ltrim($relativePath, '/'); $mtime = is_file($fullPath) ? filemtime($fullPath) : false; return $mtime === false ? '0' : (string) $mtime; }; return [ 'app_id' => 'mining-checker', 'title' => (string) ($manifest['title'] ?? 'Mining-Checker'), 'icon' => 'MC', 'entry_route' => '/apps/mining-checker', 'window_mode' => 'window', 'content_mode' => 'native-module', 'default_width' => 1180, 'default_height' => 760, 'supports_widget' => false, 'supports_tray' => false, 'module_name' => 'finance', 'summary' => (string) ($manifest['description'] ?? 'Vollstaendiger Rechner fuer Mining-Profitabilitaet, Stromkosten, ROI und Snapshot-Historie.'), 'native_module' => [ 'initializer' => 'initMiningCheckerApp', 'options' => [ 'apiBase' => '/api/mining-checker/index.php?path=v1', 'defaultProjectKey' => getenv('MINING_CHECKER_DEFAULT_PROJECT_KEY') ?: 'doge-main', 'activeView' => 'overview', 'sections' => $sections, 'moduleDebugEnabled' => false, ], 'assets' => [ 'styles' => [ ['href' => '/module-assets/index.php?module=mining-checker&path=assets/css/app.css&v=' . rawurlencode($assetVersion('assets/css/app.css'))], ], 'scripts' => [ ['src' => 'https://unpkg.com/react@18/umd/react.production.min.js', 'crossorigin' => true], ['src' => 'https://unpkg.com/react-dom@18/umd/react-dom.production.min.js', 'crossorigin' => true], ['src' => '/module-assets/index.php?module=mining-checker&path=assets/js/app.js&v=' . rawurlencode($assetVersion('assets/js/app.js'))], ], ], ], ];