Skip to content

Commit fdea680

Browse files
committed
Display file size in tollbar
1 parent 6bab57c commit fdea680

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/views/onlylogs/shared/_log_container.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@
7676
</label>
7777
</div>
7878
<div>
79-
<span data-log-streamer-target="lineRange" style="color: #666; font-size: 0.9em;">No lines</span>
79+
<span data-log-streamer-target="lineRange" style="color: #666;">No lines</span>
8080
</div>
8181
<div data-log-streamer-target="message"></div>
8282
<% unless Onlylogs.ripgrep_enabled? %>
8383
<span class="grep-warning" title="Search is slow. Install ripgrep for better performance">⚠️</span>
8484
<% end %>
85+
<div class="file-size" title="File size: <%= number_to_human_size(File.size(log_file_path)) %>">
86+
<%= number_to_human_size(File.size(log_file_path)) %>
87+
</div>
8588
<div data-log-streamer-target="websocketStatus" class="websocket-status websocket-status--disconnected" title="WebSocket Disconnected">🔴</div>
8689
</div>
8790
</div>

app/views/onlylogs/shared/_log_container_styles.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,15 @@
168168
margin-left: auto;
169169
}
170170

171-
.websocket-status {
171+
.file-size {
172+
color: #666;
172173
cursor: help;
173174
margin-left: auto;
175+
margin-right: 0.5rem;
176+
}
177+
178+
.websocket-status {
179+
cursor: help;
174180
border-radius: 50%;
175181
background-color: rgba(255, 255, 255, 0.1);
176182

0 commit comments

Comments
 (0)