forked from MapComplete/MapComplete
Merge branch 'develop' into Robin-patch-2
This commit is contained in:
commit
c919695745
9 changed files with 90 additions and 20 deletions
|
@ -1,4 +1,5 @@
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- build/*
|
- build/*
|
||||||
|
@ -52,27 +53,35 @@ jobs:
|
||||||
|
|
||||||
- name: Zipping dist file
|
- name: Zipping dist file
|
||||||
run: |
|
run: |
|
||||||
mv dist /tmp/${{ github.ref_name }}
|
BRANCH=$(echo ${{ github.ref_name }} | sed 's/\//-/g')
|
||||||
|
mv dist /tmp/${BRANCH}
|
||||||
cd /tmp
|
cd /tmp
|
||||||
zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/*
|
zip ${BRANCH}.zip -r ${BRANCH}/*
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
- name: uploading file
|
- name: uploading file
|
||||||
run: scp /tmp/${{ github.ref_name }}.zip hetzner:/root/staging/
|
run: |
|
||||||
|
BRANCH=$(echo ${{ github.ref_name }} | sed 's/\//-/g')
|
||||||
|
scp /tmp/${BRANCH}.zip hetzner:/root/staging/
|
||||||
|
|
||||||
- name: cleanup files
|
- name: cleanup files
|
||||||
run: rm /tmp/${{ github.ref_name }}.zip && rm -rf /tmp/${{ github.ref_name }}/
|
run: |
|
||||||
|
BRANCH=$(echo ${{ github.ref_name }} | sed 's/\//-/g')
|
||||||
|
rm /tmp/${BRANCH}.zip && rm -rf /tmp/${BRANCH}/
|
||||||
|
|
||||||
- name: unzipping remote file
|
- name: unzipping remote file
|
||||||
run: ssh hetzner "cd /root/staging && rm -rf ${{ github.ref_name }} && unzip ${{ github.ref_name }}.zip && rm -rf /root/public/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/public/ && rm ${{ github.ref_name }}.zip"
|
run: |
|
||||||
|
BRANCH=$(echo ${{ github.ref_name }} | sed 's/\//-/g')
|
||||||
|
ssh hetzner "cd /root/staging && rm -rf ${BRANCH} && unzip ${BRANCH}.zip && rm -rf /root/public/${BRANCH} && mv /root/staging/${BRANCH}/ /root/public/ && rm ${BRANCH}.zip"
|
||||||
|
|
||||||
- name: Comment on the PR
|
- name: Comment on the PR
|
||||||
run: |
|
run: |
|
||||||
|
BRANCH=$(echo ${{ github.ref_name }} | sed 's/\//-/g')
|
||||||
PR_NUMBER=$(echo ${{ github.event.pull_request.number || github.event.issue.number }})
|
PR_NUMBER=$(echo ${{ github.event.pull_request.number || github.event.issue.number }})
|
||||||
if [[ -n "$PR_NUMBER" ]]
|
if [[ -n "$PR_NUMBER" ]]
|
||||||
then
|
then
|
||||||
echo "Found a pull request or issue number, will post to $PR_NUMBER ..."
|
echo "Found a pull request or issue number, will post to $PR_NUMBER ..."
|
||||||
MSG=$(echo "Congratulations! This PR been successfully built and has been deployed. It is (temporarily) available on https://builds.mapcomplete.org/${PR_NUMBER}")
|
MSG=$(echo "Congratulations! This PR been successfully built and has been deployed. It is (temporarily) available on https://builds.mapcomplete.org/${BRANCH}")
|
||||||
BODY="{\"body\": \"$MSG\"}"
|
BODY="{\"body\": \"$MSG\"}"
|
||||||
# Token must have following permissions: issue > read and write
|
# Token must have following permissions: issue > read and write
|
||||||
curl -X POST "https://source.mapcomplete.org/api/v1/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
|
curl -X POST "https://source.mapcomplete.org/api/v1/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
|
||||||
|
|
12
package-lock.json
generated
12
package-lock.json
generated
|
@ -82,6 +82,7 @@
|
||||||
"showdown": "^2.1.0",
|
"showdown": "^2.1.0",
|
||||||
"svelte": "^3.59.2",
|
"svelte": "^3.59.2",
|
||||||
"svg-path-parser": "^1.1.0",
|
"svg-path-parser": "^1.1.0",
|
||||||
|
"tag2link": "^2025.3.21",
|
||||||
"tailwind-merge": "^1.14.0",
|
"tailwind-merge": "^1.14.0",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
@ -26392,6 +26393,12 @@
|
||||||
"version": "3.2.4",
|
"version": "3.2.4",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/tag2link": {
|
||||||
|
"version": "2025.3.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/tag2link/-/tag2link-2025.3.21.tgz",
|
||||||
|
"integrity": "sha512-JvRTQdY/z0vAEFUzL7rhLndNiDnStlurW+1jgXL5FW+GppR2T/dq2lXMEppbFNxJ9C4h5b+ykjcMPH791YeLdA==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/tailwind-merge": {
|
"node_modules/tailwind-merge": {
|
||||||
"version": "1.14.0",
|
"version": "1.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz",
|
||||||
|
@ -48535,6 +48542,11 @@
|
||||||
"symbol-tree": {
|
"symbol-tree": {
|
||||||
"version": "3.2.4"
|
"version": "3.2.4"
|
||||||
},
|
},
|
||||||
|
"tag2link": {
|
||||||
|
"version": "2025.3.21",
|
||||||
|
"resolved": "https://registry.npmjs.org/tag2link/-/tag2link-2025.3.21.tgz",
|
||||||
|
"integrity": "sha512-JvRTQdY/z0vAEFUzL7rhLndNiDnStlurW+1jgXL5FW+GppR2T/dq2lXMEppbFNxJ9C4h5b+ykjcMPH791YeLdA=="
|
||||||
|
},
|
||||||
"tailwind-merge": {
|
"tailwind-merge": {
|
||||||
"version": "1.14.0",
|
"version": "1.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.14.0.tgz",
|
||||||
|
|
|
@ -244,6 +244,7 @@
|
||||||
"showdown": "^2.1.0",
|
"showdown": "^2.1.0",
|
||||||
"svelte": "^3.59.2",
|
"svelte": "^3.59.2",
|
||||||
"svg-path-parser": "^1.1.0",
|
"svg-path-parser": "^1.1.0",
|
||||||
|
"tag2link": "^2025.3.21",
|
||||||
"tailwind-merge": "^1.14.0",
|
"tailwind-merge": "^1.14.0",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
|
|
@ -20,8 +20,8 @@ npm run download:editor-layer-index &&
|
||||||
npm run prep:layeroverview &&
|
npm run prep:layeroverview &&
|
||||||
npm run generate && # includes a single "refresh:layeroverview". Resetting the files is unnecessary as they are not in there in the first place
|
npm run generate && # includes a single "refresh:layeroverview". Resetting the files is unnecessary as they are not in there in the first place
|
||||||
npm run generate:mapcomplete-changes-theme &&
|
npm run generate:mapcomplete-changes-theme &&
|
||||||
npm run refresh:layeroverview && # run refresh:layeroverview a second time to propagate all calls
|
npm run refresh:layeroverview && # a second time to propagate all calls
|
||||||
npm run generate:layeroverview && # run refresh:layeroverview a third time to fix some issues with the favourite layer all calls
|
npm run refresh:layeroverview && # a third time to fix some issues with the favourite layer all calls
|
||||||
|
|
||||||
npm run generate:layouts
|
npm run generate:layouts
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Store, UIEventSource } from "../../Logic/UIEventSource"
|
import { Store, UIEventSource } from "../../../Logic/UIEventSource"
|
||||||
import SimpleMetaTaggers from "../../Logic/SimpleMetaTagger"
|
import SimpleMetaTaggers from "../../../Logic/SimpleMetaTagger"
|
||||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"
|
||||||
import Searchbar from "../Base/Searchbar.svelte"
|
import Searchbar from "../../Base/Searchbar.svelte"
|
||||||
import Translations from "../i18n/Translations"
|
import Translations from "../../i18n/Translations"
|
||||||
import { Utils } from "../../Utils"
|
import { Utils } from "../../../Utils"
|
||||||
|
import TagLink from "./TagLink.svelte"
|
||||||
|
import Tag from "@rgossiaux/svelte-heroicons/solid/Tag"
|
||||||
|
|
||||||
export let tags: UIEventSource<Record<string, any>>
|
export let tags: UIEventSource<Record<string, any>>
|
||||||
export let tagKeys = tags.map((tgs) => (tgs === undefined ? [] : Object.keys(tgs)))
|
export let tagKeys = tags.map((tgs) => (tgs === undefined ? [] : Object.keys(tgs)))
|
||||||
|
@ -69,7 +71,7 @@
|
||||||
{:else if typeof $tags[key] === "object"}
|
{:else if typeof $tags[key] === "object"}
|
||||||
<div class="literal-code">{JSON.stringify($tags[key])}</div>
|
<div class="literal-code">{JSON.stringify($tags[key])}</div>
|
||||||
{:else}
|
{:else}
|
||||||
{$tags[key]}
|
<TagLink {tags} {key} />
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -95,7 +97,7 @@
|
||||||
<span class="literal-code">{JSON.stringify($tags[key])}</span>
|
<span class="literal-code">{JSON.stringify($tags[key])}</span>
|
||||||
<i>{typeof $tags[key]}</i>
|
<i>{typeof $tags[key]}</i>
|
||||||
{:else}
|
{:else}
|
||||||
{$tags[key]}
|
<TagLink {tags} {key} />
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -123,7 +125,7 @@
|
||||||
{:else if $tags[key] === ""}
|
{:else if $tags[key] === ""}
|
||||||
<i>Empty string</i>
|
<i>Empty string</i>
|
||||||
{:else}
|
{:else}
|
||||||
{$tags[key]}
|
<TagLink {tags} {key} />
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
46
src/UI/Popup/AllTagsPanel/TagLink.svelte
Normal file
46
src/UI/Popup/AllTagsPanel/TagLink.svelte
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||||
|
import tag2link from "tag2link/index.json"
|
||||||
|
|
||||||
|
export let tags: UIEventSource<Record<string, any>>
|
||||||
|
export let key: string
|
||||||
|
|
||||||
|
const tag2linkData = tag2link as Tag2LinkElement[]
|
||||||
|
|
||||||
|
interface Tag2LinkElement {
|
||||||
|
/**
|
||||||
|
* OSM tag key
|
||||||
|
*/
|
||||||
|
key: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL template or formatter URL: replace `$1` with the tag value
|
||||||
|
*/
|
||||||
|
url: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source of this formatter URL
|
||||||
|
*/
|
||||||
|
source?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rank or relative importance of this formatter URL.
|
||||||
|
*/
|
||||||
|
rank?: "preferred" | "normal" | "deprecated"
|
||||||
|
}
|
||||||
|
|
||||||
|
const url = tag2linkData.find((item) => item.key === `Key:${key}`)?.url
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if url}
|
||||||
|
<a
|
||||||
|
href={url.replace("$1", $tags[key])}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
class="tag-link"
|
||||||
|
>
|
||||||
|
{$tags[key]}
|
||||||
|
</a>
|
||||||
|
{:else}
|
||||||
|
{$tags[key]}
|
||||||
|
{/if}
|
|
@ -6,7 +6,7 @@ import LogoutButton from "../Base/LogoutButton.svelte"
|
||||||
import LoginButton from "../Base/LoginButton.svelte"
|
import LoginButton from "../Base/LoginButton.svelte"
|
||||||
import ThemeViewState from "../../Models/ThemeViewState"
|
import ThemeViewState from "../../Models/ThemeViewState"
|
||||||
import OrientationDebugPanel from "../Debug/OrientationDebugPanel.svelte"
|
import OrientationDebugPanel from "../Debug/OrientationDebugPanel.svelte"
|
||||||
import AllTagsPanel from "../Popup/AllTagsPanel.svelte"
|
import AllTagsPanel from "../Popup/AllTagsPanel/AllTagsPanel.svelte"
|
||||||
import { ImmutableStore, UIEventSource } from "../../Logic/UIEventSource"
|
import { ImmutableStore, UIEventSource } from "../../Logic/UIEventSource"
|
||||||
import ClearCaches from "../Popup/ClearCaches.svelte"
|
import ClearCaches from "../Popup/ClearCaches.svelte"
|
||||||
import Locale from "../i18n/Locale"
|
import Locale from "../i18n/Locale"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { HistogramViz } from "./Popup/HistogramViz"
|
||||||
import { UploadToOsmViz } from "./Popup/UploadToOsmViz"
|
import { UploadToOsmViz } from "./Popup/UploadToOsmViz"
|
||||||
import { MultiApplyViz } from "./Popup/MultiApplyViz"
|
import { MultiApplyViz } from "./Popup/MultiApplyViz"
|
||||||
import { UIEventSource } from "../Logic/UIEventSource"
|
import { UIEventSource } from "../Logic/UIEventSource"
|
||||||
import AllTagsPanel from "./Popup/AllTagsPanel.svelte"
|
import AllTagsPanel from "./Popup/AllTagsPanel/AllTagsPanel.svelte"
|
||||||
import { VariableUiElement } from "./Base/VariableUIElement"
|
import { VariableUiElement } from "./Base/VariableUIElement"
|
||||||
import { Translation } from "./i18n/Translation"
|
import { Translation } from "./i18n/Translation"
|
||||||
import Translations from "./i18n/Translations"
|
import Translations from "./i18n/Translations"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
import SchemaBasedInput from "./SchemaBasedInput.svelte"
|
import SchemaBasedInput from "./SchemaBasedInput.svelte"
|
||||||
import FloatOver from "../Base/FloatOver.svelte"
|
import FloatOver from "../Base/FloatOver.svelte"
|
||||||
import TagRenderingInput from "./TagRenderingInput.svelte"
|
import TagRenderingInput from "./TagRenderingInput.svelte"
|
||||||
import AllTagsPanel from "../Popup/AllTagsPanel.svelte"
|
import AllTagsPanel from "../Popup/AllTagsPanel/AllTagsPanel.svelte"
|
||||||
import QuestionPreview from "./QuestionPreview.svelte"
|
import QuestionPreview from "./QuestionPreview.svelte"
|
||||||
import ShowConversionMessages from "./ShowConversionMessages.svelte"
|
import ShowConversionMessages from "./ShowConversionMessages.svelte"
|
||||||
import RawEditor from "./RawEditor.svelte"
|
import RawEditor from "./RawEditor.svelte"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue