Skip to content

Commit

Permalink
inotificationHubService
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEggenberger committed May 21, 2024
1 parent 89f6ebc commit cfc07a9
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 61 deletions.
3 changes: 3 additions & 0 deletions Source/Shared/Features/Server/ServerExecutionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Shared.Features.Messaging.IntegrationEvent;
using Shared.Features.Messaging.Query;
using Shared.Features.Modules;
using Shared.Features.SignalR;
using Shared.Kernel.BuildingBlocks;
using Shared.Kernel.BuildingBlocks.Services.ModelValidation;

Expand All @@ -27,6 +28,7 @@ public class ServerExecutionBase
protected readonly IIntegrationEventDispatcher integrationEventDispatcher;
protected readonly IDomainEventDispatcher domainEventDispatcher;
protected readonly IValidationService validationService;
protected readonly INotificationHubService notificationHubService;

public ServerExecutionBase(IServiceProvider serviceProvider)
{
Expand All @@ -36,6 +38,7 @@ public ServerExecutionBase(IServiceProvider serviceProvider)
integrationEventDispatcher = serviceProvider.GetRequiredService<IIntegrationEventDispatcher>();
domainEventDispatcher = serviceProvider.GetRequiredService<IDomainEventDispatcher>();
validationService = serviceProvider.GetRequiredService<IValidationService>();
notificationHubService = serviceProvider.GetRequiredService<INotificationHubService>();
}
}
}
7 changes: 7 additions & 0 deletions Source/Shared/Features/SignalR/INotificationHubService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Shared.Features.SignalR
{
public interface INotificationHubService
{
Task SendNotificationAsync(Guid userId, string triggeredMethodName);
}
}
9 changes: 1 addition & 8 deletions Source/Shared/Features/SignalR/NotificationHubService.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
using Microsoft.AspNetCore.SignalR;
using Shared.Kernel.Constants.Endpoints;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Shared.Features.SignalR
{
public class NotificationHubService
public class NotificationHubService : INotificationHubService
{
private readonly IHubContext<NotificationHub> notificationHubContext;

Expand Down
2 changes: 1 addition & 1 deletion Source/Shared/Features/SignalR/Registrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class Registrator
public static IServiceCollection Add_SignalR(this IServiceCollection services)
{
services.AddSingleton<IUserIdProvider, UserIdProvider>();
services.AddScoped<NotificationHubService>();
services.AddScoped<INotificationHubService, NotificationHubService>();
return services;
}

Expand Down
3 changes: 2 additions & 1 deletion Source/Web/Server/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="stylesheet" href="css/fonts.css" />
<link rel="stylesheet" href=@($"{TailwindSourceConstant.TailwindOutputPath}") />
</head>
<body class="h-screen bg-gradient-to-b from-blue-50 to-blue-200">
<body class="h-screen bg-gradient-to-b from-sky-50 to-sky-200 grid place-content-center">
@if (User.Identity.IsAuthenticated)
{
<component type="typeof(App)" render-mode="WebAssembly" />
Expand All @@ -25,6 +25,7 @@
<component type="typeof(LandingPagesApp)" render-mode="Server" />
<script src="_framework/blazor.server.js"></script>
}

</body>
</html>

Expand Down
157 changes: 106 additions & 51 deletions Source/Web/Server/wwwroot/dist/output.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
*/

/*
Expand Down Expand Up @@ -32,9 +32,11 @@
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html {
html,
:host {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
Expand All @@ -44,12 +46,14 @@ html {
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
-webkit-tap-highlight-color: transparent;
/* 7 */
}

/*
Expand Down Expand Up @@ -121,8 +125,10 @@ strong {
}

/*
1. Use the user's configured `mono` font family by default.
2. Correct the odd `em` font sizing in all browsers.
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
Expand All @@ -131,8 +137,12 @@ samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 1 */
font-size: 1em;
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}

