Send url to api and honour url on viewing published app
This commit is contained in:
parent
6e5957a01a
commit
58bcba71f7
|
@ -31,7 +31,13 @@
|
||||||
async function updateApp() {
|
async function updateApp() {
|
||||||
try {
|
try {
|
||||||
// Update App
|
// 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) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
notifications.error(error)
|
notifications.error(error)
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const initiateAppCreation = () => {
|
const initiateAppCreation = () => {
|
||||||
template = {}
|
template = null
|
||||||
creationModal.show()
|
creationModal.show()
|
||||||
creatingApp = true
|
creatingApp = true
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
const viewApp = app => {
|
const viewApp = app => {
|
||||||
if (!isCloud && app.deployed) {
|
if (!isCloud && app.deployed) {
|
||||||
// special case to use the short form name if self hosted
|
// special case to use the short form name if self hosted
|
||||||
window.open(`/app/${encodeURIComponent(app.name)}`)
|
window.open(`/app${app.url}`)
|
||||||
} else {
|
} else {
|
||||||
const id = app.deployed ? app.prodId : app.devId
|
const id = app.deployed ? app.prodId : app.devId
|
||||||
window.open(`/${id}`, "_blank")
|
window.open(`/${id}`, "_blank")
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue