mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
In-app survey extension (#1945)
* 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>
This commit is contained in:
1 parent
5287e7e528
commit
a0e24e0a4d
11 files changed
+8196
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { LensRendererExtension } from "@k8slens/extensions";
|
||||
import { survey } from "./src/survey";
|
||||
import { SurveyPreferenceHint, SurveyPreferenceInput } from "./src/survey-preference";
|
||||
import { surveyPreferencesStore } from "./src/survey-preferences-store";
|
||||
import React from "react";
|
||||
|
||||
export default class SurveyRendererExtension extends LensRendererExtension {
|
||||
appPreferences = [
|
||||
{
|
||||
title: "In-App Surveys",
|
||||
components: {
|
||||
Hint: () => <SurveyPreferenceHint/>,
|
||||
Input: () => <SurveyPreferenceInput survey={surveyPreferencesStore}/>
|
||||
}
|
||||
}
|
||||
];
|
||||
async onActivate() {
|
||||
await surveyPreferencesStore.loadExtension(this);
|
||||
survey.start();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user