2021-06-11 22:51:45 +02:00
|
|
|
import {DropDown} from "../Input/DropDown";
|
|
|
|
import Translations from "../i18n/Translations";
|
|
|
|
import State from "../../State";
|
2021-06-14 19:21:33 +02:00
|
|
|
import {UIEventSource} from "../../Logic/UIEventSource";
|
2021-06-11 22:51:45 +02:00
|
|
|
|
|
|
|
export default class LicensePicker extends DropDown<string>{
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super(Translations.t.image.willBePublished,
|
|
|
|
[
|
|
|
|
{value: "CC0", shown: Translations.t.image.cco},
|
|
|
|
{value: "CC-BY-SA 4.0", shown: Translations.t.image.ccbs},
|
|
|
|
{value: "CC-BY 4.0", shown: Translations.t.image.ccb}
|
|
|
|
],
|
2021-06-14 19:21:33 +02:00
|
|
|
State.state?.osmConnection?.GetPreference("pictures-license") ?? new UIEventSource<string>("CC0")
|
2021-06-11 22:51:45 +02:00
|
|
|
)
|
|
|
|
this.SetClass("flex flex-col sm:flex-row").SetStyle("float:left");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|