/*
Expand Down Expand Up @@ -550,6 +560,14 @@ video {
margin-bottom: 120px;
}

.ml-auto {
margin-left: auto;
}

.mr-auto {
margin-right: auto;
}

.mt-4 {
margin-top: 1rem;
}
Expand Down Expand Up @@ -582,10 +600,18 @@ video {
height: 41px;
}

.h-\[65px\] {
height: 65px;
}

.h-\[70px\] {
height: 70px;
}

.h-\[calc\(100\%-65px\)\] {
height: calc(100% - 65px);
}

.h-full {
height: 100%;
}
Expand All @@ -594,6 +620,10 @@ video {
height: 100vh;
}

.max-h-\[900px\] {
max-height: 900px;
}

.w-\[142\.5px\] {
width: 142.5px;
}
Expand All @@ -610,6 +640,14 @@ video {
width: 100%;
}

.w-screen {
width: 100vw;
}

.max-w-\[1400px\] {
max-width: 1400px;
}

.cursor-pointer {
cursor: pointer;
}
Expand All @@ -626,6 +664,10 @@ video {
place-content: center;
}

.content-start {
align-content: flex-start;
}

.items-end {
align-items: flex-end;
}
Expand All @@ -642,10 +684,19 @@ video {
justify-content: center;
}

.justify-between {
justify-content: space-between;
}

.justify-items-center {
justify-items: center;
}

.gap-x-3 {
-moz-column-gap: 0.75rem;
column-gap: 0.75rem;
}

.gap-x-\[10px\] {
-moz-column-gap: 10px;
column-gap: 10px;
Expand All @@ -668,6 +719,14 @@ video {
row-gap: 15px;
}

.overflow-y-auto {
overflow-y: auto;
}

.rounded {
border-radius: 0.25rem;
}

.rounded-\[10px\] {
border-radius: 10px;
}
Expand All @@ -676,67 +735,35 @@ video {
border-radius: 3px;
}

.border {
border-width: 1px;
}

.bg-\[\#F2F2F2\] {
--tw-bg-opacity: 1;
background-color: rgb(242 242 242 / var(--tw-bg-opacity));
}

.bg-gradient-to-r {
background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-b {
background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.from-cyan-500 {
--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);
--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-cyan-200 {
--tw-gradient-from: #a5f3fc var(--tw-gradient-from-position);
--tw-gradient-to: rgb(165 243 252 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-cyan-100 {
--tw-gradient-from: #cffafe var(--tw-gradient-from-position);
--tw-gradient-to: rgb(207 250 254 / 0) var(--tw-gradient-to-position);
.from-sky-50 {
--tw-gradient-from: #f0f9ff var(--tw-gradient-from-position);
--tw-gradient-to: rgb(240 249 255 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-cyan-50 {
--tw-gradient-from: #ecfeff var(--tw-gradient-from-position);
--tw-gradient-to: rgb(236 254 255 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-blue-50 {
--tw-gradient-from: #eff6ff var(--tw-gradient-from-position);
--tw-gradient-to: rgb(239 246 255 / 0) var(--tw-gradient-to-position);
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-blue-500 {
--tw-gradient-to: #3b82f6 var(--tw-gradient-to-position);
}

.to-cyan-400 {
--tw-gradient-to: #22d3ee var(--tw-gradient-to-position);
.to-sky-200 {
--tw-gradient-to: #bae6fd var(--tw-gradient-to-position);
}

.to-cyan-300 {
--tw-gradient-to: #67e8f9 var(--tw-gradient-to-position);
.p-1 {
padding: 0.25rem;
}

.to-cyan-200 {
--tw-gradient-to: #a5f3fc var(--tw-gradient-to-position);
}

.to-blue-200 {
--tw-gradient-to: #bfdbfe var(--tw-gradient-to-position);
.p-\[20px\] {
padding: 20px;
}

.p-\[5px\] {
Expand All @@ -753,6 +780,10 @@ video {
padding-right: 1rem;
}

.pb-0 {
padding-bottom: 0px;
}

.pb-14 {
padding-bottom: 3.5rem;
}
Expand All @@ -777,6 +808,11 @@ video {
padding-top: 60px;
}

.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}

.text-\[15px\] {
font-size: 15px;
}
Expand All @@ -785,10 +821,24 @@ video {
font-size: 24px;
}

.text-\[46px\] {
font-size: 46px;
}

.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}

.font-semibold {
font-weight: 600;
}

.text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}

.underline {
text-decoration-line: underline;
}
Expand All @@ -800,3 +850,8 @@ video {
.underline-offset-2 {
text-underline-offset: 2px;
}

.hover\:bg-white:hover {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

0 comments on commit cfc07a9

Please sign in to comment.