Skip to content

Commit de51232

Browse files
authored
Merge pull request #144 from opcodesio/ui-fixes
a few UI fixes
2 parents 3ef3dc9 + 4bda82e commit de51232

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

public/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/css/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ html.dark {
481481

482482
.file-name {
483483
@apply text-sm mr-3 w-full;
484+
word-break: break-word;
484485
}
485486

486487
.file-size {

resources/views/livewire/file-list.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class="relative folder-container"
4343
>
4444
<div class="folder-item-container"
4545
x-on:click="$store.fileViewer.toggle(folder)"
46-
x-bind:class="[$store.fileViewer.isOpen(folder) ? 'active-folder' : '', $store.fileViewer.shouldBeSticky(folder) ? 'sticky z-10' : '']"
46+
x-bind:class="[$store.fileViewer.isOpen(folder) ? 'active-folder' : '', $store.fileViewer.shouldBeSticky(folder) ? 'sticky ' + (open ? 'z-20' : 'z-10') : '' ]"
4747
x-bind:style="{ top: $store.fileViewer.isOpen(folder) ? ($store.fileViewer.folderTops[folder] || 0) : 0 }"
4848
x-data="dropdown"
4949
x-on:keydown.escape.prevent.stop="close($refs.button)"
@@ -52,7 +52,7 @@ class="relative folder-container"
5252
>
5353
<div class="file-item">
5454
@include('log-viewer::partials.folder-icon')
55-
<div class="file-name @if($folder->isRoot()) text-gray-500 dark:text-gray-400 @endif">{{ $folder->cleanPath() }}</div>
55+
<div class="file-name">@if(\Illuminate\Support\Str::startsWith($folder->cleanPath(),'root'))<span class="text-gray-500 dark:text-gray-400">root</span>{{ substr($folder->cleanPath(), 4) }}@else{{ $folder->cleanPath() }}@endif</div>
5656
<button type="button" class="file-dropdown-toggle"
5757
x-ref="button" x-on:click.stop="toggle()" :aria-expanded="open" :aria-controls="$id('dropdown-button')"
5858
>

src/LogFolder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ public function cleanPath(): string
4747

4848
$folder = $this->path;
4949

50-
if (str_contains($folder, $storageLogsFolder = DIRECTORY_SEPARATOR.'storage'.DIRECTORY_SEPARATOR.'logs')) {
51-
// If we have /something/storage/logs, then we can remove it to make the string cleaner.
52-
// storage/logs is implied on Laravel environments.
53-
$folder = str_replace($storageLogsFolder, '', $folder);
54-
}
50+
$folder = str_replace(LogViewer::basePathForLogs(), 'root'.DIRECTORY_SEPARATOR, $folder);
5551

5652
if ($unixHomePath = getenv('HOME')) {
5753
$folder = str_replace($unixHomePath, '~', $folder);

0 commit comments

Comments
 (0)