@ -12,14 +12,34 @@ export default `<!DOCTYPE html>
< / div >
< / div >
< script >
< script >
let initialLocalStorage = { }
try {
initialLocalStorage = JSON . parse ( localStorage . getItem ( 'nocodb-gui-v2' ) || '{}' ) ;
} catch ( e ) {
console . error ( 'Failed to parse local storage' , e ) ;
}
var xmlhttp = new XMLHttpRequest ( ) ; // new HttpRequest instance
xmlhttp . open ( "GET" , "./swagger.json" ) ;
xmlhttp . setRequestHeader ( "Content-Type" , "application/json;charset=UTF-8" ) ;
xmlhttp . setRequestHeader ( "xc-auth" , initialLocalStorage && initialLocalStorage . token ) ;
xmlhttp . onload = function ( ) {
const ui = SwaggerUIBundle ( {
const ui = SwaggerUIBundle ( {
url : "./swagger.json" ,
// url: ,
spec : JSON.parse ( xmlhttp . responseText ) ,
dom_id : '#app' ,
dom_id : '#app' ,
presets : [
presets : [
SwaggerUIBundle . presets . apis ,
SwaggerUIBundle . presets . apis ,
SwaggerUIBundle . SwaggerUIStandalonePreset
SwaggerUIBundle . SwaggerUIStandalonePreset
] ,
] ,
} )
} )
}
xmlhttp . send ( ) ;
console . log ( '%c🚀 We are Hiring!!! 🚀%c\\n%cJoin the forces http://careers.nocodb.com' , 'color:#1348ba;font-size:3rem;padding:20px;' , 'display:none' , 'font-size:1.5rem;padding:20px' ) ;
console . log ( '%c🚀 We are Hiring!!! 🚀%c\\n%cJoin the forces http://careers.nocodb.com' , 'color:#1348ba;font-size:3rem;padding:20px;' , 'display:none' , 'font-size:1.5rem;padding:20px' ) ;
const linkEl = document . createElement ( 'a' )
const linkEl = document . createElement ( 'a' )
linkEl . setAttribute ( 'href' , "http://careers.nocodb.com" )
linkEl . setAttribute ( 'href' , "http://careers.nocodb.com" )