feat: enable telemetry toggle button
This commit is contained in:
@@ -13,6 +13,7 @@ type SettingsCustomDimensions = {
|
|||||||
syncHistory: boolean
|
syncHistory: boolean
|
||||||
usesBg: HoppBgColor
|
usesBg: HoppBgColor
|
||||||
usesAccent: HoppAccentColor
|
usesAccent: HoppAccentColor
|
||||||
|
usesTelemetry: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
type HoppRequestEvent =
|
type HoppRequestEvent =
|
||||||
@@ -54,6 +55,7 @@ function initSettingsListeners() {
|
|||||||
syncHistory: settings.syncHistory,
|
syncHistory: settings.syncHistory,
|
||||||
usesAccent: settings.THEME_COLOR,
|
usesAccent: settings.THEME_COLOR,
|
||||||
usesBg: settings.BG_COLOR,
|
usesBg: settings.BG_COLOR,
|
||||||
|
usesTelemetry: settings.TELEMETRY_ENABLED,
|
||||||
}
|
}
|
||||||
|
|
||||||
analytics.setUserProperties(conf)
|
analytics.setUserProperties(conf)
|
||||||
|
|||||||
@@ -339,5 +339,6 @@
|
|||||||
"hide_sidebar": "Hide sidebar",
|
"hide_sidebar": "Hide sidebar",
|
||||||
"show_sidebar": "Show sidebar",
|
"show_sidebar": "Show sidebar",
|
||||||
"protocols": "Protocols",
|
"protocols": "Protocols",
|
||||||
"protocol_count": "protocol {count}"
|
"protocol_count": "protocol {count}",
|
||||||
|
"telemetry": "Telemetry"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export type SettingsType = {
|
|||||||
}
|
}
|
||||||
THEME_COLOR: HoppAccentColor
|
THEME_COLOR: HoppAccentColor
|
||||||
BG_COLOR: HoppBgColor
|
BG_COLOR: HoppBgColor
|
||||||
|
TELEMETRY_ENABLED: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSettings: SettingsType = {
|
export const defaultSettings: SettingsType = {
|
||||||
@@ -62,6 +63,7 @@ export const defaultSettings: SettingsType = {
|
|||||||
},
|
},
|
||||||
THEME_COLOR: "green",
|
THEME_COLOR: "green",
|
||||||
BG_COLOR: "system",
|
BG_COLOR: "system",
|
||||||
|
TELEMETRY_ENABLED: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
const validKeys = Object.keys(defaultSettings)
|
const validKeys = Object.keys(defaultSettings)
|
||||||
|
|||||||
@@ -199,6 +199,15 @@
|
|||||||
{{ $t("use_experimental_url_bar") }}
|
{{ $t("use_experimental_url_bar") }}
|
||||||
</SmartToggle>
|
</SmartToggle>
|
||||||
</div>
|
</div>
|
||||||
|
<span>
|
||||||
|
<SmartToggle
|
||||||
|
:on="TELEMETRY_ENABLED"
|
||||||
|
@change="toggleSetting('TELEMETRY_ENABLED')"
|
||||||
|
>
|
||||||
|
{{ $t("telemetry") }}
|
||||||
|
{{ TELEMETRY_ENABLED ? $t("enabled") : $t("disabled") }}
|
||||||
|
</SmartToggle>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</AppSection>
|
</AppSection>
|
||||||
<FirebaseEmail :show="showEmail" @hide-modal="showEmail = false" />
|
<FirebaseEmail :show="showEmail" @hide-modal="showEmail = false" />
|
||||||
@@ -263,6 +272,8 @@ export default Vue.extend({
|
|||||||
SYNC_ENVIRONMENTS: getSettingSubject("syncEnvironments"),
|
SYNC_ENVIRONMENTS: getSettingSubject("syncEnvironments"),
|
||||||
SYNC_HISTORY: getSettingSubject("syncHistory"),
|
SYNC_HISTORY: getSettingSubject("syncHistory"),
|
||||||
|
|
||||||
|
TELEMETRY_ENABLED: getSettingSubject("TELEMETRY_ENABLED"),
|
||||||
|
|
||||||
// Teams feature flag
|
// Teams feature flag
|
||||||
currentBackendUser: currentUserInfo$,
|
currentBackendUser: currentUserInfo$,
|
||||||
currentUser: currentUser$,
|
currentUser: currentUser$,
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ export const SETTINGS_KEYS = [
|
|||||||
*/
|
*/
|
||||||
"EXTENSIONS_ENABLED",
|
"EXTENSIONS_ENABLED",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A boolean value indicating whether Telemetry is enabled.
|
||||||
|
*/
|
||||||
|
"TELEMETRY_ENABLED",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A boolean value indicating whether to use the URL bar experiments
|
* A boolean value indicating whether to use the URL bar experiments
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user