Compare commits

..

No commits in common. "b6229a05b7f01f628f1630fe877f437ecaa4688e" and "2008cca2f4facbe8a81f023d4d15fe3622071760" have entirely different histories.

7 changed files with 14 additions and 38 deletions

View file

@ -66,7 +66,7 @@ docker = [
"uwsgi==2.0.28",
]
sync = [
"channels==4.2.0",
"channels==4.1.0",
"daphne==4.1.2",
"pydantic==2.9.2",
"websockets==13.1",

View file

@ -24,11 +24,11 @@ input:-moz-placeholder, :-moz-placeholder {
body.login {
width: 320px;
margin: auto;
background-color: var(--color-lighterGray);
color: var(--color-darkerGray);
text-align: center;
}
body.login header {
display: flex;
justify-content: center;
}
.login-grid {
display: grid;

View file

@ -174,15 +174,15 @@ export function toHTML(r, options) {
// iframe
r = r.replace(
/{{{(h_t_t_ps?[^|{]*)}}}/g,
/{{{(h_t_t_ps?[^ |{]*)}}}/g,
'<div><iframe frameborder="0" src="$1" width="100%" height="300px"></iframe></div>'
)
r = r.replace(
/{{{(h_t_t_ps?[^|{]*)\|(\d*)(px)?}}}/g,
/{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?}}}/g,
'<div><iframe frameborder="0" src="$1" width="100%" height="$2px"></iframe></div>'
)
r = r.replace(
/{{{(h_t_t_ps?[^|{]*)\|(\d*)(px)?\*(\d*)(px)?}}}/g,
/{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?\*(\d*)(px)?}}}/g,
'<div><iframe frameborder="0" src="$1" width="$4px" height="$2px"></iframe></div>'
)

View file

@ -405,7 +405,7 @@ L.FormBuilder.LicenceChooser = L.FormBuilder.Select.extend({
},
toHTML: function () {
return this.get()?.name
return this.get().name
},
toJS: function () {

View file

@ -147,7 +147,7 @@ describe('Utils', () => {
)
})
it('should handle double iframe', () => {
it('should handle iframe with height with px', () => {
assert.equal(
Utils.toHTML(
'A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}'
@ -156,15 +156,6 @@ describe('Utils', () => {
)
})
it('should handle iframe with query string and space', () => {
assert.equal(
Utils.toHTML(
'An iframe with query string: {{{https://osm.org/pouet.html?name=foobar&description=baz baz}}}'
),
'An iframe with query string: <div><iframe height="300px" width="100%" src="https://osm.org/pouet.html?name=foobar&amp;description=baz baz" frameborder="0"></iframe></div>'
)
})
it('http link with http link as parameter as variable', () => {
assert.equal(
Utils.toHTML('A phrase with a [[http://iframeurl.com?to=http://another.com]].'),
@ -272,19 +263,6 @@ describe('Utils', () => {
)
})
it('should process variables in http links', () => {
assert.equal(
Utils.greedyTemplate(
'A phrase with a {{{https://osm.org/pouet?name={name}&description={description}}}}.',
{
name: 'foobar',
description: 'bazbaz',
}
),
'A phrase with a {{{https://osm.org/pouet?name=foobar&description=bazbaz}}}.'
)
})
it('should not accept dash', () => {
assert.equal(
Utils.greedyTemplate('A phrase with a {var-iable}.', { 'var-iable': 'value' }),

View file

@ -2,7 +2,6 @@
/* Colors. */
--color-waterMint: #B9F5D2;
--color-darkBlue: #263B58;
--color-lighterGray: #f6f6f6;
--color-lightGray: #ddd;
--color-mediumGray: #3e4444;
--color-darkGray: #323737;

View file

@ -19,11 +19,10 @@
<header class="umap-nav">
{% include "umap/branding.html" %}
</header>
<h2>{% trans "To save and easily find your maps, identify yourself." %}</h2>
{% if ENABLE_ACCOUNT_LOGIN %}
<h3>
{% trans "Please log in with your account:" %}
</h3>
<h2>
{% trans "Please log in with your account" %}
</h2>
<div>
{% if form.non_field_errors %}
<ul class="form-errors">
@ -48,9 +47,9 @@
</div>
{% endif %}
{% if backends.backends|length %}
<h3>
{% trans "Please choose a provider:" %}
</h3>
<h2>
{% trans "Please choose a provider" %}
</h2>
<div>
<ul class="login-grid block-grid">
{% for name in backends.backends %}