-
Notifications
You must be signed in to change notification settings - Fork 306
Dark scheme & Ui Improvements #917
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
base: master
Are you sure you want to change the base?
Conversation
bobicloudvision
commented
Apr 4, 2025
|
Thank you for taking the time to contribute this. At first glance, it looks good! |
|
Let me know if have some bugs that i need to fix.. |
|
i see :
|
| <td colspan="2" style="padding-top: 10px;"> | ||
| <button class="button theme-toggle" type="button" id="theme-toggle"> | ||
| <span class="theme-icon-container"></span> | ||
| <span class="theme-text">Toggle Theme</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translation key
| } | ||
| } else { | ||
| if (themeText) { | ||
| themeText.textContent = 'Dark Mode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translating
| const currentTheme = document.documentElement.getAttribute('data-theme'); | ||
| if (currentTheme === 'dark') { | ||
| if (themeText) { | ||
| themeText.textContent = 'Light Mode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translating
| darkThemeCss.disabled = true; | ||
| } | ||
| if (themeText) { | ||
| themeText.textContent = 'Dark Mode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translating
| darkThemeCss.disabled = false; | ||
| } | ||
| if (themeText) { | ||
| themeText.textContent = 'Light Mode'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translating
| <li> | ||
| <a class="btn navbar-btn theme-toggle" type="button" href="#" id="theme-toggle"> | ||
| <span class="theme-icon-container"></span> | ||
| <span class="theme-text">Toggle Theme</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translating
Adding this to header.php might suffice? header("Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src data: 'unsafe-eval'; img-src 'self' data:");and this in header.tpl - I'm not really sure why we have the meta variant and also set a header() from common.php. |
|
(functionality appears to work fine to me - it detected i have a dark theme, and behaved as expected ... I could switch between light mode and dark mode). |