diff --git a/UI/MoreScreen.ts b/UI/MoreScreen.ts index f2e8d048c..d006f4cf6 100644 --- a/UI/MoreScreen.ts +++ b/UI/MoreScreen.ts @@ -34,6 +34,24 @@ export class MoreScreen extends UIElement { }) )); + els.push(new VariableUiElement( + State.state.osmConnection.userDetails.map(userDetails => { + if (userDetails.csCount < State.userJourney.customLayoutUnlock) { + return ""; + } + return new SubtleButton("./assets/star.svg", + new Combine([ + "", + Translations.t.favourite.title, + "", + "
", Translations.t.favourite.description]), { + url: "https://pietervdvn.github.io/MapComplete/personal.html", + newTab: false + }).Render(); + }) + )); + + for (const k in AllKnownLayouts.allSets) { const layout = AllKnownLayouts.allSets[k] if (layout.hideFromOverview && State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { @@ -44,13 +62,7 @@ export class MoreScreen extends UIElement { } if (layout.name === CustomLayout.NAME) { - if (!State.state.osmConnection.userDetails.data.loggedIn) { continue; - } - if (State.state.osmConnection.userDetails.data.csCount < - State.userJourney.customLayoutUnlock) { - continue; - } } const currentLocation = State.state.locationControl.data; diff --git a/UI/i18n/Translations.ts b/UI/i18n/Translations.ts index 505d08cd1..d3df11ef2 100644 --- a/UI/i18n/Translations.ts +++ b/UI/i18n/Translations.ts @@ -924,9 +924,9 @@ export default class Translations { }) }, favourite: { - title: new T({en: "Custom"}), + title: new T({en: "Personal theme"}), description: new T({ - en: "

Your custom theme

In your custom theme, you can add some favourite layers from other themes to create a custom theme." + en: "Add favourite layers from other themes to create a custom theme." }), panelIntro: new T({ en: "

Your custom theme

Create your own theme here by picking your favourite layers"