1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

Remove cloud checks

This commit is contained in:
Rory Powell 2022-01-20 21:34:28 +00:00
parent 588cc7204d
commit 202fef1961
2 changed files with 3 additions and 11 deletions

View file

@ -12,7 +12,7 @@
Modal,
} from "@budibase/bbui"
import { onMount } from "svelte"
import { apps, organisation, auth, admin } from "stores/portal"
import { apps, organisation, auth } from "stores/portal"
import { goto } from "@roxi/routify"
import { AppStatus } from "constants"
import { gradient } from "actions"
@ -34,7 +34,6 @@
const publishedAppsOnly = app => app.status === AppStatus.DEPLOYED
$: publishedApps = $apps.filter(publishedAppsOnly)
$: isCloud = $admin.cloud
$: userApps = $auth.user?.builder?.global
? publishedApps
: publishedApps.filter(app =>
@ -42,7 +41,7 @@
)
function getUrl(app) {
return !isCloud ? `/app/${encodeURIComponent(app.name)}` : `/${app.prodId}`
return `/app${app.url}`
}
</script>

View file

@ -49,7 +49,6 @@
$: filteredApps = enrichedApps.filter(app =>
app?.name?.toLowerCase().includes(searchTerm.toLowerCase())
)
$: isCloud = $admin.cloud
const enrichApps = (apps, user, sortBy) => {
const enrichedApps = apps.map(app => ({
@ -162,13 +161,7 @@
}
const viewApp = app => {
if (!isCloud && app.deployed) {
// special case to use the short form name if self hosted
window.open(`/app${app.url}`)
} else {
const id = app.deployed ? app.prodId : app.devId
window.open(`/${id}`, "_blank")
}
window.open(`/app${app.url}`)
}
const editApp = app => {