mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Initial in-app survey implementation Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Add surveyId fetching and store integration Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Add empty line Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Fix typos Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Use async version of machineId + refactoring Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> * Update preferences hint text Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
28 lines
713 B
TypeScript
28 lines
713 B
TypeScript
import { Component } from "@k8slens/extensions";
|
|
import React from "react";
|
|
import { observer } from "mobx-react";
|
|
import { SurveyPreferencesStore } from "./survey-preferences-store";
|
|
|
|
@observer
|
|
export class SurveyPreferenceInput extends React.Component<{survey: SurveyPreferencesStore}, {}> {
|
|
render() {
|
|
const { survey } = this.props;
|
|
|
|
return (
|
|
<Component.Checkbox
|
|
label="Allow in-app surveys"
|
|
value={survey.enabled}
|
|
onChange={v => survey.enabled = v }
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
export class SurveyPreferenceHint extends React.Component {
|
|
render() {
|
|
return (
|
|
<span>This will allow you to participate in surveys to improve the Lens experience.</span>
|
|
);
|
|
}
|
|
}
|