Skip to content

Commit f5ac352

Browse files
committed
feat: remove id from task tables
1 parent f566faf commit f5ac352

5 files changed

Lines changed: 16 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
TelegramDownloader/userData.json
2+
TelegramDownloader/.claude/

TelegramDownloader/Models/DownloadModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class InfoDownloadTaksModel
1919
public StateTask state { get; set; } = StateTask.Pending;
2020
public DateTime creationDate { get; set; } = DateTime.Now;
2121
public DateTime endnDate { get; set; } = DateTime.Now;
22+
public string _internalId { get; set; } = Guid.NewGuid().ToString();
2223
public string id { get; set; }
2324
public bool isUpload { get; set; }
2425
public List<Syncfusion.Blazor.FileManager.FileManagerDirectoryContent> files { get; set; }
@@ -129,6 +130,7 @@ public class DownloadModel
129130
public Mutex mutex = new Mutex();
130131
public event EventHandler<DownloadEventArgs> EventChanged;
131132
public event EventHandler EventStatechanged;
133+
public string _internalId { get; set; } = Guid.NewGuid().ToString();
132134
public string id = Guid.NewGuid().ToString();
133135
public string action { get; set; } = "Download";
134136
public StateTask state { get; set; } = StateTask.Working;
@@ -218,6 +220,7 @@ public class UploadModel
218220
{
219221
public Mutex mutex = new Mutex();
220222
public event EventHandler<UploadEventArgs> EventChanged;
223+
public string _internalId { get; set; } = Guid.NewGuid().ToString();
221224
public Guid id = Guid.NewGuid();
222225
public string action { get; set; } = "Upload";
223226
public StateTask state { get; set; } = StateTask.Working;

TelegramDownloader/Pages/Partials/DownloadsTable.razor

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ DataProvider="DownloadsDataProvider"
1212
AllowFiltering="false"
1313
AllowPaging="true"
1414
AllowSorting="false"
15-
Responsive="true">
15+
Responsive="true"
16+
ItemsPropertyName="_internalId">
1617

17-
<GridColumn TItem="DownloadModel" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
18+
@* <GridColumn TItem="DownloadModel" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
1819
@context.id
19-
</GridColumn>
20+
</GridColumn> *@
2021
<GridColumn TItem="DownloadModel" HeaderText="File" PropertyName="name" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
2122
@context.name
2223
</GridColumn>

TelegramDownloader/Pages/Partials/TasksTable.razor

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
AllowFiltering="false"
1313
AllowPaging="true"
1414
AllowSorting="false"
15-
Responsive="true">
15+
Responsive="true"
16+
ItemsPropertyName="_internalId">
1617

17-
<GridColumn TItem="InfoDownloadTaksModel" Class="d-none d-md-table-cell" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
18+
@* <GridColumn TItem="InfoDownloadTaksModel" Class="d-none d-md-table-cell" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
1819
@context.id
19-
</GridColumn>
20+
</GridColumn> *@
2021
<GridColumn TItem="InfoDownloadTaksModel" HeaderText="To" PropertyName="toPath" SortString="toPath" SortKeySelector="item => item.toPath" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
2122
@context.toPath
2223
</GridColumn>

TelegramDownloader/Pages/Partials/UploadsTable.razor

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ DataProvider="UploadsDataProvider"
1212
AllowFiltering="false"
1313
AllowPaging="true"
1414
AllowSorting="false"
15-
Responsive="true">
15+
Responsive="true"
16+
ItemsPropertyName="_internalId">
1617

17-
<GridColumn TItem="UploadModel" Class="d-none d-md-table-cell" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
18+
@* <GridColumn TItem="UploadModel" Class="d-none d-md-table-cell" HeaderText="ID" PropertyName="id" SortString="id" SortKeySelector="item => item.id" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
1819
@context.id
19-
</GridColumn>
20+
</GridColumn> *@
2021
<GridColumn TItem="UploadModel" HeaderText="File" PropertyName="name" SortString="name" SortKeySelector="item => item.name" FilterTextboxWidth="50" HeaderTextAlignment="Alignment.Center" TextAlignment="Alignment.Center">
2122
<Tooltip Class="me-4" Title="@context.path">@context.name</Tooltip>
2223
</GridColumn>

0 commit comments

Comments
 (0)