This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New UI & dialogs based on tailwindcss
- Loading branch information
1 parent
811b745
commit defc18b
Showing
38 changed files
with
1,791 additions
and
2,644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"tailwindcss.cli": { | ||
"version": "3.4.0", | ||
"commands": [ | ||
"tailwindcss" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 0 additions & 147 deletions
147
Sources/MagicCardTracker.Pwa/Components/CardOverlay.razor
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
Sources/MagicCardTracker.Pwa/Components/DialogContainer.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@implements IDisposable | ||
@inject IDialogService _dialogService | ||
|
||
@if (_dialogType != null) | ||
{ | ||
<div class="fixed inset-0 bg-black/60 backdrop-blur-sm flex justify-center"> | ||
<div class="mt-8"> | ||
<DynamicComponent Type="_dialogType" Parameters="_parameters"></DynamicComponent> | ||
</div> | ||
</div> | ||
} | ||
|
||
@code | ||
{ | ||
private Type? _dialogType; | ||
private Dictionary<string, object> _parameters = []; | ||
|
||
protected override Task OnInitializedAsync() | ||
{ | ||
_dialogService.CloseRequested += CloseDialog; | ||
_dialogService.DialogRequested += ShowDialog; | ||
|
||
return Task.CompletedTask; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_dialogService.CloseRequested -= CloseDialog; | ||
_dialogService.DialogRequested -= ShowDialog; | ||
} | ||
|
||
private void CloseDialog(object? sender, EventArgs e) | ||
{ | ||
_dialogType = null; | ||
StateHasChanged(); | ||
} | ||
|
||
private void ShowDialog(object? sender, DialogMetadata dialogMetadata) | ||
{ | ||
_dialogType = dialogMetadata.DialogType; | ||
_parameters = dialogMetadata.Parameters; | ||
StateHasChanged(); | ||
} | ||
} |
Oops, something went wrong.