forked from MapComplete/MapComplete
Add custom theme for advanced users
This commit is contained in:
parent
004eead4ee
commit
9c42839f01
44 changed files with 635 additions and 326 deletions
37
test.ts
37
test.ts
|
@ -1,32 +1,11 @@
|
|||
import {ImageUploadFlow} from "./UI/ImageUploadFlow";
|
||||
import {OsmConnection, UserDetails} from "./Logic/Osm/OsmConnection";
|
||||
import {OsmImageUploadHandler} from "./Logic/Osm/OsmImageUploadHandler";
|
||||
import {UIEventSource} from "./UI/UIEventSource";
|
||||
import {Changes} from "./Logic/Osm/Changes";
|
||||
import {SlideShow} from "./UI/SlideShow";
|
||||
import {ElementStorage} from "./Logic/ElementStorage";
|
||||
import {isNullOrUndefined} from "util";
|
||||
import Locale from "./UI/i18n/Locale";
|
||||
import {State} from "./State";
|
||||
import Cyclofix from "./Customizations/Layouts/Cyclofix";
|
||||
import {CustomLayersPanel} from "./Logic/CustomLayersPanel";
|
||||
|
||||
const osmConnection = new OsmConnection(true, new UIEventSource<string>(undefined));
|
||||
const uploadHandler = new OsmImageUploadHandler(
|
||||
new UIEventSource<any>({}),
|
||||
osmConnection.userDetails,
|
||||
new UIEventSource<string>("cc0"),
|
||||
new Changes("blabla", osmConnection, new ElementStorage()),
|
||||
undefined);
|
||||
State.state= new State(new Cyclofix());
|
||||
|
||||
new ImageUploadFlow(
|
||||
osmConnection.userDetails,
|
||||
new UIEventSource<string>("cc0"),
|
||||
(license: string) => {
|
||||
return {
|
||||
title: "test",
|
||||
description: "test",
|
||||
handleURL: console.log,
|
||||
allDone: () => {
|
||||
}
|
||||
}
|
||||
}).AttachTo("maindiv")
|
||||
new CustomLayersPanel().AttachTo("maindiv");
|
||||
|
||||
Locale.language.setData("nl")
|
||||
State.state.osmConnection.GetPreference("mapcomplete-custom-layer-count").addCallback((count) => console.log("Count: ", count))
|
||||
|
||||
State.state.favourteLayers.addCallback(console.log)
|
Loading…
Add table
Add a link
Reference in a new issue