adasd
All checks were successful
Deploy / deploy-staging (push) Successful in 28s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-22 23:49:50 +02:00
parent 23afe81251
commit baa57bb913
5 changed files with 151 additions and 32 deletions

View File

@@ -19,6 +19,33 @@ if (!in_array($view, $allowedViews, true)) {
$view = 'overview';
}
$viewMeta = [
'overview' => [
'label' => 'Ueberblick',
'title' => 'Depot-Ueberblick',
'description' => 'Kennzahlen, Kursverlauf und Performance fuer das ausgewaehlte Depot.',
'nav_description' => 'Marktueberblick, Positionen und gespeicherte Kurse.',
],
'depotverwaltung' => [
'label' => 'Depotverwaltung',
'title' => 'Depotverwaltung',
'description' => 'Depots, Positionen und manuelle Kursdaten zentral verwalten.',
'nav_description' => 'Depots pflegen, FX abrufen und Positionen bearbeiten.',
],
'aktienverwaltung' => [
'label' => 'Aktienverwaltung',
'title' => 'Aktienverwaltung',
'description' => 'Wertpapier-Stammdaten, Suche und Kursverlauf pro Aktie pflegen.',
'nav_description' => 'Ticker, ISIN, Markt und Kursverlauf pro Instrument.',
],
'setup' => [
'label' => 'Setup',
'title' => 'Setup',
'description' => 'API-Zugaenge, Datenbankoptionen und Modulvorgaben verwalten.',
'nav_description' => 'Schluessel, Timeouts und Modulkonfiguration speichern.',
],
];
$assetVersion = static function (string $relativePath): string {
$fullPath = dirname(__DIR__) . '/' . ltrim($relativePath, '/');
$mtime = is_file($fullPath) ? filemtime($fullPath) : false;
@@ -91,10 +118,6 @@ $renderSetup = static function (): void {
}
}
echo module_shell_header('boersenchecker', [
'title' => 'Setup',
'description' => 'Modulkonfiguration, API-Zugang und optionale separate Datenbank.',
]);
?>
<div class="bc-page">
<?php if ($error): ?>
@@ -147,27 +170,73 @@ $renderSetup = static function (): void {
</form>
</section>
</div>
<?= module_shell_footer() ?>
<?php
};
$renderContent = static function () use ($view, $renderSetup): void {
$renderContent = static function () use ($view, $renderSetup, $viewMeta): void {
$currentViewMeta = $viewMeta[$view] ?? $viewMeta['overview'];
$navItems = [
'overview' => '/apps/boersenchecker/index.php?view=overview',
'depotverwaltung' => '/apps/boersenchecker/index.php?view=depotverwaltung',
'aktienverwaltung' => '/apps/boersenchecker/index.php?view=aktienverwaltung',
'setup' => '/apps/boersenchecker/index.php?view=setup',
];
ob_start();
if ($view === 'setup') {
$renderSetup();
} elseif ($view === 'depotverwaltung') {
$page = new \Modules\Boersenchecker\Support\DashboardPage();
module_tpl('boersenchecker', 'dashboard', $page->handle());
} elseif ($view === 'aktienverwaltung') {
$page = new \Modules\Boersenchecker\Support\InstrumentPage();
module_tpl('boersenchecker', 'instruments', $page->handle());
} else {
$page = new \Modules\Boersenchecker\Support\HomePage();
module_tpl('boersenchecker', 'home', $page->handle());
}
$innerContent = (string) ob_get_clean();
?>
<div class="boersenchecker-module-shell window-app-shell">
<?php
if ($view === 'setup') {
$renderSetup();
} elseif ($view === 'depotverwaltung') {
$page = new \Modules\Boersenchecker\Support\DashboardPage();
module_tpl('boersenchecker', 'dashboard', $page->handle());
} elseif ($view === 'aktienverwaltung') {
$page = new \Modules\Boersenchecker\Support\InstrumentPage();
module_tpl('boersenchecker', 'instruments', $page->handle());
} else {
$page = new \Modules\Boersenchecker\Support\HomePage();
module_tpl('boersenchecker', 'home', $page->handle());
}
?>
<div class="window-app-frame bc-frame">
<aside class="window-app-sidebar bc-sidebar">
<div class="window-app-brand bc-brand">
<p class="window-app-kicker bc-kicker">Modul</p>
<h1>Boersenchecker</h1>
<p class="window-app-copy">Depotverwaltung fuer Aktien, Kaufdaten, Kursverlauf und Waehrungsumrechnung im Desktop-Standardlayout.</p>
</div>
<div class="window-app-nav-list bc-nav-list">
<?php foreach ($navItems as $navView => $href): ?>
<?php $meta = $viewMeta[$navView] ?? null; ?>
<?php if (!$meta): continue; endif; ?>
<a
class="window-app-nav-button bc-nav-button<?= $view === $navView ? ' is-active' : '' ?>"
href="<?= e($href) ?>"
>
<strong><?= e((string) $meta['label']) ?></strong>
<span class="window-app-meta"><?= e((string) $meta['nav_description']) ?></span>
</a>
<?php endforeach; ?>
</div>
</aside>
<main class="window-app-main bc-main">
<div class="window-app-panel bc-panel-shell">
<section class="window-app-hero bc-hero">
<div>
<p class="window-app-kicker bc-kicker">Boersenchecker</p>
<h2 class="window-app-title bc-title"><?= e((string) $currentViewMeta['title']) ?></h2>
<p class="window-app-copy"><?= e((string) $currentViewMeta['description']) ?></p>
</div>
<div class="window-app-pill-row bc-pill-row">
<span class="window-app-pill bc-pill">Desktop-App</span>
<span class="window-app-pill bc-pill">Legacy-Migration</span>
<span class="window-app-pill bc-pill">View: <?= e((string) $currentViewMeta['label']) ?></span>
</div>
</section>
<?= $innerContent ?>
</div>
</main>
</div>
</div>
<?php
};
@@ -278,6 +347,7 @@ if ($isPartial) {
.setup-field textarea { min-height: 100px; }
.grid { display:grid; }
</style>
<link rel="stylesheet" href="/assets/desktop/desktop.css">
<link rel="stylesheet" href="/module-assets/index.php?module=boersenchecker&amp;path=assets/boersenchecker.css&amp;v=<?= htmlspecialchars($assetVersion('assets/boersenchecker.css'), ENT_QUOTES) ?>">
</head>
<body>