forked from MapComplete/MapComplete
Add license clarifications, further work on the notes theme
This commit is contained in:
parent
b15eaff55e
commit
3277b83c5f
6 changed files with 47 additions and 13 deletions
|
@ -2,19 +2,34 @@ import {DropDown} from "../Input/DropDown";
|
|||
import Translations from "../i18n/Translations";
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import {OsmConnection} from "../../Logic/Osm/OsmConnection";
|
||||
import {Translation} from "../i18n/Translation";
|
||||
|
||||
export default class LicensePicker extends DropDown<string> {
|
||||
|
||||
private static readonly cc0 = "CC0"
|
||||
private static readonly ccbysa = "CC-BY-SA 4.0"
|
||||
private static readonly ccby = "CC-BY 4.0"
|
||||
|
||||
constructor(state: {osmConnection: OsmConnection}) {
|
||||
super(Translations.t.image.willBePublished.Clone(),
|
||||
[
|
||||
{value: "CC0", shown: Translations.t.image.cco.Clone()},
|
||||
{value: "CC-BY-SA 4.0", shown: Translations.t.image.ccbs.Clone()},
|
||||
{value: "CC-BY 4.0", shown: Translations.t.image.ccb.Clone()}
|
||||
{value:LicensePicker. cc0, shown: Translations.t.image.cco.Clone()},
|
||||
{value:LicensePicker. ccbysa, shown: Translations.t.image.ccbs.Clone()},
|
||||
{value: LicensePicker. ccby, shown: Translations.t.image.ccb.Clone()}
|
||||
],
|
||||
state?.osmConnection?.GetPreference("pictures-license") ?? new UIEventSource<string>("CC0")
|
||||
)
|
||||
this.SetClass("flex flex-col sm:flex-row").SetStyle("float:left");
|
||||
}
|
||||
|
||||
public static LicenseExplanations() : Map<string, Translation>{
|
||||
let dict = new Map<string, Translation>();
|
||||
|
||||
dict.set(LicensePicker. cc0, Translations.t.image.ccoExplanation)
|
||||
dict.set(LicensePicker. ccby, Translations.t.image.ccbExplanation)
|
||||
dict.set(LicensePicker. ccbysa, Translations.t.image.ccbsExplanation)
|
||||
|
||||
return dict
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue