forked from MapComplete/MapComplete
		
	Drop user survey panel; survey has ended
This commit is contained in:
		
							parent
							
								
									ec5ca11bbf
								
							
						
					
					
						commit
						0724b0edd2
					
				
					 3 changed files with 0 additions and 56 deletions
				
			
		| 
						 | 
					@ -10,7 +10,6 @@ import IndexText from "./BigComponents/IndexText"
 | 
				
			||||||
import FeaturedMessage from "./BigComponents/FeaturedMessage"
 | 
					import FeaturedMessage from "./BigComponents/FeaturedMessage"
 | 
				
			||||||
import { ImportViewerLinks } from "./BigComponents/UserInformation"
 | 
					import { ImportViewerLinks } from "./BigComponents/UserInformation"
 | 
				
			||||||
import { LoginToggle } from "./Popup/LoginButton"
 | 
					import { LoginToggle } from "./Popup/LoginButton"
 | 
				
			||||||
import UserSurveyPanel from "./UserSurveyPanel"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class AllThemesGui {
 | 
					export default class AllThemesGui {
 | 
				
			||||||
    setup() {
 | 
					    setup() {
 | 
				
			||||||
| 
						 | 
					@ -26,7 +25,6 @@ export default class AllThemesGui {
 | 
				
			||||||
            new Combine([
 | 
					            new Combine([
 | 
				
			||||||
                intro,
 | 
					                intro,
 | 
				
			||||||
                new FeaturedMessage().SetClass("mb-4 block"),
 | 
					                new FeaturedMessage().SetClass("mb-4 block"),
 | 
				
			||||||
                new Combine([new UserSurveyPanel()]).SetClass("flex justify-center"),
 | 
					 | 
				
			||||||
                new MoreScreen(state, true),
 | 
					                new MoreScreen(state, true),
 | 
				
			||||||
                new LoginToggle(undefined, Translations.t.index.logIn, state),
 | 
					                new LoginToggle(undefined, Translations.t.index.logIn, state),
 | 
				
			||||||
                new ImportViewerLinks(state.osmConnection),
 | 
					                new ImportViewerLinks(state.osmConnection),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,15 +5,12 @@ import Toggle from "../Input/Toggle"
 | 
				
			||||||
import { SubtleButton } from "../Base/SubtleButton"
 | 
					import { SubtleButton } from "../Base/SubtleButton"
 | 
				
			||||||
import { Store, UIEventSource } from "../../Logic/UIEventSource"
 | 
					import { Store, UIEventSource } from "../../Logic/UIEventSource"
 | 
				
			||||||
import { LoginToggle } from "../Popup/LoginButton"
 | 
					import { LoginToggle } from "../Popup/LoginButton"
 | 
				
			||||||
import Svg from "../../Svg"
 | 
					 | 
				
			||||||
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"
 | 
					import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"
 | 
				
			||||||
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
 | 
					import { OsmConnection } from "../../Logic/Osm/OsmConnection"
 | 
				
			||||||
import FullWelcomePaneWithTabs from "./FullWelcomePaneWithTabs"
 | 
					 | 
				
			||||||
import LoggedInUserIndicator from "../LoggedInUserIndicator"
 | 
					import LoggedInUserIndicator from "../LoggedInUserIndicator"
 | 
				
			||||||
import { ActionButtons } from "./ActionButtons"
 | 
					import { ActionButtons } from "./ActionButtons"
 | 
				
			||||||
import { BBox } from "../../Logic/BBox"
 | 
					import { BBox } from "../../Logic/BBox"
 | 
				
			||||||
import Loc from "../../Models/Loc"
 | 
					import Loc from "../../Models/Loc"
 | 
				
			||||||
import UserSurveyPanel from "../UserSurveyPanel"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class ThemeIntroductionPanel extends Combine {
 | 
					export default class ThemeIntroductionPanel extends Combine {
 | 
				
			||||||
    constructor(
 | 
					    constructor(
 | 
				
			||||||
| 
						 | 
					@ -70,7 +67,6 @@ export default class ThemeIntroductionPanel extends Combine {
 | 
				
			||||||
        const hasPresets = layout.layers.some((l) => l.presets?.length > 0)
 | 
					        const hasPresets = layout.layers.some((l) => l.presets?.length > 0)
 | 
				
			||||||
        super([
 | 
					        super([
 | 
				
			||||||
            layout.description.Clone().SetClass("block mb-4"),
 | 
					            layout.description.Clone().SetClass("block mb-4"),
 | 
				
			||||||
            new UserSurveyPanel(),
 | 
					 | 
				
			||||||
            new Combine([
 | 
					            new Combine([
 | 
				
			||||||
                t.welcomeExplanation.general,
 | 
					                t.welcomeExplanation.general,
 | 
				
			||||||
                hasPresets
 | 
					                hasPresets
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,50 +0,0 @@
 | 
				
			||||||
import Combine from "./Base/Combine"
 | 
					 | 
				
			||||||
import { FixedUiElement } from "./Base/FixedUiElement"
 | 
					 | 
				
			||||||
import { SubtleButton } from "./Base/SubtleButton"
 | 
					 | 
				
			||||||
import Svg from "../Svg"
 | 
					 | 
				
			||||||
import { LocalStorageSource } from "../Logic/Web/LocalStorageSource"
 | 
					 | 
				
			||||||
import Toggle from "./Input/Toggle"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default class UserSurveyPanel extends Toggle {
 | 
					 | 
				
			||||||
    private static readonly userSurveyHasBeenTaken = LocalStorageSource.GetParsed(
 | 
					 | 
				
			||||||
        "usersurvey-has-been-taken",
 | 
					 | 
				
			||||||
        false
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    constructor() {
 | 
					 | 
				
			||||||
        super(
 | 
					 | 
				
			||||||
            new Combine([
 | 
					 | 
				
			||||||
                new FixedUiElement("Thanks for taking the survey!").SetClass("thanks px-2"),
 | 
					 | 
				
			||||||
                new SubtleButton(Svg.star_svg(), "Take the user survey again", {
 | 
					 | 
				
			||||||
                    imgSize: "h-6 w-6",
 | 
					 | 
				
			||||||
                })
 | 
					 | 
				
			||||||
                    .onClick(() => {
 | 
					 | 
				
			||||||
                        window.open(
 | 
					 | 
				
			||||||
                            "https://framaforms.org/mapcomplete-usage-survey-1672687708",
 | 
					 | 
				
			||||||
                            "_blank"
 | 
					 | 
				
			||||||
                        )
 | 
					 | 
				
			||||||
                        UserSurveyPanel.userSurveyHasBeenTaken.setData(false)
 | 
					 | 
				
			||||||
                    })
 | 
					 | 
				
			||||||
                    .SetClass("h-12"),
 | 
					 | 
				
			||||||
            ]),
 | 
					 | 
				
			||||||
            new Combine([
 | 
					 | 
				
			||||||
                new FixedUiElement("Please, fill in the user survey").SetClass("alert"),
 | 
					 | 
				
			||||||
                "Hey! We'd like to get to know you better - would you mind to help out by filling out this form? Your opinion is important",
 | 
					 | 
				
			||||||
                new FixedUiElement(
 | 
					 | 
				
			||||||
                    "We are specifically searching responses from underrepresented groups, such as non-technical people, minorities, women, people without an account, people of colour, ..."
 | 
					 | 
				
			||||||
                ).SetClass("font-bold"),
 | 
					 | 
				
			||||||
                "Results are fully anonymous and are used to improve MapComplete. We don't ask private information. So, don't hesitate and fill it out!",
 | 
					 | 
				
			||||||
                new SubtleButton(Svg.star_outline_svg(), "Take the survey").onClick(() => {
 | 
					 | 
				
			||||||
                    window.open(
 | 
					 | 
				
			||||||
                        "https://framaforms.org/mapcomplete-usage-survey-1672687708",
 | 
					 | 
				
			||||||
                        "_blank"
 | 
					 | 
				
			||||||
                    )
 | 
					 | 
				
			||||||
                    UserSurveyPanel.userSurveyHasBeenTaken.setData(true)
 | 
					 | 
				
			||||||
                }),
 | 
					 | 
				
			||||||
            ]).SetClass("block border-2 border-black rounded-xl flex flex-col p-2"),
 | 
					 | 
				
			||||||
            UserSurveyPanel.userSurveyHasBeenTaken
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        this.SetStyle("max-width: 40rem")
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue