Jump to content

Hide sidebar by default in 4.8


cochize1
Go to solution Solved by Happy2Play,

Recommended Posts

cochize1

Is there a way by css or if not by modifying some files to make a sidebar in server 4.8 hidden for all users (for some reason it is opened by default and you have to click 3 times to hide it until of course next time cookies are erased). Please help!

Edited by cochize1
Link to comment
Share on other sites

cochize1

@Happy2Playsorry to call you up but I always figured you'd be the first to find a solution. Do you know by any chance what file needs to be modified to start a new account with hidden sidebar (not pinned as it is now by default in v. 4.8)?

Link to comment
Share on other sites

Happy2Play

Sorry haven't really looked at it but don't see where this device/userdata is even stored.

But is has to be somewhere hidden if copying from user a to new user x does not apply.

Link to comment
Share on other sites

  • Solution
Happy2Play

All I am going to say is look at the \system\dashboard-ui\modules\common\usersettings\usersettingsbuilder.js.

As it is store on a per client cached data also.  But yes from a first time login you at the builder.

Edited by Happy2Play
Link to comment
Share on other sites

cochize1

@Happy2Playwell thank you very much. For anyone who's interested, as suggested I looked into usersettingsbuilder.js and chenged the values from 'docked' to 'closed' in these lines and it seemed to work after restart (not sure if both are necessary):

{
        return null != val ? this.set("drawerstyle", val, !1) : this.get("drawerstyle", !1) || "closed"
    }, UserSettings.prototype.settingsDrawerStyle = function(val) {
        return null != val ? this.set("settingsdrawerstyle", val, !1) : this.get("settingsdrawerstyle", !1) || "closed"
    }

I also tweaked some other values but one I can't get my head around. I would like to enable backdrops by default for users but could't get it to work but the line to do so is there and seems to be simple enough, any idea how it can be done?:

UserSettings.prototype.enableBackdrops = function(val) {
        return null != val ? this.set("enableBackdrops", val.toString(), !0) : !!(val = this.get("enableBackdrops", !0)) && "false" !== val
    }

 

  • Like 1
Link to comment
Share on other sites

Happy2Play
45 minutes ago, cochize1 said:

I also tweaked some other values but one I can't get my head around. I would like to enable backdrops by default for users but could't get it to work but the line to do so is there and seems to be simple enough, any idea how it can be done?:

Have you compared it to other options that are already enabled like say cinemamode or themesongs?

Link to comment
Share on other sites

cochize1

haven't thought of that, just played with true/false 0 and 1 variations. But as I copied the line as 'cinemamode' it worked. Deleted the cookies and my browsers history just to be sure, logged in into some of my users accounts and now all have drawer closed and backdrops enabled. That's all I ever wanted, thank you very much.

Link to comment
Share on other sites

  • 1 month later...
CarlosLima

Hi, when I open the file with Notepad++ I see a lot of code and I think I missed something in that sense.

Are these codes in the frames CSS, or do you need to change these fields within this huge code?

Thank you for that

trash4.png

Link to comment
Share on other sites

Happy2Play
12 minutes ago, CarlosLima said:

Hi, when I open the file with Notepad++ I see a lot of code and I think I missed something in that sense.

Are these codes in the frames CSS, or do you need to change these fields within this huge code?

Thank you for that

trash4.png

by default the js file is collapsed, I use the JS tool plugin in notepad++ to make it look pretty.

Then you will change the value you want as the new default and save.  As this corresponds to most of the user settings.

Now when you launch the cleared browser it will load the new default configs per that file.

Link to comment
Share on other sites

CarlosLima

Hi, thank you for your attention as always. I installed the plugin and now the file is easy to understand, however, for me it didn't work when changing the parameters even clearing the browser cache. What I don't understand is why emby doesn't default to displaying backgrounds on the homepage. Why does it take the hassle of the user to keep editing files if the most obvious thing for the default is to display and not the other way around. The emby is excellent and I've been using it for over ten years, but a few things...

  • Agree 1
Link to comment
Share on other sites

cochize1

I couldn't agree more Carlos.

