mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:10:45 +00:00
fix: address remaining review feedback
- Use base-path-relative manifest URL (no leading slash) so PWA works under non-root base paths - Classify push.web.* methods in WRITE_SCOPE so they work for operator sessions without admin scope - Refresh webPushPermission in the finally block of handleWebPushSubscribe so denied permission is immediately reflected in the UI
This commit is contained in:
committed by
Val Alexander
parent
8858c3cf01
commit
b079b36677
@@ -146,6 +146,10 @@ const METHOD_SCOPE_GROUPS: Record<OperatorScope, readonly string[]> = {
|
||||
"doctor.memory.repairDreamingArtifacts",
|
||||
"doctor.memory.dedupeDreamDiary",
|
||||
"push.test",
|
||||
"push.web.vapidPublicKey",
|
||||
"push.web.subscribe",
|
||||
"push.web.unsubscribe",
|
||||
"push.web.test",
|
||||
"node.pending.enqueue",
|
||||
],
|
||||
[ADMIN_SCOPE]: [
|
||||
|
||||
@@ -984,6 +984,10 @@ export class OpenClawApp extends LitElement {
|
||||
this.lastError = String(err);
|
||||
} finally {
|
||||
this.webPushLoading = false;
|
||||
// Always refresh permission state — catches denied prompts too.
|
||||
if ("Notification" in window) {
|
||||
this.webPushPermission = Notification.permission;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user