diff --git a/stellarisdashboard/config.py b/stellarisdashboard/config.py index 2066d8f..f9b4b51 100644 --- a/stellarisdashboard/config.py +++ b/stellarisdashboard/config.py @@ -466,6 +466,26 @@ def localization_files(self): f"Loaded {len(files)} localization files from {self.game_data_dirs}" ) return files + + + @property + def save_file_path_is_valid(self): + return self.save_file_path is not None\ + and self.save_file_path.is_dir()\ + and next(self.save_file_path.glob("*/*.sav"), None) is not None + + @property + def stellaris_install_path_is_valid(self): + return self.stellaris_install_path is not None\ + and self.stellaris_install_path.is_dir()\ + and (self.stellaris_install_path / "localisation").is_dir()\ + and (self.stellaris_install_path / "flags/colors.txt").is_file() + + @property + def stellaris_user_data_path_is_valid(self): + return self.stellaris_user_data_path is not None\ + and self.stellaris_user_data_path.is_dir()\ + and (self.stellaris_user_data_path / "dlc_load.json").is_file() def _get_mod_data_dir(mod_descriptor_path: pathlib.Path): diff --git a/stellarisdashboard/dashboard_app/assets/style.css b/stellarisdashboard/dashboard_app/assets/style.css index 1c4a33f..671039a 100644 --- a/stellarisdashboard/dashboard_app/assets/style.css +++ b/stellarisdashboard/dashboard_app/assets/style.css @@ -1,5 +1,5 @@ body { - font-family: verdana; + font-family: verdana, system-ui; background-color: rgba(33, 43, 39, 1); font-size: 16px; margin: 0; @@ -23,19 +23,19 @@ h4, h5, h6 { p, span { color: rgba(217, 217, 217, 1); - font-family: verdana; + font-family: verdana, system-ui; font-size: 16px; } a { color: rgba(195, 133, 33, 1); - font-family: verdana; + font-family: verdana, system-ui; font-size: 20px; } input { color: rgba(0, 0, 0, 1); - font-family: verdana; + font-family: verdana, system-ui; font-size: 20px; } @@ -46,7 +46,7 @@ a.button, input.button, button.button { cursor: pointer; color: rgba(195, 133, 33, 1); - font-family: verdana; + font-family: verdana, system-ui; font-size: 16px; background-color: rgba(43, 59, 52, 1); @@ -214,3 +214,39 @@ a.textlink { a.titlelink { color: rgba(195, 133, 33, 1); } + +.notifications { + li { + list-style: none; + width: 60%; + margin-inline: auto; + border: 1px solid ; + padding: 1rem; + margin-bottom: 1rem; + max-width: 50rem; + border-radius: 0.5rem; + } + + code { + background: rgba(0, 0, 0, 0.4); + padding: 0.25rem; + border-radius: 0.25rem; + } + + a { + font-size: 1rem; + } + + .warning { + border-color: rgba(195, 133, 33, 1); + background: hsl(37, 25%, 10%); + a { + color: hsl(37, 71%, 60%); + } + } + + .info { + border-color: hsl(219, 79%, 66%); + background: hsl(219, 25%, 10%); + } +} diff --git a/stellarisdashboard/dashboard_app/game_index.py b/stellarisdashboard/dashboard_app/game_index.py index b229ad9..d2de240 100644 --- a/stellarisdashboard/dashboard_app/game_index.py +++ b/stellarisdashboard/dashboard_app/game_index.py @@ -30,4 +30,7 @@ def index_page(version=None): show_old_version_notice=show_old_version_notice, version=utils.VERSION, update_version_id=version, + save_file_path_is_valid=config.CONFIG.save_file_path_is_valid, + stellaris_install_path_is_valid=config.CONFIG.stellaris_install_path_is_valid, + stellaris_user_data_path_is_valid=config.CONFIG.stellaris_user_data_path_is_valid, ) diff --git a/stellarisdashboard/dashboard_app/templates/game_index.html b/stellarisdashboard/dashboard_app/templates/game_index.html index 93121e3..5d5a4cf 100644 --- a/stellarisdashboard/dashboard_app/templates/game_index.html +++ b/stellarisdashboard/dashboard_app/templates/game_index.html @@ -1,5 +1,40 @@ {% extends "layout.html" %} {% block body %} + + + +{% if games|length %}
+{% endif %} + {% endblock %}