ukdtom / WebTools.bundle

WebTools is a collection of tools for Plex Media Server. Like the Unsupported AppStore (UAS)
https://forums.plex.tv/discussion/288191
Mozilla Public License 2.0
1.3k stars 170 forks source link

Logon Screen #399

Closed ukdtom closed 6 years ago

ukdtom commented 7 years ago

Doesn't use the selected theme, that can be found in endpoint /version

Minor, and cosmetic though, and feel free to bump to 3.1

ukdtom commented 6 years ago

And actually not you, but @trumpy81 here it seems ;)

ukdtom commented 6 years ago

And disregard....

I'm a mess when it comes to frontend :(

So now assigned to both, so do fight it out in a corner ;)

trumpy81 commented 6 years ago

The login screen is hard coded to use the whiteblue.css theme file. That should not be too difficult to change so that it uses the saved theme .css file.

Might be tricky to add it to the factory reset script though?

ukdtom commented 6 years ago

@trumpy81 Why would I do that? The trick of the factory reset, is to reset to factory std. Or have I lost it here?

trumpy81 commented 6 years ago

You've lost it ... but we all knew that already ... lol 👅

What I meant was, it might be tricky telling the reset script to replace the custom theme style sheet with the default style sheet (whiteblue.css) in a way that let's it be replaced by the saved custom style sheet later on.

I haven't looked at the coding for that, so I am not sure exactly how the reset and saving of custom style sheets is being handled.

ukdtom commented 6 years ago

LOL, and nope....

What I do when doing a Factory Reset, is what you see in the "Manual" option of this: https://github.com/ukdtom/WebTools.bundle/wiki/Reset

What above does, is 100% resets everything to the default

trumpy81 commented 6 years ago

Yeah I figured that much, but the default in this case is to have the whiteblue.css hard coded as the login page style sheet.

If you change that code to use the saved custom style sheet, that might effect the way that the reset script works?

ukdtom commented 6 years ago

Nope, cuz when starting up for the first time, the default is: WhiteBlue.css https://github.com/ukdtom/WebTools.bundle/blob/tommy-work3-pmsV3-partial/Contents/Code/consts.py#L399

trumpy81 commented 6 years ago

Yes, but that would stop any custom style sheet from being applied to the login page. I trust that is not what you want.

You want to be able to use a custom style sheet on the login page after the user has selected it, but if the whiteblue.css file is hard coded, you cannot replace it.

So, the code would need to be changed to allow a custom style sheet to be used in place of whiteblue.css. In other words, the hard coding for whiteblue.css would need to be changed.

After that, a hard reset would end up using the last saved custom style sheet and not the default whiteblue.css or the whiteblue.css would be hard coded again and you could not use a saved custom style sheet for the login page.

ukdtom commented 6 years ago

You are wrong here.... The link I provided, is for pure backend, and is executed during startup. What it does, is detecting if a default theme has been set, and if not, we use ours.

Front-end can get to this via the only link, that is allowed without auth towards the framework, and that is: http://<IPOfPMS>:33400/version

trumpy81 commented 6 years ago

So why is the whiteblue.css file used for the login page instead of the saved custom style sheet?

ukdtom commented 6 years ago

Because of a bug in the front-end ;)

trumpy81 commented 6 years ago

Ah ... now it makes sense, I was thinking it was coded that way ... lol

ukdtom commented 6 years ago

And was actually lying here :(

The following can be reached without auth:

creoludifico commented 6 years ago

Lets go :-) r4t

ukdtom commented 6 years ago

Perfect