WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit dbd7527

Browse files
authored
Replace PrimeVue with DaisyUI (#27)
* chore: update dependencies and configuration files - Updated various dependencies in package.json to their latest versions for improved performance and security. - Simplified Tailwind CSS imports in main.scss. - Enhanced TypeScript configuration in tsconfig.app.json and tsconfig.node.json with composite and preserveSymlinks options. - Added additional files to be included in tsconfig.node.json for better type checking. - Introduced a new Prettier configuration file (.prettierrc.cjs) to manage code formatting. - Created a new ESLint configuration file (eslint.config.ts) to enforce coding standards and integrate with Prettier. * refactor: standardize import statements and improve code readability across multiple components feat: enhance MessageDialog and MessageDialogError components with improved error handling and display fix: update MessageHeader component to ensure proper prop definition chore: refactor Messages component for better state management and user experience style: update router configuration for consistency and clarity fix: improve date and error utility functions for better performance and readability style: update Tailwind CSS configuration for improved theme management chore: update Vite configuration for better build process and environment handling style: add global styles for Tailwind CSS and DaisyUI integration * feat: implement confirmation dialog, modal, theme switcher, and toast notifications components * feat: Enhance BrokerTopics and Messages pages with sorting and pagination features - Implemented sorting functionality for subscription fields in BrokerTopics.vue. - Added pagination support to BrokerTopics.vue and Messages.vue for better data management. - Refactored the table structure in Messages.vue to use a standard HTML table with Tailwind CSS styling. - Updated error handling utility to return a structured error object. - Modified Tailwind CSS configuration to support dark mode based on a selector. - Removed unused PrimeVue components and adjusted Vite configuration for Tailwind CSS integration. * refactor: remove unused CSS files and replace icon usage with Vue components - Deleted treeselect.css and treetable.css as they are no longer needed. - Added new icon components for ArrowLeft, ArrowRight, Bars, ChevronLeft, ChevronRight, CircleFilled, Clock, Database, Eraser, Hourglass, Refresh, Replay, Sitemap, Trash, and XMark. - Updated various components to use the new icon components instead of icon classes. - Refactored MessageDialog, Messages, Broker, and AppLayout components to improve readability and maintainability. * refactor: streamline auto-refresh dropdown implementation and improve backdrop handling * refactor: improve UI components and layout for broker pages - Enhanced navigation tabs in Broker.vue for better accessibility and styling. - Adjusted table layouts and styles in BrokerOverview.vue, BrokerQueues.vue, and BrokerTopics.vue for consistency and improved readability. - Updated message display in MessageDialog.vue and Messages.vue for better user experience. - Introduced new icons (ChartBarIcon, ChevronDownIcon, ChevronUpIcon) for enhanced visual representation. - Improved search bar styling across various components for a more cohesive design. * refactor: update styling and layout for message components to enhance readability and consistency * refactor: enhance queue header layout and display additional queue information * feat: implement CustomExampleTestConsumer and associated message types * refactor: update queue header styling and improve queue type button interactions * refactor: migrate user settings to local settings and update related components * feat: add CopyIcon component and integrate clipboard functionality in MessageDialog and MessageDialogError * refactor: remove unused refetchInterval parameter from useQueuesQuery and update related usages * Refactor message handling features to remove OperationResult wrapper - Updated IDeleteMessagesFeature, IGetMessagesFeature, IPurgeQueueFeature, IRequeueMessagesFeature, and IRequeueSpecificMessagesFeature interfaces to return response types directly instead of wrapping them in OperationResult. - Modified corresponding feature implementations to return response types directly. - Introduced ResQueueExceptionMiddleware for centralized exception handling. - Removed OperationResult class as it is no longer needed. - Updated frontend components to reflect changes in routing and layout, including the addition of a new Dashboard component and removal of the BrokerOverview component. - Enhanced error handling in errorUtils to provide more informative error messages. * refactor: update checkbox styling and add message count display in Messages component * feat: enhance RequeueDialog with queue status visualization and improve empty states in Messages and Broker pages * feat: migrate to DaisyUI themes and enhance theme management in the application * feat: add DotnetStackTraceHighlighter component and integrate it into MessageDialogError for improved error stack trace visualization * feat: enhance MessageDialog with additional message metadata display and improved styling * feat: add consumers for birthday invites, drink orders, party scheduling, and weather checks; remove unused test consumer and messages * feat: add scheduled and recurring message indicators in MessageDialog; update enqueue time display logic in Messages * feat: enhance DrinkOrderConsumer with immediate retry policy; update MessageDialog and Messages components for improved scheduling and delivery display * feat: enhance Messages component with improved status display and URN formatting; add pending and failed status logic * feat: update MessageDialog and MessageDialogError components with error handling logic and improved styling; adjust layout in Messages component * feat: update BrokerQueues component to remove 'locked' sorting option and enhance 'scheduled' display with improved styling * feat: update message handling components with improved status display and add MessagesTable for better organization * feat: enhance theme handling and UI components with new dark theme detection; update job state DTO and message dialogs for improved error display and layout * feat: update deployment configuration to version 2.0.0 and enhance changelog with new features and updates
1 parent 8573425 commit dbd7527

File tree

233 files changed

+6705
-10631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+6705
-10631
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
DeployImage:
4444
runs-on: ubuntu-latest
4545
env:
46-
ResQueueImageVersion: "1.5.0"
46+
ResQueueImageVersion: "2.0.0"
4747
DockerRegistry: ghcr.io
4848
DockerRepository: filipbekic01/resqueue
4949
steps:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

5+
## [v2.0.0] - 2025-11-30
6+
7+
- Replaced PrimeVue with DaisyUI
8+
- Added .NET stacktrace highlighting
9+
- Several themes available now
10+
- Shift selection messages in table
11+
- Many tiny quality of life updates
12+
- Updated all JS dependencies to latest to this date
13+
- Simplified backend response types
14+
515
## [v1.5.0] - 2025-11-29
616

717
### Fixed

backend/ResQueue/ResQueue/Endpoints/AuthEndpoints.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static void MapAuthEndpoints(this IEndpointRouteBuilder routes)
99
{
1010
RouteGroupBuilder group = routes.MapGroup("auth");
1111

12-
group.MapGet("", (IDbConnectionProvider conn) => Results.Ok(new AuthDto(
12+
group.MapGet("", (IDbConnectionProvider conn) => TypedResults.Ok(new AuthDto(
1313
SqlEngine: conn.SqlEngine,
1414
Username: conn.Username,
1515
Database: conn.Database,

backend/ResQueue/ResQueue/Endpoints/JobsEndpoints.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void MapJobsEndpoints(this IEndpointRouteBuilder routes)
1414
{
1515
var state = await client.GetJobState(jobId);
1616

17-
return Results.Ok(state);
17+
return TypedResults.Ok(state);
1818
});
1919
}
2020
}

backend/ResQueue/ResQueue/Endpoints/MessagesEndpoints.cs

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,60 +17,35 @@ public static void MapMessageEndpoints(this IEndpointRouteBuilder routes)
1717
group.MapGet("",
1818
async (IGetMessagesFeature feature, [FromQuery] long queueId, [FromQuery] int pageIndex = 0) =>
1919
{
20-
var result = await feature.ExecuteAsync(new GetMessagesRequest(
21-
queueId, pageIndex
22-
));
23-
24-
return result.IsSuccess
25-
? Results.Ok(result.Value!.Messages)
26-
: Results.Problem(result.Problem!);
20+
var result = await feature.ExecuteAsync(new GetMessagesRequest(queueId, pageIndex));
21+
return TypedResults.Ok(result.Messages);
2722
});
2823

2924
group.MapGet("{transportMessageId:guid}",
3025
async (IGetSingleMessageFeature feature, Guid transportMessageId) =>
3126
{
32-
var result = await feature.ExecuteAsync(new GetSingleMessageRequest(
33-
transportMessageId
34-
));
35-
36-
return result.IsSuccess
37-
? Results.Ok(result.Value!.Message)
38-
: Results.Problem(result.Problem!);
27+
var result = await feature.ExecuteAsync(new GetSingleMessageRequest(transportMessageId));
28+
return TypedResults.Ok(result.Message);
3929
});
4030

4131
group.MapPost("requeue",
4232
async (IRequeueMessagesFeature feature, [FromBody] RequeueMessagesDto dto) =>
4333
{
44-
var result = await feature.ExecuteAsync(new RequeueMessagesRequest(
45-
dto
46-
));
47-
48-
return result.IsSuccess
49-
? Results.Ok(result.Value)
50-
: Results.Problem(result.Problem!);
34+
var result = await feature.ExecuteAsync(new RequeueMessagesRequest(dto));
35+
return TypedResults.Ok(result);
5136
});
5237

5338
group.MapPost("requeue-specific",
5439
async (IRequeueSpecificMessagesFeature feature, [FromBody] RequeueSpecificMessagesDto dto) =>
5540
{
56-
var result = await feature.ExecuteAsync(new RequeueSpecificMessagesRequest(
57-
dto
58-
));
59-
60-
return result.IsSuccess
61-
? Results.Ok(result.Value)
62-
: Results.Problem(result.Problem!);
41+
var result = await feature.ExecuteAsync(new RequeueSpecificMessagesRequest(dto));
42+
return TypedResults.Ok(result);
6343
});
6444

6545
group.MapDelete("", async (IDeleteMessagesFeature feature, [FromBody] DeleteMessagesDto dto) =>
6646
{
67-
var result = await feature.ExecuteAsync(new DeleteMessagesRequest(
68-
dto
69-
));
70-
71-
return result.IsSuccess
72-
? Results.Ok(result.Value)
73-
: Results.Problem(result.Problem!);
47+
var result = await feature.ExecuteAsync(new DeleteMessagesRequest(dto));
48+
return TypedResults.Ok(result);
7449
});
7550
}
7651
}

backend/ResQueue/ResQueue/Endpoints/QueuesEndpoints.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Dapper;
22
using Microsoft.AspNetCore.Mvc;
3-
using Microsoft.Extensions.Options;
43
using ResQueue.Dtos.Messages;
54
using ResQueue.Dtos.Queue;
65
using ResQueue.Enums;
@@ -61,7 +60,7 @@ queue_max_delivery_count AS QueueMaxDeliveryCount
6160

6261
var queuesFromView = await connection.QueryAsync<QueueViewDto>(sql);
6362

64-
return Results.Ok(queuesFromView);
63+
return TypedResults.Ok(queuesFromView);
6564
});
6665

6766
group.MapGet("view/{queueName}", async (IDatabaseConnectionFactory connectionFactory,
@@ -112,7 +111,7 @@ queue_max_delivery_count AS QueueMaxDeliveryCount
112111

113112
var queueView = await connection.QuerySingleAsync<QueueViewDto>(sql, new { QueueName = queueName });
114113

115-
return Results.Ok(queueView);
114+
return TypedResults.Ok(queueView);
116115
});
117116

118117
group.MapGet("{queueId:long}/metrics",
@@ -151,7 +150,7 @@ dead_letter_count AS DeadLetterCount
151150

152151
var queues = await connection.QueryAsync<QueueMetricDto>(sql, new { QueueId = queueId });
153152

154-
return Results.Ok(queues);
153+
return TypedResults.Ok(queues);
155154
});
156155

