forked from MapComplete/MapComplete
Add attribution script and some attributions
This commit is contained in:
parent
99b0f937b7
commit
0fea2c87cd
11 changed files with 223 additions and 8 deletions
|
@ -10,6 +10,9 @@ import Loc from "../../Models/Loc";
|
|||
import LeafletMap from "../../Models/LeafletMap";
|
||||
import * as L from "leaflet"
|
||||
|
||||
/**
|
||||
* The bottom right attribution panel in the leaflet map
|
||||
*/
|
||||
export default class Attribution extends UIElement {
|
||||
|
||||
private readonly _location: UIEventSource<Loc>;
|
||||
|
|
26
UI/BigComponents/AttributionPanel.ts
Normal file
26
UI/BigComponents/AttributionPanel.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import {UIElement} from "../UIElement";
|
||||
import Combine from "../Base/Combine";
|
||||
import Translations from "../i18n/Translations";
|
||||
import Attribution from "./Attribution";
|
||||
import State from "../../State";
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import LayoutConfig from "../../Customizations/JSON/LayoutConfig";
|
||||
import {FixedUiElement} from "../Base/FixedUiElement";
|
||||
|
||||
/**
|
||||
* The attribution panel shown on mobile
|
||||
*/
|
||||
export default class AttributionPanel extends Combine {
|
||||
|
||||
constructor(layoutToUse: UIEventSource<LayoutConfig>) {
|
||||
super([
|
||||
Translations.t.general.attribution.attributionContent,
|
||||
Translations.t.general.attribution.themeBy.Subs({author: layoutToUse.data.maintainer}),
|
||||
"<br/>",
|
||||
new Attribution(undefined, undefined, State.state.layoutToUse, undefined),
|
||||
"<br/>",
|
||||
"<h4>", Translations.t.general.attribution.iconAttribution.title, "</h4>"
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue