-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
⚡ adds ability to run the dashboard from any mount point #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2893bfd
4f92208
7a7185f
eb09de5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ let Icon = ({ name, fill, width, height }) => { | |
} | ||
return ( | ||
<svg {...props} > | ||
<use xlinkHref={`/bundles/sprites.svg#${name}`} /> | ||
<use xlinkHref={`bundles/sprites.svg#${name}`} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no / as it should be relative to base |
||
</svg> | ||
); | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,22 @@ import * as CSRFManager from 'lib/CSRFManager'; | |
import encodeFormData from 'lib/encodeFormData'; | ||
import { Promise } from 'parse'; | ||
|
||
let basePath = ''; | ||
export function setBasePath(newBasePath) { | ||
basePath = newBasePath || ''; | ||
if (basePath.endsWith('/')) { | ||
basePath = basePath.slice(0, basePath.length-1); | ||
} | ||
} | ||
|
||
// abortable flag used to pass xhr reference so user can abort accordingly | ||
export function request(method, url, body, abortable = false, withCredentials = true, useRequestedWith = true) { | ||
if (!url.startsWith('http://') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. open to suggestions about that, that's the less invasive I've found There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is fine. The only things that aren't going to go through the Parse sdk are the config loading, and potentially this app creation stuff that is being discussed. |
||
&& !url.startsWith('https://') | ||
&& basePath.length | ||
&& !url.startsWith(basePath)) { | ||
url = basePath + url; | ||
} | ||
let xhr = new XMLHttpRequest(); | ||
xhr.open(method, url, true); | ||
if (method === 'POST' || method === 'PUT' || method === 'DELETE') { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to properly route the request