157156
group.MapGet("",
@@ -187,17 +186,14 @@ auto_delete AS AutoDelete
187186

188187
var queues = await connection.QueryAsync<QueueDto>(sql, new { QueueName = queueName });
189188

190-
return Results.Ok(queues);
189+
return TypedResults.Ok(queues);
191190
});
192191

193192
group.MapPost("purge",
194-
async (IPurgeQueueFeature feature, IDbConnectionProvider conn, [FromBody] PurgeQueueDto dto) =>
193+
async (IPurgeQueueFeature feature, [FromBody] PurgeQueueDto dto) =>
195194
{
196195
var result = await feature.ExecuteAsync(new PurgeQueueRequest(dto));
197-
198-
return result.IsSuccess
199-
? Results.Ok(result.Value)
200-
: Results.Problem(result.Problem!);
196+
return TypedResults.Ok(result);
201197
});
202198
}
203199
}

backend/ResQueue/ResQueue/Endpoints/SubscriptionsEndpoints.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@ public static void MapSubscriptionsEndpoints(this IEndpointRouteBuilder routes)
1111
group.MapGet("",
1212
async (IGetSubscriptionsFeature feature) =>
1313
{
14-
var result = await feature.ExecuteAsync(new GetSubscriptionsRequest(
15-
));
16-
17-
return result.IsSuccess
18-
? Results.Ok(result.Value!.Subscriptions)
19-
: Results.Problem(result.Problem!);
14+
var result = await feature.ExecuteAsync(new GetSubscriptionsRequest());
15+
return TypedResults.Ok(result.Subscriptions);
2016
});
2117
}
2218
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace ResQueue.Exceptions;
2+
3+
public class ResQueueException : Exception
4+
{
5+
public int StatusCode { get; }
6+
public string? Detail { get; }
7+
8+
public ResQueueException(string message, int statusCode = 400, string? detail = null)
9+
: base(message)
10+
{
11+
StatusCode = statusCode;
12+
Detail = detail;
13+
}
14+
15+
public ResQueueException(string message, int statusCode, Exception innerException)
16+
: base(message, innerException)
17+
{
18+
StatusCode = statusCode;
19+
}
20+
}

