Skip to content

Commit 66b42e9

Browse files
committed
feat: add style improvements
feat: add temp button
1 parent 6b002a7 commit 66b42e9

5 files changed

Lines changed: 45 additions & 18 deletions

File tree

TelegramDownloader/Pages/FileManager.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</style>
2424

2525
<h3>
26-
File Manager
26+
<i class="bi bi-folder2-open me-2"></i>File Manager
2727
<Dropdown Color="DropdownColor.Secondary">
2828
<DropdownToggleButton>@chatName</DropdownToggleButton>
2929
<DropdownMenu>

TelegramDownloader/Pages/InfoPage.razor

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@inject IFileService fs
88
@inject IJSRuntime JSRuntime
99
@inject ISystemMetricsService metricsService
10+
@inject NavigationManager NavigationManager
1011
@implements IDisposable
1112

1213
@if(user != null)
@@ -112,6 +113,10 @@
112113
}
113114

114115
<div class="stat-action">
116+
<button type="button" class="btn btn-outline-secondary" @onclick="OpenTempFolder" title="Open temp folder in file manager">
117+
<i class="bi bi-folder2-open"></i>
118+
Open Folder
119+
</button>
115120
<button type="button" class="btn btn-primary" @onclick="cleanTempFolder">
116121
<i class="bi bi-trash3"></i>
117122
Clean Cache
@@ -356,6 +361,14 @@
356361
await TriggerCelebration();
357362
}
358363

364+
private void OpenTempFolder()
365+
{
366+
// Navigate to local-files with the temp folder path
367+
// The path is relative to LOCALDIR (local/), so temp/_temp/
368+
var tempPath = "/temp/_temp/";
369+
NavigationManager.NavigateTo($"/local-files?path={Uri.EscapeDataString(tempPath)}");
370+
}
371+
359372
private async Task TriggerCelebration()
360373
{
361374
await JSRuntime.InvokeVoidAsync("triggerConfetti");

TelegramDownloader/Shared/MobileFileManager/MobileFileItem.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
var ext = File.Type?.ToLower() ?? "";
161161
var color = GetFileColor(ext);
162162

163-
return @<svg xmlns="http://www.w3.org/2000/svg" width="@IconSize" height="@IconSize" viewBox="0 0 24 24" fill="none" stroke="@color" stroke-width="1.5">
163+
return @<svg xmlns="http://www.w3.org/2000/svg" width="@IconSize" height="@IconSize" viewBox="0 0 24 24" fill="none" stroke="@color" stroke-width="0.5">
164164
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" fill="@color" fill-opacity="0.1"/>
165165
<polyline points="14 2 14 8 20 8" fill="none"/>
166166
<text x="12" y="16" font-size="6" text-anchor="middle" fill="@color" font-weight="bold">@GetExtensionLabel(ext)</text>

TelegramDownloader/Shared/NavMenu.razor

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,6 @@
558558
<button class="sidebar-action-btn" @onclick="OpenLocalFiles" title="Local Files">
559559
<i class="bi bi-folder2-open"></i>
560560
</button>
561-
<button class="sidebar-action-btn" @onclick="HandleThreeDots" title="More options">
562-
<i class="bi bi-three-dots-vertical"></i>
563-
</button>
564561
</div>
565562

566563
<!-- Search -->
@@ -837,15 +834,6 @@
837834
PreloadService.Hide();
838835
}
839836

840-
private async Task HandleThreeDots()
841-
{
842-
ToggleNavMenu();
843-
if (OnClickCallback.HasDelegate)
844-
{
845-
await OnClickCallback.InvokeAsync(null);
846-
}
847-
}
848-
849837
private async Task HandleImportMenu()
850838
{
851839
ToggleNavMenu();

TelegramDownloader/wwwroot/css/site.css

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,21 +1796,24 @@ table.table tbody td,
17961796

17971797
.info-page .stat-action {
17981798
width: 100%;
1799+
display: flex;
1800+
gap: 0.5rem;
17991801
}
18001802

18011803
.info-page .stat-action .btn {
1802-
width: 100%;
1803-
padding: 0.75rem 1.25rem;
1804+
flex: 1;
1805+
padding: 0.75rem 1rem;
18041806
font-weight: 600;
1805-
font-size: 0.9rem;
1807+
font-size: 0.85rem;
18061808
display: flex;
18071809
align-items: center;
18081810
justify-content: center;
1809-
gap: 0.5rem;
1811+
gap: 0.4rem;
18101812
border-radius: 0.625rem;
18111813
transition: all 0.25s ease;
18121814
border: none;
18131815
cursor: pointer;
1816+
white-space: nowrap;
18141817
}
18151818

18161819
.info-page .stat-action .btn:hover {
@@ -1860,6 +1863,29 @@ table.table tbody td,
18601863
color: #3b82f6 !important;
18611864
}
18621865

1866+
/* Outline secondary button - Open Folder style */
1867+
.info-page .stat-action .btn-outline-secondary {
1868+
background: transparent !important;
1869+
color: #6b7280 !important;
1870+
border: 2px solid #d1d5db !important;
1871+
box-shadow: none;
1872+
}
1873+
1874+
.info-page .stat-action .btn-outline-secondary:hover {
1875+
background: #f3f4f6 !important;
1876+
color: #374151 !important;
1877+
border-color: #9ca3af !important;
1878+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
1879+
}
1880+
1881+
.info-page .stat-action .btn-outline-secondary i {
1882+
color: #6b7280 !important;
1883+
}
1884+
1885+
.info-page .stat-action .btn-outline-secondary:hover i {
1886+
color: #374151 !important;
1887+
}
1888+
18631889
/* Chart section */
18641890
.info-page .chart-section {
18651891
background: #ffffff !important;

0 commit comments

Comments
 (0)