Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit 076b441

Browse files
deploy: 1908044
1 parent 237a8e2 commit 076b441

236 files changed

Lines changed: 1212 additions & 900 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="UTF-8">
55
<meta name="generator" content="Docusaurus v3.9.2">
66
<title data-rh="true">Page Not Found | OpenBuilt</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://openbuilt.conduction.nl/404.html/"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | OpenBuilt"><link data-rh="true" rel="icon" href="/img/favicon.svg"><link data-rh="true" rel="canonical" href="https://openbuilt.conduction.nl/404.html/"><link data-rh="true" rel="alternate" href="https://openbuilt.conduction.nl/404.html/" hreflang="en"><link data-rh="true" rel="alternate" href="https://openbuilt.conduction.nl/404.html/" hreflang="x-default"><link data-rh="true" rel="stylesheet" href="/lib/canal-footer.css"><link data-rh="true" rel="stylesheet" href="/lib/kade-cyclist.css"><link rel="stylesheet" href="/assets/css/styles.f618d03c.css">
7-
<script src="/assets/js/runtime~main.c7ce828c.js" defer="defer"></script>
8-
<script src="/assets/js/main.7b777803.js" defer="defer"></script>
7+
<script src="/assets/js/runtime~main.6f5dd892.js" defer="defer"></script>
8+
<script src="/assets/js/main.b9344e32.js" defer="defer"></script>
99
</head>
1010
<body class="navigation-with-keyboard">
1111
<svg style="display: none;"><defs>

assets/files/ApplicationsController-20a1e64fb25df7678c51aab48f88bd2f.php renamed to assets/files/ApplicationsController-8a1b44125860693add8fc43027b746f7.php

Lines changed: 269 additions & 78 deletions
Large diffs are not rendered by default.

