Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.98k stars 536 forks source link

network interfaces view hides copy button #4275

Closed si458 closed 6 months ago

si458 commented 2 years ago

Describe the bug when you click the interfaces option it shows the network interfaces and all its IP addresses but when you scroll or hover over the copy buttons, the stupid scroll bar is blocking access to them

To Reproduce

  1. click interfaces
  2. hover over a copy icon

Expected behavior able to click the copy button, without the scrollbar intefering

Screenshots Screenshot 2022-07-15 100333 Screenshot 2022-07-15 100359

Server Software (please complete the following information):

Remote Device (please complete the following information):

Additional context i could copy the information from the details tab instead but the is no copy icons on the details tab

Your config.json file N/A

Ylianst commented 2 years ago

Interesting, I don't see this on my browsers with my OS... Edge:

image

FireFox:

image

Chrome:

image

This must be an OS thing with the type of Scroll bar used.

si458 commented 2 years ago

@Ylianst yeh just tried it here and its fine with Edge and Chrome, but not Firefox (my primary browser)

PetieM commented 2 years ago

I'm seeing this in all browsers on my Mac. It's related to scroll bar rendering - I have it set to show them only when scrolling which overlays them on the content when you scroll as in si458's screenshots (though for me at least, the buttons become clickable if you just wait for the scroll bar to fade first). If I set it to always show scroll bars, they behave as shown in Ylianst's screenshots.

Ylianst commented 2 years ago

Ok, I am seeing this issue on FireFox with Windows 11.

scroll

Let me see what I can do.

Ylianst commented 2 years ago

Not sure what I can do about this. If I change the Windows 11 setting to "Always Show Scrollbars", it works ok in FireFox, but I am not sure I have a way in HTML to override this when scroll bars are not shown. I could make an alternative way to copy the value, like a right click context menu?

PetieM commented 2 years ago

That sounds consistent with the behavior I was seeing. Just letting the scroll bar fade away seems to work fine on my end but if you wanted to fix it from the server side, the only way I can think of that would work would be to add right padding equal to the width of the scroll bar which would, in theory, push the buttons out of the path of the bar (at the cost of looking a little odd). Personally, I think it’s fine as is but figured I’d throw in a possible solution for once!

Ylianst commented 2 years ago

Another alternative is to put the "copy" icon left of the text instead of right, but it would not look as nice. I will hold off until @si458 gives some opinion of this.

si458 commented 2 years ago

I just realised that In theory is the tab actually needed anymore?

All this information that is listed is actually listed in the Details tab (with the exception of the last ip change)

Screenshot_20220719-082857_Firefox.jpg

If you just add the last ip change into the Details tab and then add some copy buttons to the Details tab

You can remove the network interfaces option!?

NiceGuyIT commented 2 years ago

You could create a UserStyle and add the padding using an extension like Stylus. The red color is to see the padding.

/* ==UserStyle==
@name           MeshCentral
@namespace      https://github.com/Ylianst/MeshCentral
@version        1.0.0
@description    MeshCentral UI changes
@author         You
==/UserStyle== */

@-moz-document domain("mesh.example.com") {
    #d2netinfo .dialogText {
        padding-right: 1.0em;
        background-color: red;
    }
}