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