assets/files/BuilderHost-208953ffa9c5ada2512d622d6af10398.vue

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<!--
2+
- SPDX-License-Identifier: EUPL-1.2
3+
-
4+
- BuilderHost mounts a NESTED CnAppRoot for the virtual app addressed by
5+
- the :slug param. Per design.md Decision 4/5, this preserves the
6+
- OpenBuilt outer chrome and forwards path segments after the slug to
7+
- the inner router. The :key="slug" prop forces a clean remount when
8+
- the user navigates between virtual apps.
9+
-
10+
- Version routing (spec `openbuilt-version-routing` REQ-OBVR-004):
11+
- Reads `?_version=<versionSlug>` from `$route.query._version` (the
12+
- underscore-prefix form to avoid colliding with user-defined `?version=`
13+
- params). The CnAppRoot endpoint URL includes the `_version` param when
14+
- present, so the server-side ManifestResolverService resolves the correct
15+
- ApplicationVersion manifest. On 404 (unknown or unauthorised version),
16+
- the view renders the "version not found" UI state (REQ-OBVR-009).
17+
-
18+
- Loader workaround (design.md Decision 4): until the in-memory
19+
- useAppManifest overload ships in nextcloud-vue (chain spec #2), we
20+
- point the library's backend fetch at our per-slug manifest endpoint
21+
- via options.endpoint. The bundled-manifest argument is a placeholder
22+
- skeleton; the real manifest arrives from the backend merge.
23+
-->
24+
<template>
25+
<div class="openbuilt-builder-host" data-testid="openbuilt-builder-host">
26+
<!-- REQ-OBVR-009: show version-not-found when useApplicationVersion resolved to 404 -->
27+
<div
28+
v-if="versionNotFound"
29+
class="openbuilt-builder-host__version-not-found"
30+
role="alert"
31+
aria-live="polite">
32+
{{ t('openbuilt', 'Version not found') }}
33+
</div>
34+
<CnAppRoot
35+
v-else
36+
:key="cacheKey"
37+
:app-id="appId"
38+
:bundled-manifest="placeholderManifest"
39+
:options="manifestOptions" />
40+
</div>
41+
</template>
42+
43+
<script>
44+
import { CnAppRoot } from '@conduction/nextcloud-vue'
45+
import { generateUrl } from '@nextcloud/router'
46+
47+
import { useApplicationVersion } from '../composables/useApplicationVersion.js'
48+
import placeholderManifest from '../manifests/placeholder.json'
49+
50+
export default {
51+
name: 'BuilderHost',
52+
components: {
53+
CnAppRoot,
54+
},
55+
data() {
56+
return {
57+
// REQ-OBVR-004: reactive version state from useApplicationVersion.
58+
applicationVersion: null,
59+
versionLoading: false,
60+
versionError: null,
61+
}
62+
},
63+
computed: {
64+
slug() {
65+
return this.$route.params.slug
66+
},
67+
/**
68+
* REQ-OBVR-004: read `?_version=` from the URL query.
69+
* Underscore-prefix to avoid colliding with user-defined `?version=` params.
70+
*
71+
* @return {string|undefined}
72+
*/
73+
versionSlug() {
74+
return this.$route.query._version || undefined
75+
},
76+
appId() {
77+
return `openbuilt-${this.slug}`
78+
},
79+
/**
80+
* Cache key forces CnAppRoot remount when slug OR version changes.
81+
*
82+
* @return {string}
83+
*/
84+
cacheKey() {
85+
return `${this.slug}:${this.versionSlug || 'default'}`
86+
},
87+
/**
88+
* REQ-OBVR-009: true when the version fetch completed with an error
89+
* (e.g. 404 for unknown or unauthorised version). The view renders a
90+
* "version not found" state identical for both "doesn't exist" and
91+
* "you can't see it" cases — no auth cue exposed to the caller.
92+
*
93+
* @return {boolean}
94+
*/
95+
versionNotFound() {
96+
return !this.versionLoading && this.versionError !== null && this.applicationVersion === null
97+
},
98+
placeholderManifest() {
99+
return placeholderManifest
100+
},
101+
manifestOptions() {
102+
// Forward `?_version=` to the manifest endpoint so the server resolves
103+
// the correct ApplicationVersion manifest (REQ-OBVR-001).
104+
const endpoint = generateUrl(`/apps/openbuilt/api/applications/${this.slug}/manifest`)
105+
return {
106+
endpoint: this.versionSlug
107+
? `${endpoint}?_version=${encodeURIComponent(this.versionSlug)}`
108+
: endpoint,
109+
}
110+
},
111+
},
112+
watch: {
113+
slug() {
114+
this.resolveVersion()
115+
},
116+
versionSlug() {
117+
this.resolveVersion()
118+
},
119+
},
120+
created() {
121+
// REQ-OBVR-004: resolve the active ApplicationVersion on mount.
122+
// NOTE: we do NOT call $router.replace() — that would strip ?_version=
123+
// and break bookmarkability (REQ-OBVR-008).
124+
this.resolveVersion()
125+
},
126+
methods: {
127+
/**
128+
* Kick off useApplicationVersion and mirror reactive state into component data.
129+
*
130+
* @return {void}
131+
*/
132+
resolveVersion() {
133+
this.versionError = null
134+
const { applicationVersion, loading, error } = useApplicationVersion(
135+
this.slug,
136+
this.versionSlug,
137+
)
138+
this.applicationVersion = applicationVersion.value
139+
this.versionLoading = loading.value
140+
const unwatch = this.$watch(() => applicationVersion.value, (v) => {
141+
this.applicationVersion = v
142+
})
143+
const unwatchLoading = this.$watch(() => loading.value, (v) => {
144+
this.versionLoading = v
145+
if (!v) {
146+
unwatch()
147+
unwatchLoading()
148+
this.versionError = error.value
149+
}
150+
})
151+
},
152+
},
153+
}
154+
</script>
155+
156+
<style scoped>
157+
.openbuilt-builder-host {
158+
display: flex;
159+
flex-direction: column;
160+
flex: 1 1 auto;
161+
min-height: 0;
162+
}
163+
</style>

0 commit comments

Comments
 (0)