From 60a183581381359bbb6beb6ced6077a98c0fea18 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Fri, 26 Jul 2019 02:06:45 -0700 Subject: [PATCH] Display files hierarchically in Web UI content tab --- src/webui/www/private/css/style.css | 42 +- src/webui/www/private/index.html | 4 +- src/webui/www/private/properties.html | 3 + src/webui/www/private/scripts/client.js | 13 + src/webui/www/private/scripts/dynamicTable.js | 293 +++++++++- src/webui/www/private/scripts/file-tree.js | 176 ++++++ src/webui/www/private/scripts/filesystem.js | 61 +++ src/webui/www/private/scripts/prop-files.js | 503 ++++++++++++++---- src/webui/www/webui.qrc | 2 + 9 files changed, 979 insertions(+), 118 deletions(-) create mode 100644 src/webui/www/private/scripts/file-tree.js create mode 100644 src/webui/www/private/scripts/filesystem.js diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index b625af7ab..ee027d3d1 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -352,7 +352,6 @@ a.propButton img { #torrentsFilterToolbar { float: right; margin-right: 30px; - margin-right: 30px; } #torrentsFilterInput { @@ -364,6 +363,20 @@ a.propButton img { background-position: left; } +#torrentFilesFilterToolbar { + float: right; + margin-right: 30px; +} + +#torrentFilesFilterInput { + width: 160px; + padding-left: 2em; + background-image: url("../images/qbt-theme/edit-find.svg"); + background-repeat: no-repeat; + background-size: 1.5em; + background-position: left; +} + /* Tri-state checkbox */ label.tristate { @@ -470,6 +483,19 @@ td.generalLabel { line-height: 25px; } +.filesTableCollapseIcon { + width: 15px; + height: 15px; + cursor: pointer; + margin-bottom: -3px; + padding-right: 5px; +} + +.filesTableCollapseIcon.rotate { + transform: rotate(270deg); + margin-bottom: -1px; +} + .unselectable { -webkit-touch-callout: none; -webkit-user-select: none; @@ -596,3 +622,17 @@ td.statusBarSeparator { .searchPluginsTableRow { cursor: pointer; } + +#torrentFilesTableDiv .dynamicTable tr.nonAlt { + background-color: #fff; +} + +#torrentFilesTableDiv .dynamicTable tr.nonAlt.selected { + background-color: #354158; + color: #fff; +} + +#torrentFilesTableDiv .dynamicTable tr.nonAlt:hover { + background-color: #ee6600; + color: #fff; +} diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index 89fc2c68e..fe430ec1d 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -21,8 +21,10 @@ + + @@ -189,7 +191,7 @@
  • QBT_TR(Copy tracker URL)QBT_TR[CONTEXT=TrackerListWidget] QBT_TR(Copy tracker URL)QBT_TR[CONTEXT=TrackerListWidget]