mining checker
All checks were successful
Deploy / deploy-staging (push) Successful in 27s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-21 00:14:19 +02:00
parent 2cdd14c400
commit b81de785ac
63 changed files with 11549 additions and 1338 deletions

View File

@@ -0,0 +1,97 @@
<?php
declare(strict_types=1);
require_once dirname(__DIR__, 3) . '/src/App/bootstrap.php';
require_once dirname(__DIR__) . '/bootstrap.php';
use ModulesCore\ModuleHttp;
session_start();
$projectRoot = dirname(__DIR__, 3);
ModuleHttp::requireDesktopAccess($projectRoot);
$design = [];
$designRaw = is_file(dirname(__DIR__) . '/design.json') ? file_get_contents(dirname(__DIR__) . '/design.json') : false;
if ($designRaw !== false) {
$decoded = json_decode($designRaw, true);
$design = is_array($decoded) ? $decoded : [];
}
$moduleConfig = require dirname(__DIR__) . '/config/module.php';
$defaultProjectKey = (string) ($moduleConfig['default_project_key'] ?? 'doge-main');
$sections = is_array($design['sections'] ?? null) ? $design['sections'] : [];
$activeView = trim((string) ($_GET['view'] ?? 'overview'));
$sectionKeys = array_values(array_filter(array_map(
static fn (mixed $section): string => is_array($section) ? trim((string) ($section['key'] ?? '')) : '',
$sections
)));
if ($sectionKeys === []) {
$sectionKeys = ['overview'];
}
if (!in_array($activeView, $sectionKeys, true)) {
$activeView = $sectionKeys[0];
}
$sectionsJson = json_encode($sections, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
?><!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mining-Checker</title>
<style>
:root {
color-scheme: light;
--surface: rgba(255, 255, 255, 0.92);
--line: rgba(148, 163, 184, 0.24);
--text: #0f172a;
--muted: #475569;
--brand-accent: #14b8a6;
--brand-accent-3: #0f766e;
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}
* {
box-sizing: border-box;
}
html,
body {
min-height: 100%;
}
body {
margin: 0;
background:
radial-gradient(circle at top left, rgba(45, 212, 191, 0.12), transparent 24%),
linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
color: var(--text);
}
.mining-module-shell {
min-height: 100vh;
padding: 18px;
}
</style>
<link rel="stylesheet" href="/module-assets/index.php?module=mining-checker&amp;path=assets/css/app.css">
</head>
<body data-module-debug-enabled="0">
<div class="mining-module-shell">
<div
id="mining-checker-app"
data-default-project-key="<?= htmlspecialchars($defaultProjectKey, ENT_QUOTES) ?>"
data-api-base="/api/mining-checker/index.php/v1"
data-active-view="<?= htmlspecialchars($activeView, ENT_QUOTES) ?>"
data-sections-json="<?= htmlspecialchars(is_string($sectionsJson) ? $sectionsJson : '[]', ENT_QUOTES) ?>"
></div>
</div>
<script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
<script src="/module-assets/index.php?module=mining-checker&amp;path=assets/js/app.js"></script>
</body>
</html>