Add custom theme generator

This commit is contained in:
Pieter Vander Vennet 2020-08-08 21:17:17 +02:00
parent 14930e2f93
commit 8d3c8ed9d9
8 changed files with 570 additions and 16 deletions

View file

@ -21,11 +21,10 @@ export class OsmConnection {
public userDetails: UIEventSource<UserDetails>;
private _dryRun: boolean;
constructor(dryRun: boolean, oauth_token: UIEventSource<string>) {
constructor(dryRun: boolean, oauth_token: UIEventSource<string>, singlePage: boolean = true) {
let pwaStandAloneMode = false;
try {
if (window.matchMedia('(display-mode: standalone)').matches || window.matchMedia('(display-mode: fullscreen)').matches) {
pwaStandAloneMode = true;
}
@ -36,7 +35,7 @@ export class OsmConnection {
const iframeMode = window !== window.top;
if ( iframeMode) {
if ( iframeMode || !singlePage) {
// In standalone mode, we DON'T use single page login, as 'redirecting' opens a new window anyway...
// Same for an iframe...
this.auth = new osmAuth({