Skip to content

Commit 758b60d

Browse files
committed
mv to mapsmodule
1 parent 56d4428 commit 758b60d

3 files changed

Lines changed: 1 addition & 29 deletions

File tree

web-app/packages/lib/src/modules/project/projectApi.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,5 @@ export const ProjectApi = {
344344
return ProjectModule.httpService.get(
345345
`/v2/projects/${projectId}/collaborators`
346346
)
347-
},
348-
349-
async publishMap(projectId: string) {
350-
return ProjectModule.httpService.post(
351-
`/app/projects/${projectId}/map-links`
352-
)
353347
}
354348
}

web-app/packages/lib/src/modules/project/store.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -980,28 +980,6 @@ export const useProjectStore = defineStore('projectModule', {
980980
await notificationStore.error({
981981
text: getErrorMessage(err, 'Failed to push changes')
982982
})
983-
},
984-
985-
/**
986-
* Publishes the map of the latest project version.
987-
*/
988-
async publishMap() {
989-
const notificationStore = useNotificationStore()
990-
991-
try {
992-
const response = await ProjectApi.publishMap(this.project.id)
993-
const hash = response.data.map_link
994-
const url = `${window.location.origin}/${hash}`
995-
navigator.clipboard.writeText(url)
996-
notificationStore.show({
997-
text: 'Link to public map copied to your clipboard.',
998-
severity: 'success'
999-
})
1000-
} catch {
1001-
notificationStore.error({
1002-
text: `Failed to publish map`
1003-
})
1004-
}
1005983
}
1006984
}
1007985
})

web-app/packages/lib/src/modules/project/views/ProjectViewTemplate.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
1212
>
1313
<!-- Z indexes based on minus margin, its not possible to add additional buttons to tab view -->
1414
<div class="relative z-1">
15-
<slot name="publish.button" />
15+
<slot name="action-button" />
1616
<PButton
1717
severity="secondary"
1818
@click="downloadArchive({ url: downloadUrl })"

0 commit comments

Comments
 (0)