asdasd
This commit is contained in:
@@ -111,6 +111,7 @@ $debugRedirect = isset($_GET['debug_redirect']);
|
||||
<label class="block text-sm text-slate-600">Pfad zur Konfigurationsdatei</label>
|
||||
<input type="text" name="config_file" class="input mt-1" placeholder="../config/database.php">
|
||||
<p class="text-xs text-slate-500 mt-1">Relativ zur Bridge-Datei oder absolut. Die Datei sollte ein Array oder Objekt mit den Zugangsdaten liefern.</p>
|
||||
<button type="button" id="btn-config-example" class="btn mt-2 text-xs" data-role="admin">Beispiel: Array-Mapping</button>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm text-slate-600">Basis-Pfad im Array (optional)</label>
|
||||
@@ -153,9 +154,43 @@ $debugRedirect = isset($_GET['debug_redirect']);
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div id="toast-root"></div>
|
||||
<div id="toast-root"></div>
|
||||
|
||||
<script src="<?= $assetBase ?>/assets/js/toast.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||
<script type="module" src="<?= $assetBase ?>/assets/js/bridge-setup.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||
<dialog id="configExampleDialog" class="rounded-xl max-w-2xl w-[90vw]">
|
||||
<form method="dialog" class="space-y-3">
|
||||
<h3 class="text-lg font-semibold">Beispiel: Mapping einer Config-Datei</h3>
|
||||
<p class="text-sm text-slate-600">Angenommen, deine <code>../config/database.php</code> liefert folgendes Array:</p>
|
||||
<pre class="bg-slate-900 text-slate-100 text-xs p-3 rounded-lg overflow-auto"><?php echo htmlspecialchars(<<<'PHP'
|
||||
<?php
|
||||
return [
|
||||
'database' => [
|
||||
'connections' => [
|
||||
'default' => [
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 3306,
|
||||
'database' => 'kunden_db',
|
||||
'username' => 'dbuser',
|
||||
'password' => 'secret',
|
||||
'charset' => 'utf8mb4',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
PHP, ENT_QUOTES); ?></pre>
|
||||
<p class="text-sm text-slate-600">Dann trägst du ein:</p>
|
||||
<ul class="text-sm text-slate-700 list-disc ps-5">
|
||||
<li><strong>Pfad zur Konfigurationsdatei:</strong> <code>../config/database.php</code></li>
|
||||
<li><strong>Basis-Pfad:</strong> <code>database.connections.default</code></li>
|
||||
<li><strong>Host-/Port-/DB-/User-/Pass-/Charset-Key:</strong> jeweils <code>host</code>, <code>port</code>, <code>database</code>, <code>username</code>, <code>password</code>, <code>charset</code></li>
|
||||
</ul>
|
||||
<p class="text-sm text-slate-600">Die Bridge liest dann automatisch die Werte aus diesem Array und baut daraus den DSN.</p>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn">Verstanden</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<script src="<?= $assetBase ?>/assets/js/toast.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||
<script type="module" src="<?= $assetBase ?>/assets/js/bridge-setup.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user