This commit is contained in:
2026-06-02 17:39:58 +02:00
36 changed files with 2520 additions and 463 deletions
@@ -2,6 +2,7 @@
@inject IUserSessionService Session
@inject ISessionManager SessionManager
@inject NavigationManager Nav
@inject TranslationSource T
@using SharepointToolbox.Web.Core.Models
@using SharepointToolbox.Web.Services.Session
@@ -10,10 +11,10 @@
<div class="modal-overlay" role="dialog" aria-modal="true" aria-labelledby="connect-modal-title">
<div class="modal-dialog">
<div class="modal-header">
<h3 id="connect-modal-title">Connect to Microsoft</h3>
<h3 id="connect-modal-title">@T["connect.title"]</h3>
<p class="text-muted">
Authenticate to access <strong>@Session.CurrentProfile?.Name</strong>.
Your session token is stored in your browser only — never saved to disk.
@T["connect.subtitle.prefix"] <strong>@Session.CurrentProfile?.Name</strong>.
@T["connect.token.note"]
</p>
</div>
@@ -23,14 +24,14 @@
}
<div class="modal-footer">
<button class="btn btn-secondary" @onclick="Cancel" disabled="@_connecting">Cancel</button>
<button class="btn btn-secondary" @onclick="Cancel" disabled="@_connecting">@T["btn.cancel"]</button>
<button class="btn btn-primary" @onclick="ConnectAsync" disabled="@_connecting">
@(_connecting ? "Redirecting" : "Connect via Microsoft")
@(_connecting ? T["connect.redirecting"] : T["connect.button"])
</button>
</div>
<p class="text-muted" style="font-size:11px;margin-top:8px;text-align:right">
You will be redirected to Microsoft login. MFA is supported.
@T["connect.redirect.note"]
</p>
</div>
</div>
@@ -54,7 +55,7 @@
private async Task ConnectAsync()
{
var profile = Session.CurrentProfile;
if (profile is null) { _error = "No client profile selected."; return; }
if (profile is null) { _error = T["connect.err.noprofile"]; return; }
_connecting = true;
_error = string.Empty;