Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Add log viewer #18290

Merged
merged 3 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Code from other projects:
copyright: Dan Haim <negativeiq@users.sourceforge.net>
license: BSD

* files src/webui/www/private/css/vanillaSelectBox.css src/webui/www/private/scripts/vanillaSelectBox.js
Chocobo1 marked this conversation as resolved.
Show resolved Hide resolved
copyright: Philippe Meyer <pmg.meyer@gmail.com>
license: MIT

Images Authors:
* files: src/icons/qbittorrent-tray.svg
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
Expand Down
256 changes: 256 additions & 0 deletions src/webui/www/private/css/vanillaSelectBox.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
.hidden-search {
display: none !important;
}

li[data-parent].closed {
display: none !important;
}

li[data-parent].open:not(.hidden-search) {
display: block !important;
}

.vsb-menu {
background-clip: padding-box;
background-color: #fff;
border: 1px solid rgb(0 0 0 / 15%);
border-radius: 4px;
box-shadow: 0 6px 12px rgb(0 0 0 / 17.5%);
cursor: pointer;
display: block;
font-size: 11px;
position: absolute; /*Don't change*/
visibility: hidden;
z-index: 1000;
}

.vsb-js-search-zone {
background-color: #fff;
min-height: 1.8em;
padding: 2px;
position: absolute; /*Don't change*/
width: 80%;
z-index: 1001;
}

.vsb-js-search-zone input {
border: 1px solid grey;
border-radius: 4px;
height: 25px !important;
margin-left: 2px;
width: 96%;
}

.vsb-main {
display: inline-block;
position: relative; /*Don't change*/
text-align: left;
vertical-align: middle;
}

