From 2835f283988ab8708f87ea17456f84da66786679 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 16 Nov 2023 18:46:22 +0100 Subject: [PATCH] Add link to studio on homepage --- src/UI/AllThemesGui.ts | 21 +++++++++++++++++---- src/UI/StudioGUI.svelte | 13 ++++++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/UI/AllThemesGui.ts b/src/UI/AllThemesGui.ts index 94be0e5f75..b21d842185 100644 --- a/src/UI/AllThemesGui.ts +++ b/src/UI/AllThemesGui.ts @@ -11,6 +11,9 @@ import { ImmutableStore } from "../Logic/UIEventSource" import { OsmConnection } from "../Logic/Osm/OsmConnection" import { QueryParameters } from "../Logic/Web/QueryParameters" import { OsmConnectionFeatureSwitches } from "../Logic/State/FeatureSwitchState" +import { SubtleButton } from "./Base/SubtleButton" +import Svg from "../Svg" +import Link from "./Base/Link" export default class AllThemesGui { setup() { @@ -35,10 +38,20 @@ export default class AllThemesGui { new Combine([ intro, new MoreScreen(state, true), - new LoginToggle(undefined, Translations.t.index.logIn, { - osmConnection, - featureSwitchUserbadge: new ImmutableStore(true), - }).SetClass("flex justify-center w-full"), + new LoginToggle( + new Link( + new Combine([ + Svg.pencil_svg().SetClass("w-6 h-6 mr-2"), + Translations.t.general.morescreen.createYourOwnTheme, + ]).SetClass("flex p-2"), + window.location.protocol + "//" + window.location.host + "/studio.html" + ).SetClass("w-full h-fit button"), + Translations.t.index.logIn, + { + osmConnection, + featureSwitchUserbadge: new ImmutableStore(true), + } + ).SetClass("flex justify-center w-full"), Translations.t.general.aboutMapComplete.intro.SetClass("link-underline"), new FixedUiElement("v" + Constants.vNumber).SetClass("block"), ]) diff --git a/src/UI/StudioGUI.svelte b/src/UI/StudioGUI.svelte index baf1b2a42b..bd2d6cf14b 100644 --- a/src/UI/StudioGUI.svelte +++ b/src/UI/StudioGUI.svelte @@ -26,6 +26,9 @@ import EditTheme from "./Studio/EditTheme.svelte" import * as meta from "../../package.json" import Checkbox from "./Base/Checkbox.svelte" + import { Utils } from "../Utils"; + import Translations from "./i18n/Translations"; + import Tr from "./Base/Tr.svelte"; export let studioUrl = window.location.hostname === "127.0.0.2" @@ -184,15 +187,19 @@ > Create a new theme - { showIntro.setData("intro") }} > Show the introduction again - + + + + +
Enable more options (expert mode)