1
0
mirror of https://github.com/Eugeny/tabby-web.git synced 2025-07-26 07:08:33 +00:00
This commit is contained in:
Eugene Pankov
2021-07-26 21:00:13 +02:00
parent 427a245b24
commit f818dbf03e
4 changed files with 7 additions and 3 deletions

@@ -15,5 +15,5 @@ COPY manage.py gunicorn.conf.py ./
COPY tabby tabby
COPY start.sh /start.sh
RUN chmod +x /start.sh
RUN ["chmod", "+x", "/start.sh"]
CMD ["/start.sh"]

@@ -118,7 +118,7 @@ export class HomeComponent {
const versions = await this.http.get('/api/1/versions').toPromise()
versions.sort((a, b) => -semverCompare(a.version, b.version))
this.connector = new DemoConnector(this.iframe.nativeElement.contentWindow, this.commonService, versions[0])
this.iframe.nativeElement.src = '/terminal.html'
this.iframe.nativeElement.src = '/terminal'
}
ngOnDestroy (): void {

@@ -80,7 +80,7 @@ export class MainComponent {
async loadApp (config, version) {
this.showApp = true
this.iframe.nativeElement.src = '/terminal.html'
this.iframe.nativeElement.src = '/terminal'
await this.http.patch(`/api/1/configs/${config.id}`, {
last_used_with_version: version.version,
}).toPromise()

@@ -39,6 +39,10 @@ function start () {
res.render('index', { req })
})
app.get(['/terminal'], (req, res) => {
res.sendFile(join(DIST_FOLDER, 'terminal.html'))
})
process.umask(0o002)
app.listen(PORT, () => {
console.log(`Node Express server listening on http://localhost:${PORT}`)