commit
b060c6f7c5
|
@ -1,4 +1,7 @@
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
.travis.yml
|
.travis.yml
|
||||||
|
appveyor.yml
|
||||||
.vscode
|
.vscode
|
||||||
|
node_modules
|
||||||
|
dist
|
|
@ -12,7 +12,8 @@ FROM alpine:latest
|
||||||
RUN apk add --update --no-cache lighttpd
|
RUN apk add --update --no-cache lighttpd
|
||||||
|
|
||||||
ADD lighttpd.conf /etc/lighttpd/lighttpd.conf
|
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
|
EXPOSE 80
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,29 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="main.css">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="favicon.png">
|
||||||
|
|
||||||
|
<title>Sengi Launcher</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="launcher-wrapper">
|
||||||
|
<div class="launcher">
|
||||||
|
<a href="#" class="button" title="launch sengi in popup"
|
||||||
|
onClick="window.open('/sengi/'+'?qt='+ (new Date()).getTime(),'Sengi','toolbar=no,location=no,status=no,menubar=no,scrollbars=no, resizable=yes,width=377,height=800'); return false;">
|
||||||
|
<span class="download-button__web--label">Launch Sengi Popup</span>
|
||||||
|
</a><br />
|
||||||
|
|
||||||
|
<a href="/sengi/" class="button" title="launch sengi">
|
||||||
|
<span class="download-button__web--label">Open Sengi</span>
|
||||||
|
</a><br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,45 @@
|
||||||
|
*, *::after, *::before {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 62.5%;
|
||||||
|
background-color: #141824;
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.launcher-wrapper{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.launcher {
|
||||||
|
height: 15rem;
|
||||||
|
width: 30rem;
|
||||||
|
margin: 35vh auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
background-color: #090b10;
|
||||||
|
display: block;
|
||||||
|
width: 30rem;
|
||||||
|
padding: 1.5rem 2rem 1.75rem 2rem;
|
||||||
|
color: white;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
background-color: #1e2433;
|
||||||
|
}
|
|
@ -10,3 +10,5 @@ server.modules = (
|
||||||
include "mime-types.conf"
|
include "mime-types.conf"
|
||||||
server.pid-file = "/run/lighttpd.pid"
|
server.pid-file = "/run/lighttpd.pid"
|
||||||
index-file.names = ( "index.html", "index.htm" )
|
index-file.names = ( "index.html", "index.htm" )
|
||||||
|
#url.rewrite-once = ( "^sengi/(.*)" => "/sengi/index.html" )
|
||||||
|
server.error-handler-404 = "/sengi/index.html"
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sengi",
|
"name": "sengi",
|
||||||
"version": "0.16.2",
|
"version": "0.18.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sengi",
|
"name": "sengi",
|
||||||
"version": "0.18.1",
|
"version": "0.18.2",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"main": "main-electron.js",
|
"main": "main-electron.js",
|
||||||
"description": "A multi-account desktop client for Mastodon and Pleroma",
|
"description": "A multi-account desktop client for Mastodon and Pleroma",
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { StreamsState } from '../../states/streams.state';
|
||||||
import { NavigationService } from '../../services/navigation.service';
|
import { NavigationService } from '../../services/navigation.service';
|
||||||
import { NotificationService } from '../../services/notification.service';
|
import { NotificationService } from '../../services/notification.service';
|
||||||
import { MastodonService } from '../../services/mastodon.service';
|
import { MastodonService } from '../../services/mastodon.service';
|
||||||
|
import { AuthService } from '../../services/auth.service';
|
||||||
|
|
||||||
|
|
||||||
describe('CreateStatusComponent', () => {
|
describe('CreateStatusComponent', () => {
|
||||||
|
@ -35,7 +36,7 @@ describe('CreateStatusComponent', () => {
|
||||||
StreamsState
|
StreamsState
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
providers: [NavigationService, NotificationService, MastodonService],
|
providers: [NavigationService, NotificationService, MastodonService, AuthService],
|
||||||
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
|
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -101,7 +101,7 @@ export class AddNewAccountComponent implements OnInit {
|
||||||
if (instanceApps.length !== 0) {
|
if (instanceApps.length !== 0) {
|
||||||
return Promise.resolve(instanceApps[0].app);
|
return Promise.resolve(instanceApps[0].app);
|
||||||
} else {
|
} else {
|
||||||
const redirect_uri = this.getLocalHostname() + '/register';
|
const redirect_uri = this.getLocalHostname();
|
||||||
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
|
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
|
||||||
.then((appData: AppData) => {
|
.then((appData: AppData) => {
|
||||||
return this.saveNewApp(instance, appData)
|
return this.saveNewApp(instance, appData)
|
||||||
|
@ -132,8 +132,12 @@ export class AddNewAccountComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getLocalHostname(): string {
|
private getLocalHostname(): string {
|
||||||
let localHostname = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
|
let href = window.location.href;
|
||||||
return localHostname;
|
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> {
|
private saveNewApp(instance: string, app: AppData): Promise<any> {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, OnInit, OnDestroy, QueryList, ViewChildren, ElementRef } from "@angular/core";
|
import { Component, OnInit, OnDestroy, QueryList, ViewChildren, ElementRef } from "@angular/core";
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { Observable, Subscription } from "rxjs";
|
import { Observable, Subscription } from "rxjs";
|
||||||
import { Select } from "@ngxs/store";
|
import { Select } from "@ngxs/store";
|
||||||
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
||||||
|
@ -19,10 +20,20 @@ export class StreamsMainDisplayComponent implements OnInit, OnDestroy {
|
||||||
private columnSelectedSub: Subscription;
|
private columnSelectedSub: Subscription;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
private readonly router: Router,
|
||||||
|
private readonly activatedRoute: ActivatedRoute,
|
||||||
private readonly navigationService: NavigationService) {
|
private readonly navigationService: NavigationService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.activatedRoute.queryParams.subscribe(params => {
|
||||||
|
const code = params['code'];
|
||||||
|
if (code) {
|
||||||
|
this.router.navigate(['/register'], { queryParams: { code: code} });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.columnSelectedSub = this.navigationService.columnSelectedSubject.subscribe((columnIndex: number) => {
|
this.columnSelectedSub = this.navigationService.columnSelectedSubject.subscribe((columnIndex: number) => {
|
||||||
this.focusOnColumn(columnIndex);
|
this.focusOnColumn(columnIndex);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue