diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..64f113ab2 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,7 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: npm install && npm run build + command: npm run dev diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts index eb8e39232..7495b191c 100644 --- a/src/lib/actions/analytics.ts +++ b/src/lib/actions/analytics.ts @@ -3,7 +3,7 @@ import googleAnalytics from '@analytics/google-analytics'; import { get } from 'svelte/store'; import { page } from '$app/stores'; import { user } from '$lib/stores/user'; -import { CONSOLE_MODE_SELF_HOSTED } from '$lib/constants'; +import { Mode } from '$lib/constants'; const analytics = Analytics({ app: 'appwrite', @@ -49,7 +49,7 @@ function sendEventToGrowth(event: string, path: string, data: object = null): vo action: event, label: event, url: window.location.origin + path, - account: import.meta.env.VITE_CONSOLE_MODE?.toString() ?? CONSOLE_MODE_SELF_HOSTED, + account: import.meta.env.VITE_CONSOLE_MODE?.toString() ?? Mode.SELF_HOSTED, data: { email, name, diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 5b00e8508..721c3db12 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -2,9 +2,10 @@ export const PAGE_LIMIT = 12; // default page limit export const CARD_LIMIT = 6; // default card limit export const INTERVAL = 5 * 60000; // default interval to check for feedback -/** Constants to identify console mode */ -export const CONSOLE_MODE_SELF_HOSTED = 'self-hosted'; -export const CONSOLE_MODE_CLOUD = 'cloud'; +export enum Mode { + CLOUD = 'mode:cloud', + SELF_HOSTED = 'mode:self-hosted' +} export enum Dependencies { ORGANIZATION = 'dependency:organization',