backend/ResQueue/ResQueue/Features/Messages/DeleteMessages/DeleteMessagesFeature.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Data.Common;
22
using Dapper;
3-
using Microsoft.Extensions.Options;
43
using ResQueue.Dtos.Messages;
54
using ResQueue.Enums;
65
using ResQueue.Factories;
@@ -19,7 +18,7 @@ public class DeleteMessagesFeature(
1918
IDbConnectionProvider conn
2019
) : IDeleteMessagesFeature
2120
{
22-
public async Task<OperationResult<DeleteMessagesResponse>> ExecuteAsync(DeleteMessagesRequest request)
21+
public async Task<DeleteMessagesResponse> ExecuteAsync(DeleteMessagesRequest request)
2322
{
2423
await using var connection = connectionFactory.CreateConnection();
2524

@@ -44,7 +43,7 @@ public async Task<OperationResult<DeleteMessagesResponse>> ExecuteAsync(DeleteMe
4443
}
4544
}
4645

47-
return OperationResult<DeleteMessagesResponse>.Success(new DeleteMessagesResponse());
46+
return new DeleteMessagesResponse();
4847
}
4948

5049
private async Task CallRoutineAsync(long messageDeliveryId, DbConnection connection)

backend/ResQueue/ResQueue/Features/Messages/DeleteMessages/IDeleteMessagesFeature.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ namespace ResQueue.Features.Messages.DeleteMessages;
22

33
public interface IDeleteMessagesFeature
44
{
5-
Task<OperationResult<DeleteMessagesResponse>> ExecuteAsync(DeleteMessagesRequest request);
5+
Task<DeleteMessagesResponse> ExecuteAsync(DeleteMessagesRequest request);
66
}

0 commit comments

Comments
 (0)