mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 04:29:16 +00:00
feat: ⚡ new portal web for qr scan
This commit is contained in:
36
packages/portal/src/components/header/header.css
Normal file
36
packages/portal/src/components/header/header.css
Normal file
@@ -0,0 +1,36 @@
|
||||
header {
|
||||
display: flex;
|
||||
background: white;
|
||||
}
|
||||
|
||||
header .logo a {
|
||||
display: inline-block;
|
||||
padding: 10px 10px 7px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header ul {
|
||||
margin: 0;
|
||||
padding: 3px 10px 0 0;
|
||||
list-style: none;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
header li {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header li a {
|
||||
display: inline-block;
|
||||
padding: 15px 10px;
|
||||
text-decoration: none;
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
header li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
47
packages/portal/src/components/header/header.tsx
Normal file
47
packages/portal/src/components/header/header.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import { component$, useStylesScoped$ } from '@builder.io/qwik'
|
||||
import { BotLogo } from '../icons/bot'
|
||||
import styles from './header.css?inline'
|
||||
|
||||
export default component$(() => {
|
||||
useStylesScoped$(styles)
|
||||
|
||||
return (
|
||||
<header>
|
||||
<div class="logo">
|
||||
<a
|
||||
href="https://github.com/codigoencasa/bot-whatsapp"
|
||||
target="_blank"
|
||||
title="qwik"
|
||||
>
|
||||
<BotLogo />
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
href="https://github.com/codigoencasa/bot-whatsapp"
|
||||
target="_blank"
|
||||
>
|
||||
Docs
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://github.com/codigoencasa/bot-whatsapp/tree/main/starters/apps"
|
||||
target="_blank"
|
||||
>
|
||||
Examples
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.youtube.com/watch?v=1u0TTbjK5bo&list=PL_WGMLcL4jzViIlmyDZPnhAdkc8RXGkFh"
|
||||
target="_blank"
|
||||
>
|
||||
Tutorials
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
)
|
||||
})
|
||||
12
packages/portal/src/components/icons/bot.css
Normal file
12
packages/portal/src/components/icons/bot.css
Normal file
@@ -0,0 +1,12 @@
|
||||
.logo {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
18
packages/portal/src/components/icons/bot.tsx
Normal file
18
packages/portal/src/components/icons/bot.tsx
Normal file
File diff suppressed because one or more lines are too long
38
packages/portal/src/components/icons/qwik.tsx
Normal file
38
packages/portal/src/components/icons/qwik.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
export const QwikLogo = () => (
|
||||
<svg
|
||||
width="100"
|
||||
height="35"
|
||||
viewBox="0 0 167 53"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M81.9545 46.5859H75.5513V35.4045C73.4363 36.8579 71.0496 37.5749 68.4884 37.5749C65.0151 37.5749 62.4344 36.6253 60.8239 34.6487C59.2134 32.6915 58.3984 29.2034 58.3984 24.2231C58.3984 19.1266 59.3492 15.5997 61.2702 13.5456C63.23 11.4721 66.3734 10.4644 70.7004 10.4644C74.7946 10.4644 78.5201 11.0264 81.9545 12.131V46.5859ZM75.5513 16.278C74.096 15.8323 72.4661 15.6191 70.7004 15.6191C68.5272 15.6191 66.9749 16.1811 66.1017 17.3244C65.2479 18.4871 64.7823 20.6962 64.7823 23.9712C64.7823 27.0524 65.1897 29.1065 66.0435 30.2304C66.8973 31.335 68.3719 31.897 70.5452 31.897C73.3781 31.897 75.5513 30.7343 75.5513 29.2809V16.278Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M91.133 11.1426C93.4033 17.4406 95.3242 23.7386 96.993 30.0948C99.205 23.5836 101.087 17.2856 102.542 11.1426H108.15C110.265 17.4406 112.031 23.7386 113.447 30.0948C115.97 23.196 117.949 16.8787 119.404 11.1426H125.71C123.033 20.173 120.064 28.777 116.785 36.8966H109.256C108.402 32.3039 107.044 26.7617 105.22 20.1536C104.056 25.2889 102.445 30.8893 100.33 36.8966H92.8018C90.2793 27.5174 87.5434 18.9522 84.6328 11.1426H91.133Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M132.832 7.55758C129.999 7.55758 129.203 6.85996 129.203 3.97257C129.203 1.39523 130.018 0.794495 132.832 0.794495C135.665 0.794495 136.46 1.39523 136.46 3.97257C136.46 6.85996 135.665 7.55758 132.832 7.55758ZM129.649 11.1426H136.053V36.8966H129.649V11.1426Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M166.303 11.1426C161.763 17.5956 158.581 21.5295 156.815 22.9441C158.27 23.8937 162.17 28.8933 167.002 36.916H159.628C153.613 27.7887 150.742 23.8549 149.325 23.2542V36.916H142.922V0H149.325V23.2348C150.78 22.169 153.963 18.1382 158.872 11.1426H166.303Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M40.973 52.5351L32.0861 43.6985L31.9503 43.7179V43.621L13.0511 24.9595L17.708 20.4637L14.9721 4.76715L1.99103 20.8513C-0.220992 23.0798 -0.628467 26.7036 0.962635 29.3778L9.07337 42.8265C10.3152 44.9 12.566 46.1402 14.9915 46.1208L19.0081 46.082L40.973 52.5351Z"
|
||||
fill="#18B6F6"
|
||||
/>
|
||||
<path
|
||||
d="M45.8232 20.5411L44.038 17.2468L43.1066 15.5609L42.738 14.902L42.6992 14.9408L37.8094 6.47238C36.587 4.34075 34.2974 3.02301 31.8137 3.04239L27.5255 3.15865L14.7384 3.19741C12.313 3.21679 10.101 4.49577 8.87853 6.56927L1.09766 21.9945L15.0101 4.72831L33.2496 24.7656L30.0091 28.0406L31.9495 43.7178L31.9689 43.679V43.7178H31.9301L31.9689 43.7565L33.4824 45.2293L40.8364 52.4187C41.1469 52.7094 41.6514 52.3606 41.4379 51.9924L36.8975 43.0589L44.8142 28.4282L45.0664 28.1375C45.1634 28.0212 45.2604 27.905 45.3381 27.7887C46.8904 25.6764 47.1038 22.8472 45.8232 20.5411Z"
|
||||
fill="#AC7EF4"
|
||||
/>
|
||||
<path
|
||||
d="M33.3076 24.6882L15.0099 4.74774L17.61 20.3668L12.9531 24.882L31.9105 43.6985L30.203 28.0794L33.3076 24.6882Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
12
packages/portal/src/components/qr/qr.css
Normal file
12
packages/portal/src/components/qr/qr.css
Normal file
@@ -0,0 +1,12 @@
|
||||
div img {
|
||||
display: block;
|
||||
background-color: #f0f0f0;
|
||||
width: 350px;
|
||||
height: 350px;
|
||||
object-fit: contain;
|
||||
border-radius: 10px;
|
||||
}
|
||||
div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
35
packages/portal/src/components/qr/qr.tsx
Normal file
35
packages/portal/src/components/qr/qr.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
component$,
|
||||
useClientEffect$,
|
||||
useStore,
|
||||
useStylesScoped$,
|
||||
} from '@builder.io/qwik'
|
||||
import { useLocation } from '@builder.io/qwik-city'
|
||||
import style from './qr.css?inline'
|
||||
|
||||
export const QR = component$(() => {
|
||||
useStylesScoped$(style)
|
||||
const state = useStore({
|
||||
count: 0,
|
||||
})
|
||||
|
||||
useClientEffect$(() => {
|
||||
setInterval(() => {
|
||||
state.count++
|
||||
}, 800)
|
||||
})
|
||||
|
||||
const location = useLocation()
|
||||
const qrImage = location.query?.qr ?? 'qr.png'
|
||||
|
||||
return (
|
||||
<div>
|
||||
<img
|
||||
width={350}
|
||||
height={350}
|
||||
src={qrImage + '?time=' + state.count}
|
||||
alt="QR"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
32
packages/portal/src/components/router-head/router-head.tsx
Normal file
32
packages/portal/src/components/router-head/router-head.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { component$ } from '@builder.io/qwik'
|
||||
import { useDocumentHead, useLocation } from '@builder.io/qwik-city'
|
||||
|
||||
export const RouterHead = component$(() => {
|
||||
const head = useDocumentHead()
|
||||
const loc = useLocation()
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>{head.title}</title>
|
||||
|
||||
<link rel="canonical" href={loc.href} />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0"
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
|
||||
{head.meta.map((m) => (
|
||||
<meta {...m} />
|
||||
))}
|
||||
|
||||
{head.links.map((l) => (
|
||||
<link {...l} />
|
||||
))}
|
||||
|
||||
{head.styles.map((s) => (
|
||||
<style {...s.props} dangerouslySetInnerHTML={s.style} />
|
||||
))}
|
||||
</>
|
||||
)
|
||||
})
|
||||
18
packages/portal/src/entry.dev.tsx
Normal file
18
packages/portal/src/entry.dev.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* WHAT IS THIS FILE?
|
||||
*
|
||||
* Development entry point using only client-side modules:
|
||||
* - Do not use this mode in production!
|
||||
* - No SSR
|
||||
* - No portion of the application is pre-rendered on the server.
|
||||
* - All of the application is running eagerly in the browser.
|
||||
* - More code is transferred to the browser than in SSR mode.
|
||||
* - Optimizer/Serialization/Deserialization code is not exercised!
|
||||
*/
|
||||
import type { RenderOptions } from '@builder.io/qwik'
|
||||
import { render } from '@builder.io/qwik'
|
||||
import Root from './root'
|
||||
|
||||
export default function (opts: RenderOptions) {
|
||||
return render(document, <Root />, opts)
|
||||
}
|
||||
20
packages/portal/src/entry.preview.tsx
Normal file
20
packages/portal/src/entry.preview.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* WHAT IS THIS FILE?
|
||||
*
|
||||
* It's the bundle entry point for `npm run preview`.
|
||||
* That is, serving your app built in production mode.
|
||||
*
|
||||
* Feel free to modify this file, but don't remove it!
|
||||
*
|
||||
* Learn more about Vite's preview command:
|
||||
* - https://vitejs.dev/config/preview-options.html#preview-options
|
||||
*
|
||||
*/
|
||||
import { createQwikCity } from '@builder.io/qwik-city/middleware/node'
|
||||
import render from './entry.ssr'
|
||||
import qwikCityPlan from '@qwik-city-plan'
|
||||
|
||||
/**
|
||||
* The default export is the QwikCity adaptor used by Vite preview.
|
||||
*/
|
||||
export default createQwikCity({ render, qwikCityPlan })
|
||||
28
packages/portal/src/entry.ssr.tsx
Normal file
28
packages/portal/src/entry.ssr.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* WHAT IS THIS FILE?
|
||||
*
|
||||
* SSR entry point, in all cases the application is render outside the browser, this
|
||||
* entry point will be the common one.
|
||||
*
|
||||
* - Server (express, cloudflare...)
|
||||
* - npm run start
|
||||
* - npm run preview
|
||||
* - npm run build
|
||||
*
|
||||
*/
|
||||
import type { RenderToStreamOptions } from '@builder.io/qwik/server'
|
||||
import { renderToStream } from '@builder.io/qwik/server'
|
||||
import { manifest } from '@qwik-client-manifest'
|
||||
import Root from './root'
|
||||
|
||||
export default function (opts: RenderToStreamOptions) {
|
||||
return renderToStream(<Root />, {
|
||||
manifest,
|
||||
...opts,
|
||||
// Use container attributes to set attributes on the html tag.
|
||||
containerAttributes: {
|
||||
lang: 'en-us',
|
||||
...opts.containerAttributes,
|
||||
},
|
||||
})
|
||||
}
|
||||
125
packages/portal/src/global.css
Normal file
125
packages/portal/src/global.css
Normal file
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
* WHAT IS THIS FILE?
|
||||
*
|
||||
* Globally applied styles. No matter which components are in the page or matching route,
|
||||
* the styles in here will be applied to the Document, without any sort of CSS scoping.
|
||||
*
|
||||
*/
|
||||
|
||||
:root {
|
||||
--qwik-dark-blue: #1a1a1a;
|
||||
--qwik-light-blue: #349713;
|
||||
--qwik-light-purple: #73da51;
|
||||
--qwik-dark-purple: #3f9622;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #fafafa;
|
||||
font-family: 'Inter', sans-serif, ui-sans-serif, system-ui, -apple-system,
|
||||
BlinkMacSystemFont, sans-serif;
|
||||
padding: 20px 20px 40px 20px;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
border-radius: 5px;
|
||||
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.lightning {
|
||||
filter: hue-rotate(180deg);
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: square;
|
||||
margin: 5px 0 30px 0;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
li::marker {
|
||||
color: var(--qwik-light-blue);
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
color: var(--qwik-dark-blue);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
table.commands {
|
||||
margin: 0 0 30px 0;
|
||||
}
|
||||
|
||||
.commands td {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.commands td:first-child {
|
||||
white-space: nowrap;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Menlo, Monaco, Courier New, monospace;
|
||||
font-size: 0.9em;
|
||||
background-color: rgb(224, 224, 224);
|
||||
padding: 2px 4px;
|
||||
border-radius: 3px;
|
||||
border-bottom: 2px solid #bfbfbf;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
footer a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a.mindblow {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
background: var(--qwik-dark-purple);
|
||||
padding: 10px 20px;
|
||||
border-radius: 10px;
|
||||
border: 0;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
width: fit-content;
|
||||
border-bottom: 4px solid black;
|
||||
cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🤯</text></svg>")
|
||||
16 0,
|
||||
auto; /*!emojicursor.app*/
|
||||
}
|
||||
|
||||
a.mindblow:hover {
|
||||
border-bottom-width: 0px;
|
||||
margin-bottom: 4px;
|
||||
transform: translateY(4px);
|
||||
}
|
||||
29
packages/portal/src/root.tsx
Normal file
29
packages/portal/src/root.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||
import { QwikCityProvider, RouterOutlet } from '@builder.io/qwik-city'
|
||||
import { RouterHead } from './components/router-head/router-head'
|
||||
|
||||
import globalStyles from './global.css?inline'
|
||||
|
||||
export default component$(() => {
|
||||
/**
|
||||
* The root of a QwikCity site always start with the <QwikCityProvider> component,
|
||||
* immediately followed by the document's <head> and <body>.
|
||||
*
|
||||
* Dont remove the `<head>` and `<body>` elements.
|
||||
*/
|
||||
useStyles$(globalStyles)
|
||||
|
||||
return (
|
||||
<QwikCityProvider>
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<link rel="preconnect" href="https://rsms.me/" />
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
|
||||
<RouterHead />
|
||||
</head>
|
||||
<body lang="en">
|
||||
<RouterOutlet />
|
||||
</body>
|
||||
</QwikCityProvider>
|
||||
)
|
||||
})
|
||||
23
packages/portal/src/routes/index.css
Normal file
23
packages/portal/src/routes/index.css
Normal file
@@ -0,0 +1,23 @@
|
||||
.page {
|
||||
display: grid;
|
||||
padding: 1rem;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.page .qr-section.links {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.page .btn-link {
|
||||
background: white;
|
||||
box-shadow: rgb(0 0 0 / 16%) 0px 10px 36px 0px,
|
||||
rgb(0 0 0 / 6%) 0px 0px 0px 1px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
color: #1a1a1a;
|
||||
border: solid 1px #afafaf;
|
||||
}
|
||||
61
packages/portal/src/routes/index.tsx
Normal file
61
packages/portal/src/routes/index.tsx
Normal file
@@ -0,0 +1,61 @@
|
||||
import { component$, useStylesScoped$ } from '@builder.io/qwik'
|
||||
import type { DocumentHead } from '@builder.io/qwik-city'
|
||||
import { QR } from '~/components/qr/qr'
|
||||
|
||||
import style from './index.css?inline'
|
||||
|
||||
export default component$(() => {
|
||||
useStylesScoped$(style)
|
||||
|
||||
return (
|
||||
<div class={'page'}>
|
||||
<div class={'qr-section'}>
|
||||
<QR />
|
||||
</div>
|
||||
<div class={'qr-section intructions'}>
|
||||
<h1>Whatsapp QR</h1>
|
||||
<p>
|
||||
Con esta libreria, puedes configurar respuestas
|
||||
automatizadas para preguntas frecuentes, recibir y responder
|
||||
mensajes de manera automatizada, y hacer un seguimiento de
|
||||
las interacciones con los clientes. <br /> Además, nuestro
|
||||
Chatbot se integra fácilmente con otros sistemas y
|
||||
herramientas que ya esté utilizando en su negocio.
|
||||
</p>
|
||||
<div class={'qr-section links'}>
|
||||
<a
|
||||
class={'btn-link '}
|
||||
target="_blank"
|
||||
href="https://bot-whatsapp.netlify.app/"
|
||||
>
|
||||
Ver documentación
|
||||
</a>
|
||||
<a
|
||||
class={'btn-link '}
|
||||
target="_blank"
|
||||
href="https://www.youtube.com/watch?v=1u0TTbjK5bo&list=PL_WGMLcL4jzViIlmyDZPnhAdkc8RXGkFh"
|
||||
>
|
||||
Ver videos
|
||||
</a>
|
||||
<a
|
||||
class={'btn-link '}
|
||||
target="_blank"
|
||||
href="https://opencollective.com/bot-whatsapp"
|
||||
>
|
||||
Comprar café
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
||||
export const head: DocumentHead = {
|
||||
title: '🤖 Crear chatbot WhatsApp en minutos',
|
||||
meta: [
|
||||
{
|
||||
name: 'description',
|
||||
content: '🤖 Crear chatbot WhatsApp en minutos',
|
||||
},
|
||||
],
|
||||
}
|
||||
20
packages/portal/src/routes/layout.tsx
Normal file
20
packages/portal/src/routes/layout.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { component$, Slot } from '@builder.io/qwik'
|
||||
import Header from '../components/header/header'
|
||||
|
||||
export default component$(() => {
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
<Header />
|
||||
<section>
|
||||
<Slot />
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<a href="https://qwik.builder.io/" target="_blank">
|
||||
Made with <strong>Qwik</strong>
|
||||
</a>
|
||||
</footer>
|
||||
</>
|
||||
)
|
||||
})
|
||||
18
packages/portal/src/routes/service-worker.ts
Normal file
18
packages/portal/src/routes/service-worker.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* WHAT IS THIS FILE?
|
||||
*
|
||||
* The service-worker.ts file is used to have state of the art prefetching.
|
||||
* https://qwik.builder.io/qwikcity/prefetching/overview/
|
||||
*
|
||||
* Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
|
||||
* You can also use this file to add more functionality that runs in the service worker.
|
||||
*/
|
||||
import { setupServiceWorker } from '@builder.io/qwik-city/service-worker'
|
||||
|
||||
setupServiceWorker()
|
||||
|
||||
addEventListener('install', () => self.skipWaiting())
|
||||
|
||||
addEventListener('activate', () => self.clients.claim())
|
||||
|
||||
declare const self: ServiceWorkerGlobalScope
|
||||
Reference in New Issue
Block a user