Skip to content

Commit fa1a56d

Browse files
committed
request fetch
1 parent 4a17a12 commit fa1a56d

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

webapp/src/views/HowToRequest.vue

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
<v-divider class="mb-10"></v-divider>
2424

2525
<!-- Steps -->
26-
<div class="steps-container">
26+
<div v-if="selectedPlatform.comingSoon" class="text-center pa-8">
27+
<h2 class="text-h5 font-weight-light">Coming Soon</h2>
28+
<p class="text-body1 text-disabled mt-2">Instructions for {{ selectedPlatform.name }} are not yet available.</p>
29+
</div>
30+
31+
<div v-else class="steps-container">
2732
<div
2833
v-for="(step, index) in displayedSteps"
2934
:key="index"
@@ -81,7 +86,7 @@
8186
</div>
8287
</template>
8388

84-
<<script>
89+
<script>
8590
import PageHeader from '../components/Navigation/PageHeader.vue'
8691
import yaml from 'js-yaml';
8792
import { marked } from 'marked';
@@ -125,13 +130,20 @@ export default {
125130
async loadPlatformData(id) {
126131
try {
127132
// Fetch from public/how2request/[id].yaml
128-
const response = await fetch(`/how2request/text/${id}_instr.yaml`);
129-
if (!response.ok) throw new Error('File not found');
133+
const filename = `${process.env.BASE_URL}how2request/text/${id}_instr.yaml`
134+
const response = await fetch(filename);
135+
if (!response.ok) throw new Error('File not found: ' + filename);
130136
131137
const text = await response.text();
132138
133139
// Prevent loading HTML 404 pages
134-
if (text.trim().startsWith('<!DOCTYPE')) return;
140+
if (text.trim().startsWith('<!DOCTYPE')) {
141+
this.selectedPlatform = {
142+
...this.platforms.find(p => p.id === id),
143+
comingSoon: true
144+
};
145+
return;
146+
}
135147
136148
// Parse YAML and merge with ID/Name
137149
const data = yaml.load(text);
@@ -143,6 +155,10 @@ export default {
143155
};
144156
} catch (e) {
145157
console.error(`Error loading ${id}:`, e);
158+
this.selectedPlatform = {
159+
...this.platforms.find(p => p.id === id),
160+
comingSoon: true
161+
};
146162
}
147163
},
148164
renderMarkdown(text) {

0 commit comments

Comments
 (0)