mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
add reo to console
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/environment';
|
||||
import { browser, dev } from '$app/environment';
|
||||
import { afterNavigate, goto } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
@@ -106,8 +106,42 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
const reoIdentity = {
|
||||
username: $user.email,
|
||||
type: $user.password ? 'email' : 'github',
|
||||
firstname: $user.name.split(' ')[0],
|
||||
lastname: $user.name.split(' ')[1]
|
||||
};
|
||||
|
||||
if (dev) return;
|
||||
// @ts-expect-error
|
||||
Reo.identify(reoIdentity);
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{#if !dev && browser}
|
||||
<!-- Start of Reo Javascript -->
|
||||
<script type="text/javascript">
|
||||
!(function () {
|
||||
var e, t, n;
|
||||
(e = '144fa7eaa4904e8'),
|
||||
(t = function () {
|
||||
Reo.init({ clientID: '144fa7eaa4904e8' });
|
||||
}),
|
||||
((n = document.createElement('script')).src =
|
||||
'https://static.reo.dev/' + e + '/reo.js'),
|
||||
(n.defer = !0),
|
||||
(n.onload = t),
|
||||
document.head.appendChild(n);
|
||||
})();
|
||||
</script>
|
||||
<!-- End of Reo Javascript -->
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<Notifications />
|
||||
<!-- {#if isCloud}
|
||||
<Consent />
|
||||
|
||||
Reference in New Issue
Block a user