mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix auth screens' missing config permission, and media URL resolution
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"bin": "./dist/cli/index.js",
|
"bin": "./dist/cli/index.js",
|
||||||
"version": "0.6.0",
|
"version": "0.6.1",
|
||||||
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
||||||
"homepage": "https://bknd.io",
|
"homepage": "https://bknd.io",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function BkndProvider({
|
|||||||
errorShown.current = true;
|
errorShown.current = true;
|
||||||
|
|
||||||
setError(true);
|
setError(true);
|
||||||
return;
|
//return;
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
setError(false);
|
setError(false);
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ export function BkndProvider({
|
|||||||
value={{ ...schema, actions, requireSecrets, app, adminOverride, hasSecrets }}
|
value={{ ...schema, actions, requireSecrets, app, adminOverride, hasSecrets }}
|
||||||
key={local_version}
|
key={local_version}
|
||||||
>
|
>
|
||||||
{error && (
|
{/*{error && (
|
||||||
<Alert.Exception className="gap-2">
|
<Alert.Exception className="gap-2">
|
||||||
<IconAlertHexagon />
|
<IconAlertHexagon />
|
||||||
You attempted to load system configuration with secrets without having proper
|
You attempted to load system configuration with secrets without having proper
|
||||||
@@ -115,7 +115,7 @@ export function BkndProvider({
|
|||||||
<Button variant="red">Reload</Button>
|
<Button variant="red">Reload</Button>
|
||||||
</a>
|
</a>
|
||||||
</Alert.Exception>
|
</Alert.Exception>
|
||||||
)}
|
)}*/}
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</BkndContext.Provider>
|
</BkndContext.Provider>
|
||||||
|
|||||||
@@ -219,19 +219,20 @@ export function Dropzone({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { url, headers, method = "POST" } = getUploadInfo(file.body);
|
const uploadInfo = getUploadInfo(file.body);
|
||||||
|
console.log("dropzone:uploadInfo", uploadInfo);
|
||||||
|
const { url, headers, method = "POST" } = uploadInfo;
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file.body);
|
formData.append("file", file.body);
|
||||||
|
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
const urlWithParams = new URL(url);
|
console.log("xhr:url", url);
|
||||||
|
const searchParams = new URLSearchParams();
|
||||||
if (overwrite) {
|
if (overwrite) {
|
||||||
urlWithParams.searchParams.append("overwrite", "1");
|
searchParams.append("overwrite", "1");
|
||||||
}
|
}
|
||||||
console.log("url", urlWithParams.toString());
|
|
||||||
//return;
|
|
||||||
|
|
||||||
xhr.open(method, urlWithParams.toString(), true);
|
xhr.open(method, String(url) + "?" + String(searchParams), true);
|
||||||
|
|
||||||
if (headers) {
|
if (headers) {
|
||||||
headers.forEach((value, key) => {
|
headers.forEach((value, key) => {
|
||||||
|
|||||||
@@ -29,10 +29,11 @@ export function DropzoneContainer({
|
|||||||
...props
|
...props
|
||||||
}: DropzoneContainerProps) {
|
}: DropzoneContainerProps) {
|
||||||
const id = useId();
|
const id = useId();
|
||||||
const baseUrl = useBaseUrl();
|
|
||||||
const api = useApi();
|
const api = useApi();
|
||||||
|
const baseUrl = api.baseUrl;
|
||||||
const invalidate = useInvalidate();
|
const invalidate = useInvalidate();
|
||||||
const limit = query?.limit ? query?.limit : props.maxItems ? props.maxItems : 50;
|
const limit = query?.limit ? query?.limit : props.maxItems ? props.maxItems : 50;
|
||||||
|
console.log("dropzone:baseUrl", baseUrl);
|
||||||
|
|
||||||
const $q = useEntityQuery(
|
const $q = useEntityQuery(
|
||||||
entity_name as "media",
|
entity_name as "media",
|
||||||
|
|||||||
Reference in New Issue
Block a user