forked from retoor/devplacepy
feat: add authenticated my-profile endpoint and clean breadcrumb markdown in SEO context
- Add GET /profile route returning own profile page with tab support, backed by new my_profile_page handler in profile/index.py and documented in docs_api.py - Introduce _clean_breadcrumbs helper in seo.py that strips markdown from breadcrumb names before passing to schema generation - Skip data-confirm modal for elements with data-auto-submit attribute in ModalManager.js - Guard PushManager subscription against missing userUid and capture it from document body dataset - Switch profile bio template from render_title to render_content and use div instead of span for proper block rendering
This commit is contained in:
@@ -111,6 +111,7 @@ export class ModalManager {
|
||||
document.addEventListener("click", (e) => {
|
||||
const el = e.target.closest("[data-confirm]");
|
||||
if (!el) return;
|
||||
if (el.hasAttribute("data-auto-submit")) return;
|
||||
if (el.dataset.confirmed === "1") {
|
||||
delete el.dataset.confirmed;
|
||||
return;
|
||||
|
||||
@@ -8,6 +8,7 @@ export class PushManager {
|
||||
if (!this.supported) {
|
||||
return;
|
||||
}
|
||||
this.userUid = document.body.dataset.userUid || "";
|
||||
this.triggers = Array.from(document.querySelectorAll("[data-push-enable]"));
|
||||
this.bindTriggers();
|
||||
this.refreshTriggerVisibility();
|
||||
@@ -48,6 +49,10 @@ export class PushManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.userUid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const keyData = await Http.getJson("/push.json");
|
||||
const applicationServerKey = Uint8Array.from(atob(keyData.publicKey), (c) => c.charCodeAt(0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user