Add App setup wizard

This commit is contained in:
garrettmills
2020-05-21 22:56:48 -05:00
parent ca11e3afae
commit b275391674
13 changed files with 475 additions and 8 deletions

View File

@@ -32,6 +32,22 @@ class Session {
if ( permissions.length === 1 ) return result.data.data[permissions[0]]
return result.data.data
}
url(path) {
if ( !path.startsWith('/') ) path = `/${path}`
let url = this.get('app.url')
if ( url.endsWith('/') ) url = url.slice(0, -1)
return `${url}${path}`
}
host() {
let url = this.get('app.url')
if ( url.startsWith('http://') ) url = url.substr(7)
else if ( url.startsWith('https://') ) url = url.substr(8)
return url.split('/')[0].split(':')[0]
}
}
const session = new Session()