pbaity / rocketchat-dark-mode

An easy user-togglable dark mode for Rocket.Chat
MIT License
367 stars 125 forks source link

Dark Mode button not appearing in 3.16.0 #149

Closed tammer123 closed 3 years ago

tammer123 commented 3 years ago

Describe the bug Hello, after updating from 3.14.1 -> 3.16.0, I don't have the dark mode button appearing. I even tried to remove the custom css and script, still didn't help.

To Reproduce Steps to reproduce the behavior:

  1. Goto Administration
  2. Goto Layout
  3. Open Custom CSS
  4. Paste CSS from 'master' branch
  5. Open Custom Script
  6. Paste JS from 'master' branch

Expected behavior The toggle image to appear after a refresh and clear of browser cache.

Screenshots dark1 dark2 dark3

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Running Rocket.Chat server from tar download not in Docker.

tammer123 commented 3 years ago

Hello,

I found the issue.

After adding the custom script part of the dark mode, script.js is not generated till the end and brakes. If I remove the darkmode script, then script.js generates till the end.

Is the error on my end or something else?

ankar84 commented 3 years ago

Working good in my deployment with 3.16.3

tammer123 commented 3 years ago

image

pbaity commented 3 years ago

@tammer123 Sorry I haven't answered yet, but I haven't had this issue. I have no idea why the script is getting truncated in your instance. Try copying over the most recent dark-mode-toggle.js (the one in the screenshot above is outdated), but it looks like the code getting truncated isn't related to dark mode, so I can't help there (everything below the comment //Custom_Script_On_Logout).