mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Dark theme for trace error page
This commit is contained in:
@@ -74,7 +74,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
])
|
||||
)[0] ?? new Document();
|
||||
}
|
||||
|
||||
|
||||
$errorView = __DIR__ . '/../views/general/error.phtml';
|
||||
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . '://' . System::getEnv('_APP_DOMAIN', '');
|
||||
|
||||
@@ -535,7 +535,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Branded error pages (when developer left body empty)
|
||||
if ($executionResponse['statusCode'] >= 400 && empty($executionResponse['body'])) {
|
||||
$layout = new View($errorView);
|
||||
@@ -1304,9 +1304,9 @@ App::error()
|
||||
->setStatusCode($code);
|
||||
|
||||
$template = $error->getView() ?? (($route) ? $route->getLabel('error', null) : null);
|
||||
|
||||
|
||||
// TODO: Ideally use group 'api' here, but all wildcard routes seem to have 'api' at the moment
|
||||
if(!\str_starts_with($route->getPath(), '/v1')) {
|
||||
if (!\str_starts_with($route->getPath(), '/v1')) {
|
||||
$template = __DIR__ . '/../views/general/error.phtml';
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ switch ($type) {
|
||||
}
|
||||
|
||||
.error-trace {
|
||||
max-width: 800px;
|
||||
max-width: 900px;
|
||||
padding: 20px;
|
||||
font-family: var(--font-family-sansSerif, Inter), sans-serif;
|
||||
}
|
||||
@@ -374,8 +374,35 @@ switch ($type) {
|
||||
.type {
|
||||
background: var(--color-overlay-on-neutral, rgba(25, 25, 28, 1));
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
border: var(--border-width-S, 1px) solid var(--color-border-neutral-strong, #414146);
|
||||
}
|
||||
|
||||
.back-button {
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
}
|
||||
|
||||
.trace-grid {
|
||||
background: var(--color-bgColor-neutral-secondary, #1D1D21);
|
||||
border: var(--border-width-S, 1px) solid var(--color-border-neutral-strong, #2D2D31);
|
||||
}
|
||||
|
||||
.trace-grid-header {
|
||||
background: var(--color-bgColor-neutral-secondary, #19191C);
|
||||
border: var(--border-width-S, 1px) solid var(--color-border-neutral-strong, #2D2D31);
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
}
|
||||
|
||||
.trace-label {
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
}
|
||||
|
||||
.trace-value {
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
}
|
||||
|
||||
.trace-args {
|
||||
color: var(--color-fgColor-neutral-secondary, #C3C3C6);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -2612,10 +2612,10 @@ class SitesCustomServerTest extends Scope
|
||||
]);
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
$this->assertStringContainsString("Deployment build failed", $response['body']);
|
||||
|
||||
|
||||
$this->cleanupSite($siteId);
|
||||
}
|
||||
|
||||
|
||||
public function testEmptySiteSource(): void
|
||||
{
|
||||
$siteId = $this->setupSite([
|
||||
@@ -2707,7 +2707,7 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertEquals('failed', $deployment['body']['status'], 'Deployment status does not match: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT));
|
||||
$this->assertStringContainsString('Error:', $deployment['body']['buildLogs'], 'Deployment logs do not match: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT));
|
||||
}, 100000, 500);
|
||||
|
||||
|
||||
$this->cleanupSite($siteId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user