-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a73227
commit e191090
Showing
13 changed files
with
279 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,39 @@ | ||
import {getWebInstrumentations, initializeFaro} from '@grafana/faro-web-sdk'; | ||
import {TracingInstrumentation} from '@grafana/faro-web-tracing'; | ||
import {PUBLIC_BACKEND_ENDPOINT} from '$env/static/public' | ||
import { getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk'; | ||
import { TracingInstrumentation } from '@grafana/faro-web-tracing'; | ||
import { PUBLIC_BACKEND_ENDPOINT } from '$env/static/public'; | ||
|
||
function setupFaro() { | ||
fetch(`${PUBLIC_BACKEND_ENDPOINT}api/config`). | ||
then(data => data.json()). | ||
then(config => { | ||
const url = config.faro_url; | ||
if (!url) { | ||
console.warn("Grafana faro is not configured.") | ||
return | ||
} | ||
fetch(`${PUBLIC_BACKEND_ENDPOINT}api/config`) | ||
.then((data) => data.json()) | ||
.then((config) => { | ||
const url = config.faro_url; | ||
if (!url) { | ||
console.warn('Grafana faro is not configured.'); | ||
return; | ||
} | ||
|
||
console.log(`Initializing Grafana Faro to ${url}`) | ||
initializeFaro({ | ||
url, | ||
app: { | ||
name: 'QuickPizza', | ||
version: '1.0.0', | ||
environment: 'production' | ||
}, | ||
instrumentations: [ | ||
// Mandatory, overwriting the instrumentations array would cause the default instrumentations to be omitted | ||
...getWebInstrumentations(), | ||
console.log(`Initializing Grafana Faro to ${url}`); | ||
initializeFaro({ | ||
url, | ||
app: { | ||
name: 'QuickPizza', | ||
version: '1.0.0', | ||
environment: 'production' | ||
}, | ||
instrumentations: [ | ||
// Mandatory, overwriting the instrumentations array would cause the default instrumentations to be omitted | ||
...getWebInstrumentations(), | ||
|
||
// Initialization of the tracing package. | ||
// This packages is optional because it increases the bundle size noticeably. Only add it if you want tracing data. | ||
new TracingInstrumentation(), | ||
], | ||
}); | ||
|
||
}). | ||
catch(e => { | ||
console.error("Cannot read config from backend") | ||
console.error(e.message) | ||
}); | ||
// Initialization of the tracing package. | ||
// This packages is optional because it increases the bundle size noticeably. Only add it if you want tracing data. | ||
new TracingInstrumentation() | ||
] | ||
}); | ||
}) | ||
.catch((e) => { | ||
console.error('Cannot read config from backend'); | ||
console.error(e.message); | ||
}); | ||
} | ||
|
||
setupFaro(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,44 @@ | ||
<script> | ||
import { tick } from 'svelte' | ||
export let toggleOnce = false | ||
export let relative = true | ||
let active = false | ||
async function click() { | ||
if (toggleOnce) { | ||
active = !active | ||
return | ||
} | ||
active = false | ||
await tick(); | ||
active = true | ||
} | ||
</script> | ||
|
||
|
||
|
||
<span on:click={click} on:keypress={click} class:relative> | ||
<slot name="label" /> | ||
{#if active} | ||
<div class="confetti"> | ||
<slot /> | ||
</div> | ||
{/if} | ||
</span> | ||
|
||
<style> | ||
.relative { | ||
position: relative; | ||
} | ||
.relative .confetti { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
} | ||
.confetti { | ||
pointer-events: none; | ||
} | ||
</style> | ||
|
||
import { tick } from 'svelte'; | ||
export let toggleOnce = false; | ||
export let relative = true; | ||
let active = false; | ||
async function click() { | ||
if (toggleOnce) { | ||
active = !active; | ||
return; | ||
} | ||
active = false; | ||
await tick(); | ||
active = true; | ||
} | ||
</script> | ||
|
||
<span on:click={click} on:keypress={click} class:relative> | ||
<slot name="label" /> | ||
{#if active} | ||
<div class="confetti"> | ||
<slot /> | ||
</div> | ||
{/if} | ||
</span> | ||
|
||
<style> | ||
.relative { | ||
position: relative; | ||
} | ||
.relative .confetti { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
} | ||
.confetti { | ||
pointer-events: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { writable } from "svelte/store"; | ||
import { writable } from 'svelte/store'; | ||
|
||
export const wsVisitorIDStore = writable(0); | ||
export const userTokenStore = writable(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<script> | ||
import "../app.css"; | ||
import '../app.css'; | ||
</script> | ||
|
||
<div class="flex justify-center"> | ||
<div class="w-[295px] sm:w-[600px] md:w-[735px] lg:w-[900px] xl:w-[1200px] mt-6"> | ||
<slot /> | ||
|
||
<div class="flex justify-center"> | ||
<div class="w-[295px] sm:w-[600px] md:w-[735px] lg:w-[900px] xl:w-[1200px] mt-6"> | ||
<slot /> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const prerender = true | ||
export const prerender = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<slot/> | ||
<slot /> |
Oops, something went wrong.