Pwnagotchi: [BUG] webui zoom doesn't respect aspect ratio

Created on 5 Nov 2019  路  15Comments  路  Source: evilsocket/pwnagotchi

Given my noobiness in html and css, on some mobile devices the web ui is kind of crap in landscape mode, this is because the image width is just 100% and therefore its aspect ratio is taken into account instead of the display aspect ratio:

image
(notice the bottom part being not visible)

Ideally this should be fixed by something like https://stackoverflow.com/questions/42367898/css-image-full-screen-but-will-maintain-aspect-ratio

bug help wanted

All 15 comments

<div style="height: 100vh; width: 100vw;">
        <img src="http://zelda.local:8080/ui?1572971976843" id="ui" style="height:100%; max-width:100vw; object-fit: contain;">
</div>

I currently don't have a running unit with the current development version, so I can only test it with 1.1.0.

it works!!!! :D

mmm it works on mobile ... but on desktop it takes full height, the picture is centered and buttons are not visible :/

image

yep that only works for landscape :/

image

ahh damn it, sorry :(

no worries, we'll figure this out ... somehow ...

I'll give it a deeper look tonight with access to a computer

thanks a lot!

We really need to find a designer :D I just fixed the image issue and added some basic rules for the layout. Furthermore I increased the size of the buttons, they still look awkward but at least it's now possible to touch the right one ;)

Screenshot 2019-11-05 at 23 19 49

PR: https://github.com/evilsocket/pwnagotchi/pull/535
hope this is ok now :)

btw: is there any easy way to run the web-ui locally do do some styling etc?

image

馃憤

I would love to see that face on a big giant screen...

03F87099-560C-40D1-AE8C-5D9466934205

muahaha :D probably the buttons should be displayed in a flyout menu? but the aspect ratio of image and screen does not match, so this would only help a bit.
But hmm I'm again thinking of replacing the image with a html template which displays the stuff ... ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeffedstrom picture jeffedstrom  路  4Comments

dadav picture dadav  路  4Comments

Baallrog picture Baallrog  路  6Comments

mrseeker picture mrseeker  路  7Comments

myasn1k picture myasn1k  路  7Comments