Rename Phase 1A: Internal PlotWeaver technical cleanup only
This commit is contained in:
parent
6069a2e9a7
commit
813dacdea9
@ -38,7 +38,7 @@ public class Program
|
||||
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
|
||||
.AddCookie(options =>
|
||||
{
|
||||
options.Cookie.Name = "PlotWeaver.Auth";
|
||||
options.Cookie.Name = "PlotLine.Auth";
|
||||
options.LoginPath = "/Account/Login";
|
||||
options.LogoutPath = "/Account/Logout";
|
||||
options.AccessDeniedPath = "/Account/AccessDenied";
|
||||
@ -52,7 +52,7 @@ public class Program
|
||||
OnValidatePrincipal = async context =>
|
||||
{
|
||||
var userIdValue = context.Principal?.FindFirstValue(ClaimTypes.NameIdentifier);
|
||||
var securityStampValue = context.Principal?.FindFirstValue("PlotWeaver.SecurityStamp");
|
||||
var securityStampValue = context.Principal?.FindFirstValue("PlotLine.SecurityStamp");
|
||||
if (!int.TryParse(userIdValue, out var userId) || !Guid.TryParse(securityStampValue, out var securityStamp))
|
||||
{
|
||||
context.RejectPrincipal();
|
||||
|
||||
@ -237,11 +237,11 @@ public sealed class AuthService(
|
||||
private static readonly TimeSpan PendingTwoFactorLifetime = TimeSpan.FromMinutes(10);
|
||||
private static readonly TimeSpan LockoutDuration = TimeSpan.FromMinutes(15);
|
||||
private const int MaxFailedLoginAttempts = 5;
|
||||
private const string SecurityStampClaimType = "PlotWeaver.SecurityStamp";
|
||||
private const string PendingTwoFactorUserIdKey = "PlotWeaver.PendingTwoFactor.UserID";
|
||||
private const string PendingTwoFactorRememberMeKey = "PlotWeaver.PendingTwoFactor.RememberMe";
|
||||
private const string PendingTwoFactorReturnUrlKey = "PlotWeaver.PendingTwoFactor.ReturnUrl";
|
||||
private const string PendingTwoFactorExpiresUtcKey = "PlotWeaver.PendingTwoFactor.ExpiresUtc";
|
||||
private const string SecurityStampClaimType = "PlotLine.SecurityStamp";
|
||||
private const string PendingTwoFactorUserIdKey = "PlotLine.PendingTwoFactor.UserID";
|
||||
private const string PendingTwoFactorRememberMeKey = "PlotLine.PendingTwoFactor.RememberMe";
|
||||
private const string PendingTwoFactorReturnUrlKey = "PlotLine.PendingTwoFactor.ReturnUrl";
|
||||
private const string PendingTwoFactorExpiresUtcKey = "PlotLine.PendingTwoFactor.ExpiresUtc";
|
||||
|
||||
public async Task<RegistrationResult> RegisterAsync(RegisterViewModel model)
|
||||
{
|
||||
|
||||
@ -27,15 +27,15 @@ public sealed class HelpIconTagHelper(IHelpService help) : TagHelper
|
||||
output.TagName = "span";
|
||||
output.TagMode = TagMode.StartTagAndEndTag;
|
||||
output.Attributes.SetAttribute("class", isInline
|
||||
? "plotweaver-help-icon-wrapper plotweaver-help-icon-wrapper-inline"
|
||||
: "plotweaver-help-icon-wrapper");
|
||||
? "plotline-help-icon-wrapper plotline-help-icon-wrapper-inline"
|
||||
: "plotline-help-icon-wrapper");
|
||||
output.Attributes.SetAttribute("data-help-icon", "true");
|
||||
output.Attributes.SetAttribute("data-help-key", Key);
|
||||
output.Attributes.SetAttribute("data-help-title", quickTitle);
|
||||
output.Attributes.SetAttribute("data-help-summary", quickSummary);
|
||||
output.Content.SetHtmlContent($"""
|
||||
<button type="button"
|
||||
class="plotweaver-help-icon"
|
||||
class="plotline-help-icon"
|
||||
aria-label="Help: {WebUtility.HtmlEncode(quickTitle)}"
|
||||
data-help-tooltip="true"
|
||||
data-help-micro="{WebUtility.HtmlEncode(micro)}">?</button>
|
||||
|
||||
@ -140,8 +140,8 @@
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="plotweaver-help-layout" data-help-layout>
|
||||
<div class="plotweaver-help-main">
|
||||
<div class="plotline-help-layout" data-help-layout>
|
||||
<div class="plotline-help-main">
|
||||
<div class="container-fluid plotline-shell @ViewData["ShellClass"]">
|
||||
<main role="main" class="pb-3">
|
||||
@if (TempData["ArchiveMessage"] is string archiveMessage)
|
||||
@ -160,11 +160,11 @@
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plotweaver-help-splitter" data-help-splitter role="separator" aria-orientation="vertical" aria-label="Resize help drawer"></div>
|
||||
<aside class="plotweaver-help-drawer" data-help-drawer aria-label="Help drawer">
|
||||
<div class="plotweaver-help-collapsed-strip" data-help-expand role="button" tabindex="0" aria-label="Expand help drawer">Help</div>
|
||||
<div class="plotweaver-help-drawer-panel">
|
||||
<header class="plotweaver-help-drawer-header">
|
||||
<div class="plotline-help-splitter" data-help-splitter role="separator" aria-orientation="vertical" aria-label="Resize help drawer"></div>
|
||||
<aside class="plotline-help-drawer" data-help-drawer aria-label="Help drawer">
|
||||
<div class="plotline-help-collapsed-strip" data-help-expand role="button" tabindex="0" aria-label="Expand help drawer">Help</div>
|
||||
<div class="plotline-help-drawer-panel">
|
||||
<header class="plotline-help-drawer-header">
|
||||
<div>
|
||||
<p class="eyebrow mb-0">Contextual help</p>
|
||||
<strong data-help-drawer-heading>Help</strong>
|
||||
@ -175,7 +175,7 @@
|
||||
<button class="btn btn-outline-secondary" type="button" data-help-close>Close</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="plotweaver-help-drawer-content" data-help-content>
|
||||
<div class="plotline-help-drawer-content" data-help-content>
|
||||
<p class="muted">Choose More from a help popover to open the full guide.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1669,7 +1669,7 @@ a:focus-visible {
|
||||
--bs-alert-border-color: #705229;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout {
|
||||
.plotline-help-layout {
|
||||
--help-drawer-width: 25%;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
@ -1678,25 +1678,25 @@ a:focus-visible {
|
||||
transition: gap 0.18s ease;
|
||||
}
|
||||
|
||||
.plotweaver-help-main {
|
||||
.plotline-help-main {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
transition: flex-basis 0.18s ease;
|
||||
}
|
||||
|
||||
.plotweaver-help-splitter,
|
||||
.plotweaver-help-drawer {
|
||||
.plotline-help-splitter,
|
||||
.plotline-help-drawer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-open .plotweaver-help-splitter {
|
||||
.plotline-help-layout.help-open .plotline-help-splitter {
|
||||
display: block;
|
||||
flex: 0 0 8px;
|
||||
cursor: col-resize;
|
||||
background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.22), transparent);
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-open .plotweaver-help-drawer {
|
||||
.plotline-help-layout.help-open .plotline-help-drawer {
|
||||
display: block;
|
||||
flex: 0 0 clamp(20%, var(--help-drawer-width), 50%);
|
||||
min-width: 20%;
|
||||
@ -1706,25 +1706,25 @@ a:focus-visible {
|
||||
transition: flex-basis 0.18s ease;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-collapsed .plotweaver-help-splitter {
|
||||
.plotline-help-layout.help-collapsed .plotline-help-splitter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-collapsed .plotweaver-help-drawer {
|
||||
.plotline-help-layout.help-collapsed .plotline-help-drawer {
|
||||
flex-basis: 2.35rem;
|
||||
min-width: 2.35rem;
|
||||
max-width: 2.35rem;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-collapsed .plotweaver-help-drawer-panel {
|
||||
.plotline-help-layout.help-collapsed .plotline-help-drawer-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-collapsed-strip {
|
||||
.plotline-help-collapsed-strip {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-layout.help-collapsed .plotweaver-help-collapsed-strip {
|
||||
.plotline-help-layout.help-collapsed .plotline-help-collapsed-strip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -1739,7 +1739,7 @@ a:focus-visible {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.plotweaver-help-drawer-panel {
|
||||
.plotline-help-drawer-panel {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
display: flex;
|
||||
@ -1747,7 +1747,7 @@ a:focus-visible {
|
||||
max-height: calc(100vh - 1rem);
|
||||
}
|
||||
|
||||
.plotweaver-help-drawer-header {
|
||||
.plotline-help-drawer-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
@ -1756,7 +1756,7 @@ a:focus-visible {
|
||||
border-bottom: 1px solid rgba(107, 114, 128, 0.18);
|
||||
}
|
||||
|
||||
.plotweaver-help-drawer-content {
|
||||
.plotline-help-drawer-content {
|
||||
min-height: 12rem;
|
||||
padding: 1rem;
|
||||
overflow: auto;
|
||||
@ -1815,7 +1815,7 @@ a:focus-visible {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-icon {
|
||||
.plotline-help-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -1833,60 +1833,60 @@ a:focus-visible {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.plotweaver-help-icon-wrapper {
|
||||
.plotline-help-icon-wrapper {
|
||||
display: inline-flex;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.plotweaver-help-icon-wrapper-inline .plotweaver-help-icon {
|
||||
.plotline-help-icon-wrapper-inline .plotline-help-icon {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin-left: 0.25rem;
|
||||
font-size: 0.68rem;
|
||||
}
|
||||
|
||||
.plotweaver-help-icon:hover,
|
||||
.plotweaver-help-icon:focus {
|
||||
.plotline-help-icon:hover,
|
||||
.plotline-help-icon:focus {
|
||||
color: #2f6f63;
|
||||
border-color: #2f6f63;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.plotweaver-help-popover {
|
||||
.plotline-help-popover {
|
||||
max-width: 350px;
|
||||
}
|
||||
|
||||
.plotweaver-help-popover .popover-header {
|
||||
.plotline-help-popover .popover-header {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.plotweaver-help-more {
|
||||
.plotline-help-more {
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .plotweaver-help-icon {
|
||||
[data-theme="dark"] .plotline-help-icon {
|
||||
color: #d8d0c4;
|
||||
border-color: rgba(216, 208, 196, 0.45);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .plotweaver-help-icon:hover,
|
||||
[data-theme="dark"] .plotweaver-help-icon:focus {
|
||||
[data-theme="dark"] .plotline-help-icon:hover,
|
||||
[data-theme="dark"] .plotline-help-icon:focus {
|
||||
color: #f1c38f;
|
||||
border-color: #f1c38f;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .plotweaver-help-layout.help-open .plotweaver-help-drawer {
|
||||
[data-theme="dark"] .plotline-help-layout.help-open .plotline-help-drawer {
|
||||
border-left-color: rgba(255, 255, 255, 0.12);
|
||||
background: rgba(22, 22, 27, 0.97);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .plotweaver-help-drawer-header,
|
||||
[data-theme="dark"] .plotline-help-drawer-header,
|
||||
[data-theme="dark"] .help-related-section {
|
||||
border-color: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .plotweaver-help-collapsed-strip {
|
||||
[data-theme="dark"] .plotline-help-collapsed-strip {
|
||||
color: #d8d0c4;
|
||||
}
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@
|
||||
placement: "auto",
|
||||
container: "body",
|
||||
html: true,
|
||||
customClass: "plotweaver-help-popover",
|
||||
customClass: "plotline-help-popover",
|
||||
content() {
|
||||
const wrapper = document.createElement("div");
|
||||
const summaryText = document.createElement("p");
|
||||
@ -198,12 +198,12 @@
|
||||
const moreLink = document.createElement("a");
|
||||
moreLink.href = "#";
|
||||
moreLink.textContent = "More...";
|
||||
moreLink.className = "plotweaver-help-more";
|
||||
moreLink.className = "plotline-help-more";
|
||||
moreLink.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
hideActivePopover();
|
||||
hideAllHelpTooltips();
|
||||
icon.dispatchEvent(new CustomEvent("plotweaver:help-more", {
|
||||
icon.dispatchEvent(new CustomEvent("plotline:help-more", {
|
||||
bubbles: true,
|
||||
detail: { key: icon.dataset.helpKey || "" }
|
||||
}));
|
||||
@ -216,7 +216,7 @@
|
||||
popovers.set(icon, popover);
|
||||
|
||||
icon.addEventListener("click", (event) => {
|
||||
if (!window.PlotWeaverHelpDrawer?.isActive?.()) {
|
||||
if (!window.PlotLineHelpDrawer?.isActive?.()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -224,11 +224,11 @@
|
||||
event.stopPropagation();
|
||||
hideActivePopover();
|
||||
hideTooltip(icon);
|
||||
window.PlotWeaverHelpPopovers?.hideAll();
|
||||
window.PlotWeaverHelpDrawer.open(icon.dataset.helpKey || "");
|
||||
window.PlotLineHelpPopovers?.hideAll();
|
||||
window.PlotLineHelpDrawer.open(icon.dataset.helpKey || "");
|
||||
});
|
||||
icon.addEventListener("show.bs.popover", (event) => {
|
||||
if (window.PlotWeaverHelpDrawer?.isActive?.()) {
|
||||
if (window.PlotLineHelpDrawer?.isActive?.()) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
@ -271,7 +271,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
window.PlotWeaverHelpPopovers = {
|
||||
window.PlotLineHelpPopovers = {
|
||||
hideAll() {
|
||||
popovers.forEach((popover) => popover.hide());
|
||||
hideAllHelpTooltips();
|
||||
@ -295,10 +295,10 @@
|
||||
}
|
||||
|
||||
const storage = {
|
||||
width: "plotweaver.helpDrawer.width",
|
||||
pinned: "plotweaver.helpDrawer.pinned",
|
||||
key: "plotweaver.helpDrawer.key",
|
||||
collapsed: "plotweaver.helpDrawer.collapsed"
|
||||
width: "plotline.helpDrawer.width",
|
||||
pinned: "plotline.helpDrawer.pinned",
|
||||
key: "plotline.helpDrawer.key",
|
||||
collapsed: "plotline.helpDrawer.collapsed"
|
||||
};
|
||||
|
||||
const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
||||
@ -374,7 +374,7 @@
|
||||
setPinned(false);
|
||||
};
|
||||
|
||||
window.PlotWeaverHelpDrawer = {
|
||||
window.PlotLineHelpDrawer = {
|
||||
isActive() {
|
||||
return layout.classList.contains("help-open");
|
||||
},
|
||||
@ -387,9 +387,9 @@
|
||||
setPinned(readBool(storage.pinned));
|
||||
setCollapsed(readBool(storage.collapsed));
|
||||
|
||||
document.addEventListener("plotweaver:help-more", (event) => {
|
||||
document.addEventListener("plotline:help-more", (event) => {
|
||||
const key = event.detail?.key || event.target?.dataset?.helpKey || "";
|
||||
window.PlotWeaverHelpPopovers?.hideAll();
|
||||
window.PlotLineHelpPopovers?.hideAll();
|
||||
openDrawer(key);
|
||||
});
|
||||
|
||||
@ -400,7 +400,7 @@
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
window.PlotWeaverHelpPopovers?.hideAll();
|
||||
window.PlotLineHelpPopovers?.hideAll();
|
||||
openDrawer(opener.dataset.helpOpen || "");
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user