Changing the files works 100%. I edited mine as described and now I have drawer closed and backdrops enabled for every user on every browser. If you did that correctly maybe try restarting the server (you probably did that already) and clearing browsing history with saved images and files that it uses or try incognito mode or browser you never use to check if it works. Finally I could sen you my file that works for me, maybe you have typo somewhere.

  • Thanks 1
Link to comment
Share on other sites

CarlosLima

Hi, @cochize1

I understand.  In fact, it didn't work for me.  I would be very happy if you could send me your edited file so I can overlay it over mine and check if it works.  I've already tested all your tips and they didn't really work.  I really appreciate your kindness, thank you very much.

Link to comment
Share on other sites

CarlosLima

Hi, can't you upload the .js file already edited for overlay?

Thank you

Link to comment
Share on other sites

CarlosLima

Hi,
Finally I managed to make it work, that is, now I read the code more carefully and realized that the change was not 0 to 1 or 1 to 0 but to change the text from docked to closed.

Now there is a doubt. I found that in my server yes, it worked displaying the backdrop on the homepage as well as the closed drawer.

My question in this regard is... When editing the file, does it retain the style for all Emby Web app users, whether past or future registrant?

Isn't it necessary to change the preferences on each user so that the backdrop and closed drawer are the default?

Oh, obviously I'm aware that with each new update of the emby server it will be necessary to re-edit the file usersettingsbuilder.js but this becomes simple because I have a multitude of other files that I need to adjust with each update.

Thank you very much for commenting.

Edited by CarlosLima
Link to comment
Share on other sites

CarlosLima

Oops, a detail. When closing the web app in the browser the background is displayed as the default, BUT, if the browser cache is cleared, the setting is not retained? That is, when you open Emby there is no background. Is that correct?

Link to comment
Share on other sites

Happy2Play
On 3/17/2024 at 9:22 AM, CarlosLima said:

Oops, a detail. When closing the web app in the browser the background is displayed as the default, BUT, if the browser cache is cleared, the setting is not retained? That is, when you open Emby there is no background. Is that correct?

No as if you change the value correctly the new default would be on.  But will guess you did the same as cochize1 and just tried to change the 0/1 but the line code needs changed by comparing to say cinema mode as mentioned above.

Link to comment
Share on other sites

CarlosLima

Hi, thank you for your continued attention.

I don't think I understood your comment. If I change the 1 to 0, is the default fixed even after clearing the browser cache?

Link to comment
Share on other sites

Happy2Play
1 minute ago, CarlosLima said:

Hi, thank you for your continued attention.

I don't think I understood your comment. If I change the 1 to 0, is the default fixed even after clearing the browser cache?

No as the code need more modification so compare to other existing code.

 

On 2/9/2024 at 10:54 AM, Happy2Play said:

Have you compared it to other options that are already enabled like say cinemamode or themesongs?

 

Link to comment
Share on other sites

CarlosLima

Hi, I didn't compare.
Do you recommend leaving them the same so that the changes are fixed?

Link to comment
Share on other sites

Happy2Play
2 minutes ago, CarlosLima said:

Hi, I didn't compare.
Do you recommend leaving them the same so that the changes are fixed?

Yes

  • Thanks 1
Link to comment
Share on other sites

CarlosLima

Oh yes, thank you very much for all your help. I will overlay your file over mine. We think the same way in this aspect and I don't understand why this isn't the default in emby.

  • Agree 1
Link to comment
Share on other sites

CarlosLima

Very happy about that.
It worked like magic, thanks for your custom file.
I cleared the browsing data and when I returned to emby the background was there and the drawer was closed.
Is it not necessary to configure it for each user because the file is sovereign or do I need to configure it for everyone? Thanks

Link to comment
Share on other sites

Happy2Play
1 hour ago, CarlosLima said:

Very happy about that.
It worked like magic, thanks for your custom file.
I cleared the browsing data and when I returned to emby the background was there and the drawer was closed.
Is it not necessary to configure it for each user because the file is sovereign or do I need to configure it for everyone? Thanks

That is the default template to build all users.

  • Thanks 1
Link to comment
Share on other sites

CarlosLima

Amazing.

I intend to try other possibilities such as poster size, screensaver, theme, etc. and store the .js file in a secure vault.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...