From 2265c73d83bd226147859fd488b1995c57887cef Mon Sep 17 00:00:00 2001 From: Stefan Zerkalica Date: Sun, 3 Nov 2024 20:04:25 +0300 Subject: [PATCH] $mol_service_prompt moved to offline, refactor --- offline/offline.ts | 4 ++-- {service => offline}/prompt/prompt.web.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename {service => offline}/prompt/prompt.web.ts (83%) diff --git a/offline/offline.ts b/offline/offline.ts index 8e046552db1..c226ea0005a 100644 --- a/offline/offline.ts +++ b/offline/offline.ts @@ -7,7 +7,7 @@ namespace $ { @ $mol_mem static prompt() { - this.$.$mol_service_prompt.last()?.prompt() + this.$.$mol_offline_prompt.last()?.prompt() } static override blocked( request: Request ) { @@ -68,7 +68,7 @@ namespace $ { } } - $mol_offline.prompt() + new $mol_after_tick(() => $mol_offline.prompt()) export namespace $mol_service_plugin { export let $mol_offline = $.$mol_offline diff --git a/service/prompt/prompt.web.ts b/offline/prompt/prompt.web.ts similarity index 83% rename from service/prompt/prompt.web.ts rename to offline/prompt/prompt.web.ts index 3628b118ba9..24b6f95780e 100644 --- a/service/prompt/prompt.web.ts +++ b/offline/prompt/prompt.web.ts @@ -8,11 +8,11 @@ namespace $ { }> } - export class $mol_service_prompt extends $mol_object { + export class $mol_offline_prompt extends $mol_object { @ $mol_mem protected static event() { const install = (event: Event) => { - this.last(new this.$.$mol_service_prompt(event as BeforeInstallEvent)) + this.last(new this.$.$mol_offline_prompt(event as BeforeInstallEvent)) } const win = this.$.$mol_dom_context @@ -24,7 +24,7 @@ namespace $ { } @ $mol_mem - static last(next?: $mol_service_prompt) { + static last(next?: $mol_offline_prompt) { this.event() return next ?? null }