2024-05-30 01:06:08 +00:00
|
|
|
@inherits LayoutComponentBase
|
2024-06-14 07:20:04 +00:00
|
|
|
@implements IDisposable
|
2024-06-01 04:38:12 +00:00
|
|
|
@inject NavigatorService NavigatorService
|
|
|
|
@inject NavigationManager NavigationManager
|
|
|
|
@inject State State
|
2024-05-31 01:27:01 +00:00
|
|
|
<NavMenu />
|
|
|
|
<main class="responsive max">
|
|
|
|
@Body
|
|
|
|
</main>
|
2024-06-01 04:38:12 +00:00
|
|
|
|
|
|
|
@code {
|
|
|
|
protected override void OnInitialized() {
|
|
|
|
base.OnInitialized();
|
|
|
|
NavigatorService.NavigationManager = NavigationManager;
|
2024-06-14 07:20:04 +00:00
|
|
|
State.IntentReceived += IntentRecieved;
|
|
|
|
if (!string.IsNullOrEmpty(State.ShareString) || !string.IsNullOrEmpty(State.SharePhoto)) {
|
|
|
|
IntentRecieved();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void IntentRecieved(object? sender = null, EventArgs? e = null) {
|
|
|
|
if (!string.IsNullOrEmpty(State.ShareString)) {
|
2024-06-18 06:23:03 +00:00
|
|
|
NavigationManager.NavigateTo($"/sharetext");
|
2024-06-14 07:20:04 +00:00
|
|
|
}
|
|
|
|
else if (!string.IsNullOrEmpty(State.SharePhoto)) {
|
2024-06-18 06:23:03 +00:00
|
|
|
NavigationManager.NavigateTo($"/sharepic");
|
2024-06-14 07:20:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void IDisposable.Dispose() {
|
|
|
|
State.IntentReceived -= IntentRecieved;
|
2024-06-01 04:38:12 +00:00
|
|
|
}
|
|
|
|
}
|