1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-09 14:27:56 +00:00

add log features adaptation, add minor corrections

This commit is contained in:
d47081 2023-11-11 07:43:45 +02:00
parent 388a999d83
commit 00651f4871
8 changed files with 85 additions and 100 deletions

View File

@ -1,8 +1,9 @@
@import url("../palette.css");
.hidden-search { .hidden-search {
display: none !important; display: none !important;
} }
li[data-parent].closed{ li[data-parent].closed{
display:none !important; display:none !important;
} }
@ -12,18 +13,15 @@ li[data-parent].open:not(.hidden-search){
} }
.vsb-menu{ .vsb-menu{
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
display:block; display:block;
visibility: hidden; visibility: hidden;
position:absolute;/*Don't change*/ position:absolute;/*Don't change*/
border:1px solid #B2B2B2; background-clip: padding-box;
background-color: #fff; font-size : 11px;
background-clip: padding-box; background-color: var(--color-background-default);
border: 1px solid rgba(0,0,0,.15); border: 1px solid var(--color-border-default);
box-shadow: 0 6px 12px rgba(0,0,0,.175);
border-radius:4px;
font-size : 11px;
} }
.vsb-js-search-zone{ .vsb-js-search-zone{
@ -31,12 +29,9 @@ li[data-parent].open:not(.hidden-search){
z-index:1001; z-index:1001;
width: 80%; width: 80%;
min-height:1.8em; min-height:1.8em;
padding: 2px; padding: 2px;}
background-color: #fff;
}
.vsb-js-search-zone input{ .vsb-js-search-zone input{
border: 1px solid grey;
margin-left: 2px; margin-left: 2px;
width: 96%; width: 96%;
border-radius: 4px; border-radius: 4px;
@ -46,24 +41,16 @@ li[data-parent].open:not(.hidden-search){
.vsb-main{ .vsb-main{
position: relative;/*Don't change*/ position: relative;/*Don't change*/
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: top;
text-align:left; text-align:left;
} }
.vsb-menu li:hover {
background: linear-gradient(#f5f5f5, #e8e8e8);
}
.vsb-menu ul{ .vsb-menu ul{
user-select:none; user-select:none;
list-style:none; list-style:none;
white-space: nowrap; white-space: nowrap;
margin:0px; margin:0;
margin-top:4px; padding:0;
padding-left:10px;
padding-right:10px;
padding-bottom:3px;
color: #333;
cursor:pointer; cursor:pointer;
overflow-y:auto; overflow-y:auto;
} }
@ -87,15 +74,11 @@ li.short{
.vsb-main button{ .vsb-main button{
min-width: 120px; min-width: 120px;
border-radius: 0; border: 1px solid var(--color-border-default);
border-radius: 4px;
width: 100%; width: 100%;
text-align: left; text-align: left;
z-index: 1; z-index: 1;
color: #333;
background: white !important;
border: 1px solid #999 !important;
line-height:20px;
font-size:14px;
padding:6px 12px; padding:6px 12px;
} }
@ -109,24 +92,22 @@ li.short{
user-select:none; user-select:none;
} }
.vsb-main li:hover {
background: linear-gradient(#f5f5f5, #e8e8e8);
}
.vsb-main ul{ .vsb-main ul{
white-space: nowrap; white-space: nowrap;
} }
.vsb-menu li { .vsb-menu li {
font-size: 14px; font-size: 12px;
background-color: #fff; padding: 4px 26px;
min-height:1.4em; }
padding: 0.2em 2em 0.2em 1em;
.vsb-menu li:hover {
background-color: var(--color-background-blue);
color: var(--color-text-white);
} }
.vsb-menu li.grouped-option b { .vsb-menu li.grouped-option b {
display: inline-block; display: inline-block;
font-size: 15px;
margin-left:10px; margin-left:10px;
transform: translate(-18px); transform: translate(-18px);
} }
@ -138,8 +119,6 @@ li.short{
height: 8px; height: 8px;
width: 8px; width: 8px;
transform: translate(-38px) rotate(45deg); transform: translate(-38px) rotate(45deg);
border-bottom: 3px solid black;
border-right: 3px solid black;
border-radius:2px; border-radius:2px;
} }
@ -149,8 +128,6 @@ li.short{
height: 8px; height: 8px;
width: 8px; width: 8px;
transform: translate(-38px) rotate(-45deg); transform: translate(-38px) rotate(-45deg);
border-bottom: 3px solid black;
border-right: 3px solid black;
border-radius:2px; border-radius:2px;
} }
@ -167,22 +144,18 @@ li.short{
border-radius : 3px; border-radius : 3px;
padding: 1px 3px 2px 3px; padding: 1px 3px 2px 3px;
margin-top:0px; margin-top:0px;
color:black;
} }
.vsb-menu li.grouped-option.checked i::after { .vsb-menu li.grouped-option.checked i::after {
content: ""; content: "";
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
color: #333;
float:left; float:left;
margin-left:0px; margin-left:0px;
display: inline-block; display: inline-block;
transform: rotate(45deg); transform: rotate(45deg);
height: 8px; height: 8px;
width: 5px; width: 5px;
border-bottom: 3px solid black;
border-right: 3px solid black;
} }
.vsb-menu :not(.multi) li.active { .vsb-menu :not(.multi) li.active {
@ -197,20 +170,12 @@ li.short{
transform: rotate(45deg); transform: rotate(45deg);
height: 10px; height: 10px;
width: 5px; width: 5px;
border-bottom: 3px solid black;
border-right: 3px solid black;
border-radius:2px; border-radius:2px;
} border-bottom: 3px solid var(--color-border-blue);
border-right: 3px solid var(--color-border-blue);
.vsb-menu .multi li {
font-size: 14px;
background-color: #fff;
min-height:1.4em;
padding: 0.2em 2em 0.2em 26px;
} }
.vsb-menu .multi li.grouped-option { .vsb-menu .multi li.grouped-option {
font-size: 15px;
padding-left: 5px; padding-left: 5px;
} }
@ -222,6 +187,7 @@ li.short{
} }
.vsb-menu .multi li:not(.grouped-option)::before{ .vsb-menu .multi li:not(.grouped-option)::before{
background: var(--color-background-popup);
content: ""; content: "";
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
@ -233,14 +199,12 @@ li.short{
border-radius : 3px; border-radius : 3px;
padding : 7px; padding : 7px;
margin-top:0px; margin-top:0px;
color:black;
} }
.vsb-menu .multi li:not(.grouped-option).active::after { .vsb-menu .multi li:not(.grouped-option).active::after {
content: ""; content: "";
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
color: #333;
float:left; float:left;
margin-left:-18px; margin-left:-18px;
display: inline-block; display: inline-block;
@ -248,8 +212,8 @@ li.short{
margin-top:1px; margin-top:1px;
height: 8px; height: 8px;
width: 5px; width: 5px;
border-bottom: 3px solid black; border-bottom: 3px solid var(--color-border-blue);
border-right: 3px solid black; border-right: 3px solid var(--color-border-blue);
} }
.caret { .caret {
@ -268,4 +232,3 @@ li.short{
li[data-parent]{ li[data-parent]{
padding-left: 50px !important; padding-left: 50px !important;
} }

View File

@ -12,6 +12,7 @@
--color-background-blue: hsl(210deg 42% 48%); --color-background-blue: hsl(210deg 42% 48%);
--color-background-popup: hsl(0deg 0% 100%); --color-background-popup: hsl(0deg 0% 100%);
--color-background-default: hsl(0deg 0% 94%); --color-background-default: hsl(0deg 0% 94%);
--color-border-blue: hsl(210deg 100% 55%);
--color-border-default: hsl(0deg 0% 85%); --color-border-default: hsl(0deg 0% 85%);
} }
@ -33,9 +34,10 @@
} }
* { * {
--color-text-blue: hsl(210.3, 88.1%, 73.5%);
--color-text-default: hsl(0deg 0% 90%); --color-text-default: hsl(0deg 0% 90%);
--color-background-popup: hsl(0deg 0% 20%); --color-background-popup: hsl(0deg 0% 20%);
--color-background-default: hsl(0deg 0% 30%); --color-background-default: hsl(0deg 0% 25%);
--color-border-default: hsl(0deg 0% 33%); --color-border-default: hsl(0deg 0% 33%);
} }
} }

View File

@ -8,6 +8,19 @@ a img,
border: none; border: none;
} }
/* Forms */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="button"],
button,
select {
border-radius: 3px;
border: 1px solid var(--color-border-default);
padding: 4px;
}
/*table { border-collapse: collapse; border-spacing: 0; }*/ /*table { border-collapse: collapse; border-spacing: 0; }*/
:focus { :focus {

View File

@ -1,32 +1,32 @@
/* /*
Copyright (C) Philippe Meyer 2019-2021 Copyright (C) Philippe Meyer 2019-2021
Distributed under the MIT License Distributed under the MIT License
vanillaSelectBox : v1.05 : setValue() bug correction on single mode. You could not set the value vanillaSelectBox : v1.05 : setValue() bug correction on single mode. You could not set the value
vanillaSelectBox : v1.04 : select all issue fixed by https://github.com/arthur911016 vanillaSelectBox : v1.04 : select all issue fixed by https://github.com/arthur911016
vanillaSelectBox : v1.03 : getResult() an new fonction to get the selected values in an array vanillaSelectBox : v1.03 : getResult() an new fonction to get the selected values in an array
vanillaSelectBox : v1.02 : Adding 2 new options "itemsSeparator" to change the default "," item separator showing in the button and translations.item to show the item in singular if there is only one. vanillaSelectBox : v1.02 : Adding 2 new options "itemsSeparator" to change the default "," item separator showing in the button and translations.item to show the item in singular if there is only one.
vanillaSelectBox : v1.01 : Removing useless code line 550,551 issue 71 by chchch vanillaSelectBox : v1.01 : Removing useless code line 550,551 issue 71 by chchch
vanillaSelectBox : v1.00 : Adding a package.json file vanillaSelectBox : v1.00 : Adding a package.json file
vanillaSelectBox : v0.78 : Stop using inline styles in the main button. You can steal use keepInlineStyles:true to use the legacy behaviour vanillaSelectBox : v0.78 : Stop using inline styles in the main button. You can steal use keepInlineStyles:true to use the legacy behaviour
vanillaSelectBox : v0.77 : Work on place holder with bastoune help => still seems to lose placeholder value on multiple dropdown checkall vanillaSelectBox : v0.77 : Work on place holder with bastoune help => still seems to lose placeholder value on multiple dropdown checkall
vanillaSelectBox : v0.76 : New changeTree function : to rebuild the original tree with new data + correcting empty() function vanillaSelectBox : v0.76 : New changeTree function : to rebuild the original tree with new data + correcting empty() function
vanillaSelectBox : v0.75 : Remote search ready + local search modification : when a check on optgroup checks children only vanillaSelectBox : v0.75 : Remote search ready + local search modification : when a check on optgroup checks children only
if they not excluded from search. if they not excluded from search.
vanillaSelectBox : v0.72 : Remote search (WIP) bugfix [x] Select all duplicated vanillaSelectBox : v0.72 : Remote search (WIP) bugfix [x] Select all duplicated
vanillaSelectBox : v0.71 : Remote search (WIP) better code vanillaSelectBox : v0.71 : Remote search (WIP) better code
vanillaSelectBox : v0.70 : Remote search (WIP) for users to test vanillaSelectBox : v0.70 : Remote search (WIP) for users to test
vanillaSelectBox : v0.65 : Two levels: bug fix : groups are checked/unchecked when check all/uncheck all is clicked vanillaSelectBox : v0.65 : Two levels: bug fix : groups are checked/unchecked when check all/uncheck all is clicked
vanillaSelectBox : v0.64 : Two levels: groups are now checkable to check/uncheck the children options vanillaSelectBox : v0.64 : Two levels: groups are now checkable to check/uncheck the children options
vanillaSelectBox : v0.63 : Two levels: one click on the group selects / unselects children vanillaSelectBox : v0.63 : Two levels: one click on the group selects / unselects children
vanillaSelectBox : v0.62 : New option: maxOptionWidth set a maximum width for each option for narrow menus vanillaSelectBox : v0.62 : New option: maxOptionWidth set a maximum width for each option for narrow menus
vanillaSelectBox : v0.61 : New option: maxSelect, set a maximum to the selectable options in a multiple choice menu vanillaSelectBox : v0.61 : New option: maxSelect, set a maximum to the selectable options in a multiple choice menu
vanillaSelectBox : v0.60 : Two levels: Optgroups are now used to show two level dropdowns vanillaSelectBox : v0.60 : Two levels: Optgroups are now used to show two level dropdowns
vanillaSelectBox : v0.59 : Bug fix : search box was overlapping first item in single selects vanillaSelectBox : v0.59 : Bug fix : search box was overlapping first item in single selects
vanillaSelectBox : v0.58 : Bug fixes vanillaSelectBox : v0.58 : Bug fixes
vanillaSelectBox : v0.57 : Bug fix (minWidth option not honored) vanillaSelectBox : v0.57 : Bug fix (minWidth option not honored)
vanillaSelectBox : v0.56 : The multiselect checkboxes are a little smaller, maxWidth option is now working + added minWidth option as well vanillaSelectBox : v0.56 : The multiselect checkboxes are a little smaller, maxWidth option is now working + added minWidth option as well
The button has now a style attribute to protect its appearance The button has now a style attribute to protect its appearance
vanillaSelectBox : v0.55 : All attributes from the original select options are copied to the selectBox element vanillaSelectBox : v0.55 : All attributes from the original select options are copied to the selectBox element
vanillaSelectBox : v0.54 : if all the options of the select are selected by the user then the check all checkbox is checked vanillaSelectBox : v0.54 : if all the options of the select are selected by the user then the check all checkbox is checked
vanillaSelectBox : v0.53 : if all the options of the select are selected then the check all checkbox is checked vanillaSelectBox : v0.53 : if all the options of the select are selected then the check all checkbox is checked
@ -149,7 +149,7 @@ function vanillaSelectBox(domSelector, options) {
if (options.remote.onInit!= undefined && typeof options.remote.onInit === 'function') { if (options.remote.onInit!= undefined && typeof options.remote.onInit === 'function') {
this.onInit = options.remote.onInit; this.onInit = options.remote.onInit;
this.isInitRemote = true; this.isInitRemote = true;
} }
if (options.remote.onInitSize != undefined) { if (options.remote.onInitSize != undefined) {
this.onInitSize = options.remote.onInitSize; this.onInitSize = options.remote.onInitSize;
if (this.onInitSize < 3) this.onInitSize = 3; if (this.onInitSize < 3) this.onInitSize = 3;
@ -186,7 +186,7 @@ function vanillaSelectBox(domSelector, options) {
if(options.keepInlineCaretStyles != undefined ) { if(options.keepInlineCaretStyles != undefined ) {
this.keepInlineCaretStyles = options.keepInlineCaretStyles; this.keepInlineCaretStyles = options.keepInlineCaretStyles;
} }
} }
this.closeOrder = function () { this.closeOrder = function () {
@ -208,16 +208,9 @@ function vanillaSelectBox(domSelector, options) {
if (selector === ".vsb-main button") { if (selector === ".vsb-main button") {
cssArray = [ cssArray = [
{ "key": "min-width", "value": "120px" }, { "key": "min-width", "value": "120px" },
{ "key": "border-radius", "value": "0" },
{ "key": "width", "value": "100%" }, { "key": "width", "value": "100%" },
{ "key": "text-align", "value": "left" }, { "key": "text-align", "value": "left" },
{ "key": "z-index", "value": "1" }, { "key": "z-index", "value": "1" }
{ "key": "color", "value": "#333" },
{ "key": "background", "value": "white !important" },
{ "key": "border", "value": "1px solid #999 !important" },
{ "key": "line-height", "value": "20px" },
{ "key": "font-size", "value": "14px" },
{ "key": "padding", "value": "6px 12px" }
] ]
} }
@ -299,7 +292,7 @@ function vanillaSelectBox(domSelector, options) {
if(this.keepInlineCaretStyles) { if(this.keepInlineCaretStyles) {
caret.style.position = "absolute"; caret.style.position = "absolute";
caret.style.right = "8px"; caret.style.right = "8px";
caret.style.marginTop = "8px"; caret.style.marginTop = "6px";
} }
if (self.userOptions.stayOpen) { if (self.userOptions.stayOpen) {
@ -568,7 +561,7 @@ function vanillaSelectBox(domSelector, options) {
} }
} }
} }
}); });
} }
if (self.userOptions.stayOpen) { if (self.userOptions.stayOpen) {
@ -733,13 +726,13 @@ vanillaSelectBox.prototype.buildSelect = function (data) {
if(!self.isOptgroups){ if(!self.isOptgroups){
self.isOptgroups = data[0].parent != undefined && data[0].parent != ""; self.isOptgroups = data[0].parent != undefined && data[0].parent != "";
} }
if(self.isOptgroups){ if(self.isOptgroups){
let groups = {}; let groups = {};
data = data.filter(function(x){ data = data.filter(function(x){
return x.parent != undefined && x.parent != ""; return x.parent != undefined && x.parent != "";
}); });
data.forEach(function (x) { data.forEach(function (x) {
if(!groups[x.parent]){ if(!groups[x.parent]){
groups[x.parent] = true; groups[x.parent] = true;
@ -748,7 +741,7 @@ vanillaSelectBox.prototype.buildSelect = function (data) {
for (let group in groups) { for (let group in groups) {
let anOptgroup = document.createElement("optgroup"); let anOptgroup = document.createElement("optgroup");
anOptgroup.setAttribute("label", group); anOptgroup.setAttribute("label", group);
options = data.filter(function(x){ options = data.filter(function(x){
return x.parent == group; return x.parent == group;
}); });
@ -863,7 +856,7 @@ vanillaSelectBox.prototype.remoteSearchIntegrateIt = function (data) {
if (data == null || data.length == 0) return; if (data == null || data.length == 0) return;
while(self.root.firstChild) while(self.root.firstChild)
self.root.removeChild(self.root.firstChild); self.root.removeChild(self.root.firstChild);
self.buildSelect(data); self.buildSelect(data);
self.reloadTree(); self.reloadTree();
} }
@ -1266,7 +1259,7 @@ vanillaSelectBox.prototype.setValue = function (values) {
Array.prototype.slice.call(listElements).forEach(function (x) { Array.prototype.slice.call(listElements).forEach(function (x) {
if (x.value !== 'all') { if (x.value !== 'all') {
nrAll++; nrAll++;
} }
if (foundValues.indexOf(x.getAttribute("data-value")) != -1) { if (foundValues.indexOf(x.getAttribute("data-value")) != -1) {
x.classList.add("active"); x.classList.add("active");
nrActives++; nrActives++;

View File

@ -9,13 +9,12 @@
#logFilterBar>label { #logFilterBar>label {
font-weight: bold; font-weight: bold;
margin-right: 10px; margin-right: .3em;
} }
#logFilterBar>button { #logFilterBar>button {
display: inline-block; display: inline-block;
height: 24px; padding: 4px 15px;
padding: 0 .5em;
margin-left: .3em; margin-left: .3em;
font-weight: bold; font-weight: bold;
} }
@ -40,9 +39,11 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left; background-position: left;
background-size: 1.5em; background-size: 1.5em;
padding: 1px 5px 1px 2em; padding: 4px 5px 4px 2em;
margin-left: 20px; margin-left: .3em;
width: 200px; width: 200px;
border: 1px solid var(--color-border-default);
border-radius: 3px;
} }
#logFilterSummary { #logFilterSummary {
@ -56,24 +57,24 @@
} }
.logNormal { .logNormal {
color: #80766e; color: var(--color-text-default);
} }
.logInfo { .logInfo {
color: #1781b5; color: var(--color-text-blue);
} }
.logWarning { .logWarning {
color: #f97d1c; color: var(--color-text-orange);
} }
.logCritical, .logCritical,
.peerBlocked { .peerBlocked {
color: #ee3f4d; color: var(--color-text-red);
} }
.vsb-main>button { .vsb-main>button {
padding: 0 12px !important; padding: 4px 12px !important;
} }
.contextMenu>li>a>img { .contextMenu>li>a>img {

View File

@ -7,7 +7,7 @@
background-position: left; background-position: left;
border: 1px solid var(--color-border-default); border: 1px solid var(--color-border-default);
border-radius: 3px; border-radius: 3px;
padding: 2px 2px 2px 25px; padding: 4px 2px 4px 25px;
} }
#categorySelect { #categorySelect {

View File

@ -8,6 +8,18 @@ body {
text-align: left; text-align: left;
} }
input[type="text"],
input[type="number"],
input[type="password"],
input[type="button"],
input[type="submit"],
button,
select {
border-radius: 3px;
border: 1px solid var(--color-border-default);
padding: 4px;
}
.col { .col {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;

View File

@ -3,6 +3,7 @@
/* Default rules */ /* Default rules */
* { * {
--color-text-red: hsl(0deg 100% 65%); --color-text-red: hsl(0deg 100% 65%);
--color-border-default: hsl(0deg 0% 85%);
} }
:root { :root {