.vsb-menu li:hover {
background: linear-gradient(#f5f5f5, #e8e8e8);
}

.vsb-menu ul {
color: #333;
cursor: pointer;
list-style: none;
margin: 4px 0px 0px;
overflow-y: auto;
padding: 0px 10px 3px;
user-select: none;
white-space: nowrap;
}

li.disabled {
background-color: #999;
cursor: not-allowed;
opacity: 0.3;
}

li.overflow {
background-color: #999;
cursor: not-allowed;
opacity: 0.3;
}

li.short {
overflow: hidden;
text-overflow: ellipsis;
}

.vsb-main button {
background: white !important;
border: 1px solid #999 !important;
border-radius: 0;
color: #333;
font-size: 14px;
line-height: 20px;
min-width: 120px;
padding: 6px 12px;
text-align: left;
width: 100%;
z-index: 1;
}

.vsb-main button.disabled {
cursor: not-allowed;
opacity: 0.65;
}

.vsb-main .title {
margin-right: 6px;
user-select: none;
}

.vsb-main li:hover {
background: linear-gradient(#f5f5f5, #e8e8e8);
}

.vsb-main ul {
white-space: nowrap;
}

.vsb-menu li {
background-color: #fff;
font-size: 14px;
min-height: 1.4em;
padding: 0.2em 2em 0.2em 1em;
}

.vsb-menu li.grouped-option b {
display: inline-block;
font-size: 15px;
margin-left: 10px;
transform: translate(-18px);
}

.vsb-menu li.grouped-option.open span {
border-bottom: 3px solid black;
border-radius: 2px;
border-right: 3px solid black;
display: inline-block;
font-size: inherit;
height: 8px;
margin-top: -2px;
transform: translate(-38px) rotate(45deg);
width: 8px;
}

.vsb-menu li.grouped-option.closed span {
border-bottom: 3px solid black;
border-radius: 2px;
border-right: 3px solid black;
display: inline-block;
font-size: inherit;
height: 8px;
transform: translate(-38px) rotate(-45deg);
width: 8px;
}

.vsb-menu li.grouped-option i {
border: 1px solid;
border-radius: 3px;
color: black;
display: inline-block;
float: left;
font-size: inherit;
font-weight: bold;
height: 11px;
margin: 0px 2px 0px 22px;
padding: 1px 3px 2px;
width: 8px;
}

.vsb-menu li.grouped-option.checked i::after {
border-bottom: 3px solid black;
border-right: 3px solid black;
color: #333;
content: "";
display: inline-block;
float: left;
font-size: inherit;
height: 8px;
margin-left: 0px;
transform: rotate(45deg);
width: 5px;
}

.vsb-menu :not(.multi) li.active {
margin-left: 7px;
}

.vsb-menu :not(.multi) li.active::before {
border-bottom: 3px solid black;
border-radius: 2px;
border-right: 3px solid black;
content: "";
display: inline-block;
font-size: inherit;
height: 10px;
margin-left: -18px;
transform: rotate(45deg);
width: 5px;
}

.vsb-menu .multi li {
background-color: #fff;
font-size: 14px;
min-height: 1.4em;
padding: 0.2em 1em 0.2em 26px;
}

.vsb-menu .multi li.grouped-option {
font-size: 15px;
padding-left: 5px;
}

.vsb-menu .multi li.grouped-option:hover {
color: rgb(52 31 112);
font-weight: bold;
text-decoration: underline;
}

.vsb-menu .multi li:not(.grouped-option)::before {
border: 1px solid;
border-radius: 3px;
color: black;
content: "";
display: inline-block;
float: left;
font-size: inherit;
font-weight: bold;
margin: 0px 2px 0px -22px;
padding: 7px;
}

.vsb-menu .multi li:not(.grouped-option).active::after {
border-bottom: 3px solid black;
border-right: 3px solid black;
color: #333;
content: "";
display: inline-block;
float: left;
font-size: inherit;
height: 8px;
margin-left: -18px;
margin-top: 1px;
transform: rotate(45deg);
width: 5px;
}

.caret {
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid;
display: inline-block;
height: 0;
margin-left: 2px;
vertical-align: middle;
width: 0;
}

li[data-parent] {
padding-left: 50px !important;
}
2 changes: 2 additions & 0 deletions src/webui/www/private/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ <h1 class="applicationTitle">qBittorrent Web User Interface <span class="version
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="images/checked-completed.svg" alt="QBT_TR(Speed in Title Bar)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Speed in Title Bar)QBT_TR[CONTEXT=MainWindow]</a></li>
<li class="divider"><a id="showSearchEngineLink"><img class="MyMenuIcon" src="images/checked-completed.svg" alt="QBT_TR(Search Engine)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Search Engine)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="showRssReaderLink"><img class="MyMenuIcon" src="images/checked-completed.svg" alt="QBT_TR(RSS)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(RSS Reader)QBT_TR[CONTEXT=MainWindow]</a></li>
<li><a id="showLogViewerLink"><img class="MyMenuIcon" src="images/checked-completed.svg" alt="QBT_TR(Log)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Log)QBT_TR[CONTEXT=MainWindow]</a></li>
<li class="divider"><a id="StatisticsLink"><img class="MyMenuIcon" src="images/view-statistics.svg" alt="QBT_TR(Statistics)QBT_TR[CONTEXT=MainWindow]" width="16" height="16" />QBT_TR(Statistics)QBT_TR[CONTEXT=MainWindow]</a></li>
</ul>
</li>
Expand Down Expand Up @@ -116,6 +117,7 @@ <h1 class="applicationTitle">qBittorrent Web User Interface <span class="version
<li id="transfersTabLink" class="selected"><a class="tab">QBT_TR(Transfers)QBT_TR[CONTEXT=MainWindow]</a></li>
<li id="searchTabLink"><a class="tab">QBT_TR(Search)QBT_TR[CONTEXT=MainWindow]</a></li>
<li id="rssTabLink"><a class="tab">QBT_TR(RSS)QBT_TR[CONTEXT=MainWindow]</a></li>
<li id="logTabLink"><a class="tab">QBT_TR(Execution Log)QBT_TR[CONTEXT=MainWindow]</a></li>
</ul>
<div class="clear"></div>
</div>
Expand Down
Loading