fix: TS syntax in define:vars IIFEs causes SyntaxError — use plain JS for authUrl
This commit is contained in:
@@ -592,7 +592,7 @@ try {
|
|||||||
<!-- User widget: only needed for multi-user (single-user nav links are static) -->
|
<!-- User widget: only needed for multi-user (single-user nav links are static) -->
|
||||||
{!singleHandle && (
|
{!singleHandle && (
|
||||||
<script define:vars={{ baseUrl }}>
|
<script define:vars={{ baseUrl }}>
|
||||||
const authUrl: string = (window as any).__bincioAuthUrl ?? '';
|
const authUrl = window.__bincioAuthUrl || '';
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const r = await fetch('/api/me', { credentials: 'include' });
|
const r = await fetch('/api/me', { credentials: 'include' });
|
||||||
@@ -734,7 +734,7 @@ try {
|
|||||||
|
|
||||||
{editEnabled && (
|
{editEnabled && (
|
||||||
<script define:vars={{ editUrl, baseUrl }}>
|
<script define:vars={{ editUrl, baseUrl }}>
|
||||||
const authUrl: string = (window as any).__bincioAuthUrl ?? '';
|
const authUrl = window.__bincioAuthUrl || '';
|
||||||
const modal = document.getElementById('upload-modal');
|
const modal = document.getElementById('upload-modal');
|
||||||
const openBtn = document.getElementById('upload-btn');
|
const openBtn = document.getElementById('upload-btn');
|
||||||
const closeBtn = document.getElementById('upload-close');
|
const closeBtn = document.getElementById('upload-close');
|
||||||
|
|||||||
Reference in New Issue
Block a user