Skip to content

Commit

Permalink
refactor: update WOPI and COLLABORA env variables to PUBLIC
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael committed Jun 4, 2024
1 parent 2214042 commit 891d0af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib/publicEnv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { env } from "$env/dynamic/public"

export const WOPI_URL = env.WOPI_URL || ""
export const COLLABORA_URL: string = env.COLLABORA_URL || ""
export const PUBLIC_WOPI_URL = env.PUBLIC_WOPI_URL || ""
export const PUBLIC_COLLABORA_URL: string = env.PUBLIC_COLLABORA_URL || ""
6 changes: 3 additions & 3 deletions src/routes/experimental/diagnoses/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { COLLABORA_URL, WOPI_URL } from "$lib/publicEnv"
import { PUBLIC_COLLABORA_URL, PUBLIC_WOPI_URL } from "$lib/publicEnv"
const wopisrc = WOPI_URL + "/wopi/files/test3.docx"
const wopisrc = PUBLIC_WOPI_URL + "/wopi/files/test3.docx"
const encodedWopisrc = encodeURIComponent(wopisrc)
const src = COLLABORA_URL + `/browser/80a6f97/cool.html?WOPISrc=${encodedWopisrc}`
const src = PUBLIC_COLLABORA_URL + `/browser/80a6f97/cool.html?WOPISrc=${encodedWopisrc}`
</script>

<iframe title={"Editor"} {src} width="90%" height="1200px"></iframe>

0 comments on commit 891d0af

Please sign in to comment.