Browse Source

Send url to api and honour url on viewing published app

pull/4434/head
Rory Powell 5 years ago
parent
commit
58bcba71f7
  1. 8
      packages/builder/src/components/start/UpdateAppModal.svelte
  2. 4
      packages/builder/src/pages/builder/portal/apps/index.svelte
  3. 783
      packages/server/yarn.lock

8
packages/builder/src/components/start/UpdateAppModal.svelte

@ -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)

4
packages/builder/src/pages/builder/portal/apps/index.svelte

@ -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")

783
packages/server/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save