added sengi launcher

This commit is contained in:
Nicolas Constant 2019-11-02 00:47:04 -04:00
parent 99b1ea3a2b
commit 382a3df3bf
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
4 changed files with 12 additions and 5 deletions

View File

@ -12,7 +12,8 @@ FROM alpine:latest
RUN apk add --update --no-cache lighttpd
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY --from=build /build/dist /app
COPY --from=build /build/dist /app/sengi
COPY --from=build /build/assets/docker_init /app
EXPOSE 80

View File

@ -0,0 +1 @@
<h2>TEST</h2>

View File

@ -10,5 +10,5 @@ server.modules = (
include "mime-types.conf"
server.pid-file = "/run/lighttpd.pid"
index-file.names = ( "index.html", "index.htm" )
url.rewrite-once = ( "^/(.*)" => "/index.html" )
server.error-handler-404 = "/index.html"
#url.rewrite-once = ( "^sengi/(.*)" => "/sengi/index.html" )
server.error-handler-404 = "/sengi/index.html"

View File

@ -6,6 +6,7 @@ import { RegisteredAppsStateModel, AppInfo, AddRegisteredApp } from '../../../st
import { AuthService, CurrentAuthProcess } from '../../../services/auth.service';
import { AppData } from '../../../services/models/mastodon.interfaces';
import { NotificationService } from '../../../services/notification.service';
import { HttpXsrfInterceptor } from '@angular/common/http/src/xsrf';
@Component({
selector: 'app-add-new-account',
@ -132,8 +133,12 @@ export class AddNewAccountComponent implements OnInit {
}
private getLocalHostname(): string {
let localHostname = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
return localHostname;
let href = window.location.href;
if(href.includes('/home')){
return href.split('/home')[0];
} else {
return location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
}
}
private saveNewApp(instance: string, app: AppData): Promise<any> {