Skip to content

Possible fix for known bug #4

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

NoxiousKarn
Copy link

#3

By adding:

def init(self):
self.peers_detected = False

And:
def on_peer_detected(self, agent, peer):
self.peers_detected = True

def on_peer_lost(self, agent, peer):
self.peers_detected = False

Then modify def on_ui_update to use self.peers_detected as a trigger to hide and unhide the UI element. The plugin should now hide around peers keeping the two UI elements from overlaying each other.

(untested)

Using Callbacks for peer detection the plugin should hide the overlay when peers are detected, keeping the interface free of password UI element until no peers are present.
Using Callbacks for peer detection the plugin should hide the overlay when peers are detected, keeping the interface free of password UI element until no peers are present.
@NoxiousKarn NoxiousKarn changed the title Possiable fix for known bug Possible fix for known bug Sep 7, 2023
@SlitherySnekks
Copy link

Would it be possible to make this plugin overlay all others? exp, gps, etc?

@LuchoAba
Copy link

Not code related, but where did you get your pwnagotchi case.

@NoxiousKarn
Copy link
Author

NoxiousKarn commented Jan 13, 2024

Not code related, but where did you get your pwnagotchi case.
https://www.thingiverse.com/thing:4551538
@LuchoAba



def __init__(self):
self.peers_detected = False

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing indent

@aerickson
Copy link

Not working for me... it always hides the password display.

Corrected missing indent under def __init__(self):

Per @aerickson
Added missing ui.show_element('display-password') to on_peer_lost to bring back the hidden element.
@NoxiousKarn
Copy link
Author

aerickson

Sorry man forgot to add a line in def on_peer_lost

corrected now give it a try. let me know if its borked i still have not tested this myself just a concept idea i had one night

@aerickson
Copy link

@NoxiousKarn
Copy link
Author

NoxiousKarn commented Jan 16, 2024 via email

@Solilord
Copy link

Solilord commented Feb 6, 2024

the Method/function ui.hide_element doesnt exist.
i cant find it an it isnt working for me :/
Iam on 1.5.5

@aerickson
Copy link

Not sure when it was added.

If you're on a rpi zero 2, It definitely works for me on https://github.com/aluminum-ice/pwnagotchi v1.8.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants