Skip to content

Commit 9c2b7ba

Browse files
author
github-actions
committed
Merge pull request #1866 from hydephp/improve-realtime-compiler-dashboard
Improve the realtime compiler dashboard hydephp/develop@2ed18ba
1 parent 8dede06 commit 9c2b7ba

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

resources/dashboard.blade.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
<div class="table-responsive">
232232
<table class="table table-bordered">
233233
<tr>
234-
@foreach(['Page Type', 'Route Key', 'Source File', 'Output File', 'Identifier'] as $header)
234+
@foreach(['Page Type', 'Route Key', 'Source File', 'Output File'] as $header)
235235
<th>{{ $header }}</th>
236236
@endforeach
237237
<th class="text-end">Actions</th>
@@ -245,22 +245,27 @@
245245
{{ $route->getRouteKey() }}
246246
</td>
247247
<td>
248-
{{ $route->getSourcePath() }}
248+
@if($route->getPage() instanceof \Hyde\Pages\InMemoryPage)
249+
<i class="text-muted" title="This page is generated dynamically and does not have a source file.">{{ '<none>' }}</i>
250+
@else
251+
{{ $route->getSourcePath() }}
252+
@endif
249253
</td>
250254
<td>
251255
{{ $route->getOutputPath() }}
252256
</td>
253-
<td>
254-
{{ $route->getPageIdentifier() }}
255-
</td>
256257
<td class="text-end">
257258
<div class="d-flex justify-content-end">
258259
@if($dashboard->isInteractive())
259260
<form class="buttonActionForm" action="" method="POST">
260261
<input type="hidden" name="_token" value="{{ $csrfToken }}">
261262
<input type="hidden" name="action" value="openPageInEditor">
262263
<input type="hidden" name="routeKey" value="{{ $route->getRouteKey() }}">
263-
<button type="submit" class="btn btn-outline-primary btn-sm me-2" title="Open in system default application">Edit</button>
264+
@if($route->getPage() instanceof \Hyde\Pages\InMemoryPage)
265+
<button type="submit" class="btn btn-outline-secondary btn-sm me-2" title="Cannot edit in-memory pages" style="pointer-events: auto; cursor: unset" disabled>Edit</button>
266+
@else
267+
<button type="submit" class="btn btn-outline-primary btn-sm me-2" title="Open in system default application">Edit</button>
268+
@endif
264269
</form>
265270
@endif
266271
<a href="{{ $route->getLink() }}" class="btn btn-outline-primary btn-sm" title="Open this page preview in browser">View</a>

0 commit comments

Comments
 (0)