diff --git a/UI/CustomGenerator/SharePanel.ts b/UI/CustomGenerator/SharePanel.ts index 5fcd6ac7f..9ac40981b 100644 --- a/UI/CustomGenerator/SharePanel.ts +++ b/UI/CustomGenerator/SharePanel.ts @@ -42,7 +42,7 @@ export default class SharePanel extends UIElement { "Copy the json configuration from the 'save-tab', paste it between the 'nowiki'-tags in the Wiki", "Click 'save' to save the wiki page", "Share the link with the url parameter userlayout=wiki:YOURWIKIPAGE, e.g. " + - `https://pietervdvn.github.io/MapComplete/index.html?userlayout=${proposedNameEnc}` + `https://mapcomplete.osm.be?userlayout=${proposedNameEnc}` ].map(li => `
  • ${li}
  • `), "", diff --git a/UI/ShareScreen.ts b/UI/ShareScreen.ts index c9ea0263b..4a2b5194b 100644 --- a/UI/ShareScreen.ts +++ b/UI/ShareScreen.ts @@ -146,14 +146,14 @@ export class ShareScreen extends UIElement { this._options = new VerticalCombine(optionCheckboxes) const url = (currentLocation ?? new UIEventSource(undefined)).map(() => { - - let literalText = "https://pietervdvn.github.io/MapComplete/" + layout.id.toLowerCase() + ".html" + const host = window.location.host; + let literalText = `https://${host}/${layout.id.toLowerCase()}.html` const parts = Utils.NoEmpty(Utils.NoNull(optionParts.map((eventSource) => eventSource.data))); let hash = ""; if (layoutDefinition !== undefined) { - literalText = "https://pietervdvn.github.io/MapComplete/index.html" + literalText = `https://${host}/index.html` if (layout.id.startsWith("wiki:")) { parts.push("userlayout=" + encodeURIComponent(layout.id)) } else { diff --git a/package.json b/package.json index 1bed8df08..d6eb655b6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", "prepare-deploy": "npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache", "deploy:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/Staging/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/Staging/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", - "deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", + "deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/mapcomplete.github.io/* && cp -r dist/* /home/pietervdvn/git/mapcomplete.github.io/ && cd /home/pietervdvn/git/mapcomplete.github.io/ && echo \"mapcomplete.osm.be\" > CNAME && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(index\\|land\\|test\\|preferences\\|customGenerator\\).html\" | xargs rm) && (find *.webmanifest | xargs rm)" }, "keywords": [ diff --git a/scripts/createLayouts.ts b/scripts/createLayouts.ts index f5bfdf949..720eda946 100644 --- a/scripts/createLayouts.ts +++ b/scripts/createLayouts.ts @@ -270,7 +270,7 @@ for (const layoutName in all) { }; const layout = all[layoutName]; validate(layout) - const manif = JSON.stringify(createManifest(layout, "/MapComplete")); + const manif = JSON.stringify(createManifest(layout, "")); const manifestLocation = encodeURIComponent(layout.id.toLowerCase()) + ".webmanifest"; writeFile(manifestLocation, manif, err);