Restore DBGate beside Adminer
This commit is contained in:
@@ -51,6 +51,14 @@ export function loadConfig({ configPath = "config/local.json", dryRun } = {}) {
|
||||
|| "chromium",
|
||||
).toLowerCase(),
|
||||
},
|
||||
dbGate: {
|
||||
url: env.DBGATE_URL || config.dbGate?.url || "http://127.0.0.1:3000",
|
||||
browserEngine: String(
|
||||
env.DBGATE_BROWSER_ENGINE
|
||||
|| config.dbGate?.browserEngine
|
||||
|| "chromium",
|
||||
).toLowerCase(),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -104,5 +112,9 @@ function mergeConfig(base, override) {
|
||||
...override.databaseTool,
|
||||
...override.databaseGate,
|
||||
},
|
||||
dbGate: {
|
||||
...base.dbGate,
|
||||
...override.dbGate,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -146,6 +146,16 @@ const server = http.createServer(async (request, response) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === "/api/tools/open-dbgate") {
|
||||
await openInBrowser(config.dbGate.url, { engine: config.dbGate.browserEngine });
|
||||
await sendJson(response, {
|
||||
opened: true,
|
||||
url: config.dbGate.url,
|
||||
browserEngine: config.dbGate.browserEngine,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === "/api/catalog-maker/product-info") {
|
||||
await sendJson(
|
||||
response,
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
.settings-group legend { @apply px-1 text-xs font-semibold text-slate-700; }
|
||||
.settings-option { @apply flex items-center gap-1 py-0.5 text-[11px] text-slate-700; }
|
||||
.settings-option .settings-inline-button { @apply ml-auto py-0.5 text-[10px]; }
|
||||
.settings-tool-actions { @apply ml-auto flex items-center gap-1; }
|
||||
.settings-tool-actions .settings-inline-button { @apply ml-0; }
|
||||
.settings-option input { @apply accent-catalog-focus; }
|
||||
.settings-option input:disabled + span { @apply text-slate-400; }
|
||||
.local-db-fields { @apply grid gap-1; }
|
||||
|
||||
Reference in New Issue
Block a user