1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

Send url to api and honour url on viewing published app

This commit is contained in:
Rory Powell 2022-01-20 17:27:56 +00:00
parent 4b787fefc9
commit b1ec406ae1
3 changed files with 26 additions and 769 deletions

View file

@ -31,7 +31,13 @@
async function updateApp() {
try {
// Update App
await apps.update(app.instance._id, { name: $values.name.trim() })
const body = {
name: $values.name.trim(),
}
if ($values.url) {
body.url = $values.url.trim()
}
await apps.update(app.instance._id, body)
} catch (error) {
console.error(error)
notifications.error(error)

View file

@ -80,7 +80,7 @@
}
const initiateAppCreation = () => {
template = {}
template = null
creationModal.show()
creatingApp = true
}
@ -164,7 +164,7 @@
const viewApp = app => {
if (!isCloud && app.deployed) {
// special case to use the short form name if self hosted
window.open(`/app/${encodeURIComponent(app.name)}`)
window.open(`/app${app.url}`)
} else {
const id = app.deployed ? app.prodId : app.devId
window.open(`/${id}`, "_blank")

File diff suppressed because it is too large Load diff