summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web
Commit message (Collapse)AuthorAge
* [Web] Accept charset in content-type for json messagesibizaman2022-06-12
| | | | | Trac: https://dev.deluge-torrent.org/ticket/3521 Closes: https://github.com/deluge-torrent/deluge/pull/385
* [WebUI] Fixed 'Complete Seen' and 'Completed' sortingMartin Hertz2022-05-17
| | | | Closes: https://github.com/deluge-torrent/deluge/pull/384
* [WebUI] Move HTML entity encoding to clientCalum Lind2022-02-14
| | | | | | | | | | | | | | | | | | | We should not be mangling the torrent data in the JSON API since this can have unintended consquences with names and filepaths that can be edited. If we escape those symbols in the JSON API then the data no longer matches that stored by core. Therefore shift the encoding to the client and consider dealing separetely with these entities when the user first adds a torrent. * Created a modified htmlEncode in Deluge Formatter based on extjs method that also encodes single quotes. * Removed renderers in ListViews since only templates specified via tpl are used and any render attribute specified was a no-op. * Removed old buggy escapeHtml Resolves: https://dev.deluge-torrent.org/ticket/3459 Ref: https://docs.sencha.com/extjs/6.5.3/modern/src/String.js.html#Ext.String-method-htmlEncode Ref: https://docs.sencha.com/extjs/3.4.0/source/Format.html#Ext-util-Format-method-htmlEncode
* [WebUI] Fix encoding HTML entities for torrent attributesCalum Lind2022-02-14
| | | | | | | | | | Ensure all torrent attributes that might contain malicious HTML entities are encoded. By allowing HTML entities to be rendered it enable malicious torrent files to perform XSS attacks. Resolves: https://dev.deluge-torrent.org/ticket/3459
* [Lint] Update linter version and fix issuesCalum Lind2022-02-13
| | | | | | | | | | | Notable changes: * Prettier >=2.3 with more consistent js assignments * Black now formats docstrings * Added isort to list of autoformaters * Update flake8 config for v4 Ref: https://prettier.io/blog/2021/05/09/2.3.0.html
* [Core] Stopped using libtorrent deprecated functionsDjLegolas2022-02-13
| | | | | | | | | | | | | | | | | As part of the process of adding support to LT 2.0, we should stop using all deprecated function, as some (if not all) were removed. For this process, we should use the LT 1.2 upgrade (guide)[1]. The change includes: * stop using file entries directly * start using the torrent handle's set/unset flags * stop using url key in add_torrent_params (for magnet) * stop accessing resume_data from save_resume_data_alert * stop using deprecated session status keys in UI [1] https://libtorrent.org/upgrade_to_1.2-ref.html Closes: https://dev.deluge-torrent.org/ticket/3499 Closes: https://github.com/deluge-torrent/deluge/pull/342
* [WebUI] Define foreground and background colorsDjLegolas2022-01-03
| | | | | | | | There is no promise that default bg is white and default fg is black so define in deluge.css Ref: https://dev.deluge-torrent.org/ticket/3435 Closes: deluge-torrent/deluge#330
* Upgrade codebase with pyupgrade (>=py3.6)DjLegolas2021-12-29
| | | | | | | | Added pyupgrade utility with manual stage to pre-commit and run on all files. Ref: https://github.com/asottile/pyupgrade Closes: deluge-torrent/deluge#326
* Remove all Python 2 supportdeluge-2.1.0.dev0DjLegolas2021-12-28
| | | | | | | | | * Removed all __future__ imports from code * Removed all six dependencies * Removed all future_builtins imports * Removed all Python 2 related code Closes: deluge-torrent/deluge#325
* [WebUI] Fixed ETA sorting in WebUIDjLegolas2021-12-22
| | | | | | | | | | When sorting the according to ETA values, all torrents with infinite value were being considered a lower value (INF -> 12 -> 32) instead of largest (12 -> 32 -> INF). This is due to the fact that the INF symbol is placed to lower value (<= 0). Now the lower values are being treated as the largest JS number when sorting. Closes: https://dev.deluge-torrent.org/ticket/3413 Closes: https://github.com/deluge-torrent/deluge/pull/321
* [Servers] Moved check_ssl_keys and generate_ssl_keys to crypto_utils.pyDjLegolas2021-12-20
| | | | | | | | | With this change, we drop a core dependency from the UI. This will help group together all related functionality in one place, i.e. all security related functions. Also updated testssl.sh version to 3.0.6 (SECURITY_TEST) Closes: deluge-torrent/deluge#288
* [Build] Fix WebUI js minifying errorCalum Lind2021-12-15
| | | | | | | | | | | | | Some users encoutered a bug where WebUI in browser show a white screen, which indicates a problem with loading javascript files. The problem was due to closure minifying failure leaving a zero-length deluge-all.js file which broke the usual fallback mechanism to debug files. * Fixed usage of ES6 const declaration breaking closure minifying. * Cleanup minified files upon errors so no zero length files left * Replaced broken and unmaintained slimit with rjsmin. * Fixed unable to set dev or debug query args due to request args requiring bytes.
* [Lint] Fix spelling mistakesCalum Lind2021-09-21
| | | | | | | A quick fix of some of the mistakes caught by codespell. Updated readme with new IRC server Useful to add it as part of linting checks.
* [UI] Add magnet icons for copy and add actionsCalum Lind2021-09-21
| | | | | | | Added new magnet icons with a consistent naming scheme Run script to update all icons Co-authored-by: Matias Wilkman <matias.wilkman@gmail.com>
* [WebUI] Add menu option to copy magnet URIGargaj2021-09-21
|
* [WebUI] Add country flag alt/title for accessibilityVasilij Schneidermann2021-01-29
| | | | | This allows viewing the country in textual form by hovering the flag image and displays it if the image couldn't be loaded.
* [WebUI] Fix tracker icon download errorEFS2021-01-29
| | | | | | | | | | Encoutering an error when webui attempts to download tracker icon: Error occurred downloading file from "http://b'acg.rip'/": invalid hostname: b'acg.rip' Fixed by ensuring the request.tracker_name is decoded from bytes before looking up the icon name.
* [Lint] Update pre-commit hook and isort versionsCalum Lind2021-01-24
| | | | | | | | | | | | | * Fixed black hook requiring Py3.6 to installed locally. Will now assume Py3.6+ in installed. * Added isort traceback in pre-commit flake8 hook fails * Updated versions of Black, Prettier and isort * Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638 * New pyproject config for isort v5 with fixes for Python 2 imports. * Fixed travis config to run Python 3.6 for lint run. Replaced the virtualenv with_system_site_packages config with Travis specific Python config value so lint run doesn't attempt to append with_system_site_packages to Python 3.6 command.
* [WebUI] Fix class-header for Deluge.EditTrackersWindowDjLegolas2019-06-25
|
* [WebUI] Handle torrent add failuresDjLegolas2019-06-21
| | | | Closes #2253.
* [Docs] Add spellchecking with pyenchantCalum Lind2019-06-15
| | | | | | | | | - Use sphinxcontrib.spelling with custom wordlist. - Skip the checking of the modules documents as they raise false-positives. - Add a setup.py spellcheck_docs command. - Fix spelling and other issues. - Add a doc favicon.
* [Web] Fix unable to change passwordCalum Lind2019-06-11
| | | | | | | | | The hashlib update method requires bytes and raised a TypeError for salt passed as text. Added a test for auth change_password Fixes: #3262
* [Web] Change request.base path encoding to utf-8Calum Lind2019-06-11
| | | | | | | | | | | A user reported a problem with setting base path resulting in this error: encoding with 'idna' codec failed (UnicodeError: label too long) It is likely the base path is longer than 63 chars, which is unusual, however the idna codec is for domain name not paths so switch to utf-8. Fixes: #3261
* [Web] Fix TypeError with reverse proxy x-deluge-base headerCalum Lind2019-06-11
| | | | | | The request header needs decoded otherwise string comparisons fail. Fixes: #3260
* [Web] Fix peers tab failing to set flag locationthelamer2019-06-11
| | | | The request.country returns bytes not a string so decode.
* [Web] Fix missing deregister_objectCalum Lind2019-05-11
| | | | | pluginbase has the complementary deregister_object but the actual method was missing in JSON component.
* [Core] Refactor the base argparser and translation code.Calum Lind2019-05-11
| | | | | | | | | | | | | | - Move baseargparser out of deluge/ui since it is also used by the Daemon and could cause packaging issues if UI code is not available. - Renamed baseargparser to argparserbase to follow existing Deluge naming. - Renamed get_version to distinguish from deluge.common.get_version. - Translation code is usable by more than just the UIs so also move it to Deluge namespace and re-use i18n directory and make it a package. - Renamed setup_translations to singular as it felt more correct. - Renamed set_dummy_trans to be more descriptive. Closes: #3081
* [#3244|Web] Add support for accept-encoding headerCalum Lind2019-05-09
| | | | | | * Use EncodingResourceWrapper to replace compress function so that the proper checks for accept-encoding header are made. * Ensure only text is compressed and images are left uncompressed.
* [Lint] Fix flake8 3.7 warningsCalum Lind2019-03-29
| | | | | | | | | | | - Fix new flake8 warnings from latest version. Note: The `addSlash` variable was orphaned with no reference in Twisted or Deluge code so removed. - Update pre-commit config - New pinned versions. - Fix prettier output. - Use new flake8 hook config and add naming plugin.
* [Lint] Bump prettier version to 1.15.2Calum Lind2018-11-16
|
* [WebUI] Catch unhandled 'Bad host id' exceptionCalum Lind2018-11-16
| | | | | | | The bad host id error usually occurs on webui when the 'default_daemon' key in web.conf does not exist in hostlist.conf. Added a errback method to output a more useful log message.
* [UI|Core] Fix problems with file prioritiesCalum Lind2018-11-05
| | | | | | | - Fixed the core not correctly settings the current file_priority settings and added a test. - Fixed the console not setting file priorities. - Change the label for not downloading of a file to 'Skip'.
* [GTK3] Fix gettext translation codeCalum Lind2018-11-02
| | | | | | | | | Add translation setup for Gtk.Builder ui files. Refactor and cleanup up the translations_util: - Remove old gtk.glade code. - Add macos libintl support. - Remove unneeded setup_translations parameters.
* [Docs] Reorganise and add sections from wikiCalum Lind2018-11-01
| | | | | | | | | | | | | | | | | | | - Change the layout and contents of docs to be better organised and follow ideas from: https://www.divio.com/blog/documentation/ - Use markdown for non-technical documents to speed up writing. - Added new sections and imported documents from Trac wiki. Build fixes: - Added a patch to fix recommonmark 0.4 and doc referencing: https://github.com/rtfd/recommonmark/issues/93 - Set docs build in tox to Py2.7 since there are problems with autodoc mocking multiple inheritance on Python 3 resulting in metaclass errors. - Supressed warning about `modules.rst` not in the toctree by creating a static `modules.rst` with `:orphan:` file directive and add to git. Also skip creating this toc file with sphinx-apidoc in setup and tox. - Simplified finding exported RPC and JSON API methods by adding an autodoc custom class directive. Removed unneeded __rpcapi.py.
* [#1903|UI] Add super seeding option to interfacesCalum Lind2018-10-25
| | | | | | | - Fix applying the setting to libtorrent, passing the value without modification so it decide when to enable it. - Enable super_seeding option when adding torrents to core. - Update UIs with option in tabs and add dialogs.
* [WebUI][#2009] Add About windowDjLegolas2018-10-21
| | | | | | | | - Add an About window to see version details like GTKUI. - The author and license text were left out as unnecessary. - Added a daemon get_version method since daemon version was not available through the json-api. - Fix LookupResource to ensure path exists when rendering.
* Fix large ETA overflow C intCalum Lind2018-10-19
| | | | | | | | | | The following error was encountered in GTK3 which is a result of trying to cast a very large ETA value to C int and raising an Overlflow error. <type 'exceptions.OverflowError'>: 3072227291 not in range -2147483648 to 2147483647 The solution is to limit the ETA to 1 year and represent any values over that as -1 which the UIs can display as infinity.
* [WebUI] Enable debug URL parameter to parse false valuesCalum Lind2018-10-16
| | | | | | | When installed as a development version there was no way to load the normal js scripts so improve the debug arg handling by parsing for false values to force use of normal type scripts. Since debug arg overrides dev, leave dev as is.
* [WebUI] Fix closure minified size increaseCalum Lind2018-10-16
| | | | | | | All of the non-standard docstring file headers were being added to minified files, increasing the file size. Replace with jsdoc `/**`. Remove ext-extensions from git as will be generated by minify script.
* [WebUI] Fix prettier javascript issueCalum Lind2018-10-16
| | | | | | | | Prettier removed too many parentheses in asIPAdress and when minifying the plus unary combined with the plus operator to create an incorrect increment operator. So skip prettier formatting this secion of code. Also fix an ECMA5 warning from closure about function scope in FilesTab.
* [WebUI] Keep debug js in packaging and fix script lookupCalum Lind2018-10-16
| | | | | | | | | | | | | | | | | | | | | | Packaging: - Decided that the debug files are useful for end-user so keep them in package installation. For debug script_type to be usable all debug file need to be avaialble so extjs debug files also included. Script type selection: - Fixed dev and debug request args to be properly decoded on Python 3, otherwise comparison would fail and allowed any case for values. - Modified the choosing of the script type to pick debug if specified as previously always choosing dev type if dev version was True. A rare scenario but useful but now debug is used if specified otherwise use dev. - Changed the order when looking for alternative script types to start with dev so that if debug is specified but missing it uses a similar script type as previously would fallback to normal which is likely undesired.
* [WebUI] Fix error escaping translated textCalum Lind2018-10-13
| | | | | | | | | In a previous commit d4023e7dde42 removed a decode for Python 3 but with translated text returned by gettext encoded on Python 2 the escape function would raise a UnicodeDecodeError trying to use ascii to decode. The fix is to decode the message returned by gettext on Python 2.
* [WebUI] Allow multiple torrent uploads in Add dialogCalum Lind2018-10-10
| | | | | | | | Add a new `multiple` field to FileUploadField to allow selecting multiple files. Include a fallback for if browser does not support multiple file selection. Update Add window to upload and parse multiple torrent files at once.
* [WebUI] Use application/json in headerCalum Lind2018-10-10
|
* [WebUI|Py3] Refactor content_type checkCalum Lind2018-10-10
| | | | Simplify getting content_type from request to prevent str/bytes mixup.
* [WebUI|Py3] Fix and refactor torrent uploadCalum Lind2018-10-10
|
* [WebUI] Fixes for login auth on Python 3Calum Lind2018-10-10
| | | | Remove obsolete password check code.
* Update pre-commit configCalum Lind2018-10-08
| | | | | | The prettier hook was missing a trailing slash so omitting css files. Add a trailing space fix hook and fix issues.
* [WebUI] Fix browser Flash plugin warningCalum Lind2018-10-08
| | | | | Do not perform flash player version detection using the fix from here: https://github.com/georchestra/georchestra/issues/902
* [WebUI] Update extjs to 3.4.1.1Calum Lind2018-10-08
| | | | | | Better late than never... http://cdn.sencha.com/ext/commercial/3.4.1.1/release-notes.html