Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 5c2c8903 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

UI fixes

parent befee5fb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Currency convert (DuckDuckGo)
"""
currency convert (DuckDuckGo)
"""

import json
@@ -56,6 +56,7 @@ def response(resp):
            "conversion_rate": round(conversion_rate, 2),
            "source_url": source_url,
            "url": url,
            "content": "",
        }
    )
    return results
+2 −0
Original line number Diff line number Diff line
@@ -22,3 +22,5 @@ description = gettext(
)
default_on = True
preference_section = "ui"

js_dependencies = ('plugins/js/search_on_category_select.js',)
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ from .online import OnlineProcessor


parser_re = re.compile(
    r".*?(\\d+(?:\\.\\d+)?)\s?([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)",
    '.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to|en|dans|nel|pour|para|zu|a) ([^.0-9]+)',
    re.I,
)

+2 −2
Original line number Diff line number Diff line
@@ -86,10 +86,10 @@ outgoing:
  # to the administrator
  useragent_suffix: ""
  # The maximum number of concurrent connections that may be established.
  pool_connections: 100
  pool_connections: 200
  # Allow the connection pool to maintain keep-alive connections below this
  # point.
  pool_maxsize: 20
  pool_maxsize: 40
  # See https://www.python-httpx.org/http2/
  enable_http2: true
  # uncomment below section if you want to use a custom server certificate
+42 −0
Original line number Diff line number Diff line
$(document).ready(function() {
    if($('#q').length) {
        $('#categories label[for^="checkbox_"]').click(function(e) {
            $('#categories input[type="checkbox"]').each(function(i, checkbox) {
                $(checkbox).prop('checked', false);
            });
            $(document.getElementById($(this).attr("for"))).prop('checked', true);
            if($('#q').val()) {
                if (getHttpRequest() == "GET") {
                    $('#search_form').attr('action', $('#search_form').serialize());
                }
                $('#search_form').submit();
            }
            return false;
        });
        $('#time-range').change(function(e) {
            if($('#q').val()) {
                if (getHttpRequest() == "GET") {
                    $('#search_form').attr('action', $('#search_form').serialize());
                }
                $('#search_form').submit();
            }
        });
        $('#language').change(function(e) {
            if($('#q').val()) {
                if (getHttpRequest() == "GET") {
                    $('#search_form').attr('action', $('#search_form').serialize());
                }
                $('#search_form').submit();
            }
        });
    }
});

function getHttpRequest() {
    httpRequest = "POST";
    urlParams = new URLSearchParams(window.location.search);
    if (urlParams.has('method')) {
        httpRequest = urlParams.get('method');
    }
    return httpRequest;
}
Loading