Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
feat(glean): remove env check
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfluckey committed Nov 29, 2023
1 parent 229829f commit 90ef3ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions modules/glean/runtime/glean-plugin.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ export default defineNuxtPlugin((nuxtApp) => {
log.info('Glean: App mounted, start initing glean')

const GLEAN_APP_ID = 'moso-mastodon-web'
const env = useAppConfig().env
const devMode = env === ('dev' || 'canary' || 'preview')
const prodMode = env === 'release'
const gleanEnabled = (devMode || prodMode)
const env = useBuildInfo().env
const devMode = env === 'dev'
const userSettings = useUserSettings()
const userAllowGlean = getPreferences(userSettings.value, 'allowGlean')
const uploadEnabled = gleanEnabled && userAllowGlean
const uploadEnabled = userAllowGlean

Glean.initialize(GLEAN_APP_ID, uploadEnabled, { channel: env })
userAgent.set(navigator.userAgent)
Expand Down
2 changes: 0 additions & 2 deletions pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ useHydratedHead({
const route = useRoute()
const isRootPath = computedEager(() => route.name === 'settings')
const devMode = useAppConfig().env === ('dev' || 'canary' || 'preview')
</script>

<template>
Expand Down Expand Up @@ -65,7 +64,6 @@ const devMode = useAppConfig().env === ('dev' || 'canary' || 'preview')
:match="$route.path.startsWith('/settings/preferences/')"
/>
<SettingsItem
v-if="devMode"
command
icon="i-ri-lock-line"
:text="isHydrated ? $t('settings.privacy.label') : ''"
Expand Down

0 comments on commit 90ef3ca

Please sign in to comment.