move dev server warning into mainline
This commit is contained in:
parent
f7125661ef
commit
89eac1edcb
2 changed files with 8 additions and 6 deletions
|
|
@ -1,12 +1,6 @@
|
|||
// provides a device export to local disk option
|
||||
self.kiri.load(api => {
|
||||
api.event.on('load-done', () => {
|
||||
let devwarn = api.sdb.kiri_dev;
|
||||
if (location.host === 'dev.grid.space' && devwarn !== api.version) {
|
||||
api.alerts.show('this is a development server', 10);
|
||||
api.alerts.show('use <a href="https://grid.space/kiri">grid.space</a> for production', 10);
|
||||
api.sdb.kiri_dev = api.version;
|
||||
}
|
||||
let deviceExport = api.device.export;
|
||||
api.device.export = (exp, name, opt = {}) => {
|
||||
const { event, record } = opt;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,14 @@ export async function init_sync() {
|
|||
sdb.kiri_beta = beta;
|
||||
}
|
||||
|
||||
// warn users they are using a development server
|
||||
let devwarn = sdb.kiri_dev;
|
||||
if (location.host === 'dev.grid.space' && devwarn !== version) {
|
||||
api.alerts.show('this is a development server', 10);
|
||||
api.alerts.show('use <a href="https://grid.space/kiri">grid.space</a> for production', 10);
|
||||
sdb.kiri_dev = version;
|
||||
}
|
||||
|
||||
// hide url params but preserve version root (when present)
|
||||
let wlp = WIN.location.pathname;
|
||||
let kio = wlp.indexOf('/kiri/');
|
||||
|
|
|
|||
Loading…
Reference in a new issue