feat: add clean public routes for alpine ui
This commit is contained in:
+13
-18
@@ -1,20 +1,15 @@
|
||||
/**
|
||||
* config.js — auto-detects base paths based on current page location.
|
||||
* Must be loaded before workspace.js and other navigation-using scripts.
|
||||
*/
|
||||
(function() {
|
||||
var p = window.location.pathname;
|
||||
// html/wizard/ is two levels deep from root
|
||||
if (/\/html\/wizard\//.test(p)) {
|
||||
window.APP_BASE = '../../';
|
||||
window.DATA_URL = '../../data/';
|
||||
// html/*.html is one level deep from root
|
||||
} else if (/\/html\//.test(p)) {
|
||||
window.APP_BASE = '../';
|
||||
window.DATA_URL = '../data/';
|
||||
// root level (index.html)
|
||||
} else {
|
||||
window.APP_BASE = '';
|
||||
window.DATA_URL = 'data/';
|
||||
}
|
||||
window.APP_BASE = '/';
|
||||
window.DATA_URL = '/data/';
|
||||
window.CrankRoutes = {
|
||||
home: '/',
|
||||
login: '/login',
|
||||
agents: '/agents',
|
||||
apiKeys: '/api-keys',
|
||||
logs: '/logs',
|
||||
usage: '/usage',
|
||||
settings: '/settings',
|
||||
workspaceSetup: '/workspace-setup',
|
||||
wizard: '/wizard/'
|
||||
};
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user