mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Added support for custom theme creation and selection. Fixes #4348.
2) Added Dark(Beta) UI Theme option. Fixes #3741. 3) Fix an issue where a black arrow-kind image is displaying at the background of browser tree images. Fixes #4171 Changes include: 1) New theme option in preferences - Miscellaneous -> Themes. You can select the theme from the dropdown. It also has a preview of the theme just below the dropdown. Note that, a page refresh is needed to apply changes. On saving, a dialog appears to ask for refresh. 2) You can create your own theme and submit to hackers. README is updated to help you create a theme. Theme will be available only after the bundle. 3) Correction of SASS variables at few places and few other CSS corrections. 4) Added iconfont-webpack-plugin, which will convert all the SVG files(monochrome) used as icons for buttons to font icons. This will allow us to change the color of the icon by using CSS color property. 5) All the .css files will bundle into a separate file now- pgadmin.style.css. This will help reduce the size of theme CSS files as CSS in .css files will not change with the change of SASS variables.
This commit is contained in:
committed by
Akshay Joshi
parent
62d55cabd9
commit
8180403f97
@@ -14,6 +14,7 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
@@ -486,6 +487,26 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
THEMES = {
|
||||
"standard": {
|
||||
"disp_name": "Standard",
|
||||
"cssfile": "pgadmin",
|
||||
"preview_img": "standard_preview.png"
|
||||
}
|
||||
}
|
||||
|
||||
OTHER_THEMES = {}
|
||||
try:
|
||||
extra_themes = json.load(open('pgadmin.themes.json'))
|
||||
OTHER_THEMES.update(extra_themes)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Set OTHER_THEMES to None here to disable all other themes
|
||||
|
||||
if OTHER_THEMES is not None:
|
||||
THEMES.update(OTHER_THEMES)
|
||||
|
||||
# SUPPORT_SSH_TUNNEL can be override in local config file and if that
|
||||
# setting is False in local config then we should not check the Python version.
|
||||
if (SUPPORT_SSH_TUNNEL is True and
|
||||
|
||||
Reference in New Issue
Block a user