forked from MapComplete/MapComplete
Better upload image flow: more feedback for users
This commit is contained in:
parent
e601807fc5
commit
ab0d314330
8 changed files with 97 additions and 24 deletions
32
test.ts
32
test.ts
|
@ -0,0 +1,32 @@
|
|||
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";
|
||||
|
||||
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);
|
||||
|
||||
new ImageUploadFlow(
|
||||
osmConnection.userDetails,
|
||||
new UIEventSource<string>("cc0"),
|
||||
(license: string) => {
|
||||
return {
|
||||
title: "test",
|
||||
description: "test",
|
||||
handleURL: console.log,
|
||||
allDone: () => {
|
||||
}
|
||||
}
|
||||
}).AttachTo("maindiv")
|
||||
|
||||
Locale.language.setData("nl")
|
Loading…
Add table
Add a link
Reference in a new issue