Display username in edit-toolbar when logged in
This commit is contained in:
parent
51a904dc07
commit
863c2e18d2
4 changed files with 42 additions and 21 deletions
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
|
@ -2,22 +2,22 @@
|
|||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240"
|
||||
height="240"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="16-white.svg"
|
||||
inkscape:export-filename="/home/ybon/Code/js/Leaflet.Storage/src/img/16-white.png"
|
||||
inkscape:export-xdpi="89.996864"
|
||||
inkscape:export-ydpi="89.996864">
|
||||
inkscape:export-filename="16-white.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
|
@ -27,21 +27,24 @@
|
|||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="167.09394"
|
||||
inkscape:cy="38.63729"
|
||||
inkscape:zoom="5.15968"
|
||||
inkscape:cx="133.2447"
|
||||
inkscape:cy="189.06211"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2032"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1019"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="54"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-to-guides="true">
|
||||
inkscape:snap-to-guides="true"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3004"
|
||||
|
@ -282,7 +285,7 @@
|
|||
x="81.647079"
|
||||
sodipodi:role="line"
|
||||
id="tspan4459-6"
|
||||
style="font-size:30.4761982px;line-height:1.25;font-family:sans-serif"> </tspan></text>
|
||||
style="font-size:30.4762px;line-height:1.25;font-family:sans-serif"> </tspan></text>
|
||||
<g
|
||||
id="text4356-2"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
|
@ -725,9 +728,13 @@
|
|||
id="path4407"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.1772268;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.177;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 139.96039,1040.2365 7.74718,-7.7842 h -15.49436 z"
|
||||
id="path4407-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="m 100.05856,1033.6588 c 1.5887,0 3.11185,0.6337 4.23522,1.7571 1.12337,1.1232 1.7553,2.6464 1.75709,4.2352 0,0.238 -0.12691,0.4577 -0.3329,0.5766 -0.20598,0.1189 -0.45982,0.1189 -0.66579,0 -0.20598,-0.1189 -0.33291,-0.3386 -0.33291,-0.5766 0,-1.6651 -0.88828,-3.2037 -2.33028,-4.0363 -1.44199,-0.8324 -3.218566,-0.8324 -4.660564,0 -1.441999,0.8326 -2.330283,2.3712 -2.330283,4.0363 0,0.238 -0.126916,0.4577 -0.332898,0.5766 -0.205982,0.1189 -0.459818,0.1189 -0.665795,0 -0.205978,-0.1189 -0.332898,-0.3386 -0.332898,-0.5766 0.0018,-1.5887 0.633685,-3.1118 1.757091,-4.2352 1.123215,-1.1234 2.646403,-1.7553 4.235217,-1.7571 z m 0,-0.6658 c -0.882924,0 -1.729586,-0.3507 -2.353913,-0.9751 -0.624325,-0.6243 -0.975066,-1.471 -0.975066,-2.3539 0,-0.8829 0.350734,-1.7296 0.975066,-2.3539 0.624334,-0.6244 1.470989,-0.9751 2.353913,-0.9751 0.88292,0 1.72959,0.3507 2.35391,0.9751 0.62432,0.6243 0.97506,1.471 0.97506,2.3539 -8.2e-4,0.8826 -0.35206,1.7288 -0.97624,2.3528 -0.62402,0.6241 -1.47012,0.9752 -2.35273,0.9762 z m 0,-1.3316 c 0.52982,0 1.03776,-0.2105 1.41244,-0.5849 0.37451,-0.3747 0.58494,-0.8827 0.58494,-1.4125 0,-0.5298 -0.21043,-1.0377 -0.58494,-1.4124 -0.37466,-0.3745 -0.88262,-0.585 -1.41244,-0.585 -0.529824,0 -1.037768,0.2105 -1.41244,0.585 -0.374512,0.3747 -0.584948,0.8826 -0.584948,1.4124 0,0.5298 0.210436,1.0378 0.584948,1.4125 0.37466,0.3744 0.882616,0.5849 1.41244,0.5849 z"
|
||||
id="path349"
|
||||
style="stroke-width:0.178;fill:#f2f2f2;fill-opacity:1;stroke:#999999;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 58 KiB |
|
@ -2021,10 +2021,14 @@ L.U.Map.include({
|
|||
setName = function () {
|
||||
name.textContent = this.getDisplayName()
|
||||
}
|
||||
if (this.options.user) {
|
||||
const userLabel = L.DomUtil.add('a', 'umap-user', title, this.options.user.name)
|
||||
userLabel.href = this.options.user.url
|
||||
}
|
||||
L.bind(setName, this)()
|
||||
L.DomEvent.on(name, 'click', this.edit, this)
|
||||
this.on('postsync', L.bind(setName, this))
|
||||
this.help.button(title, 'edit')
|
||||
this.help.button(name, 'edit')
|
||||
const save = L.DomUtil.create('a', 'leaflet-control-edit-save button', container)
|
||||
save.href = '#'
|
||||
save.title = `${L._('Save current edits')} (Ctrl+S)`
|
||||
|
|
|
@ -430,6 +430,16 @@ ul.photon-autocomplete {
|
|||
.umap-main-edit-toolbox h3 {
|
||||
display: inline;
|
||||
}
|
||||
.umap-main-edit-toolbox .umap-user:before {
|
||||
content: '|';
|
||||
color: #fff;
|
||||
padding-right: 10px;
|
||||
background-image: url('./img/16-white.png');
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
background-position: -80px -202px;
|
||||
width: 20px;
|
||||
}
|
||||
.umap-edit-enabled .leaflet-top {
|
||||
top: 48px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue