From a0d2a1a078f219bc1050c83ea937fda24ae605e4 Mon Sep 17 00:00:00 2001 From: Thayol Date: Tue, 29 Dec 2020 02:06:25 +0100 Subject: [PATCH] Conditional warnings --- main.php | 4 ++++ templates/settings.html | 9 ++++++--- templates/style.css | 3 +++ templates/warn-repack.html | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/main.php b/main.php index 023d301..92cb744 100644 --- a/main.php +++ b/main.php @@ -199,6 +199,10 @@ else if ($display == "start") { $te->set_block_template("SETTINGS_BACK", "SETTINGS_BACK_SOURCE"); } + if (!$lib->is_loaded()) + { + $te->set_block_template("SETTINGS_FIRSTRUN", "SETTINGS_FIRSTRUN_SOURCE"); + } } echo $te->get_html(); \ No newline at end of file diff --git a/templates/settings.html b/templates/settings.html index a0daa8e..22af632 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -3,9 +3,12 @@

-

(Use a fully qualified real path preferably without symlinks. Relative paths are supported in theory, but try to use absolute paths.)

- {{ SETTINGS_BACK }} - +
+ {{ SETTINGS_BACK }} + +
+ {{ SETTINGS_FIRSTRUN }} +

(Use a fully qualified real path preferably without symlinks. Relative paths are supported in theory, but try to use absolute paths.)

\ No newline at end of file diff --git a/templates/style.css b/templates/style.css index e78f196..d75fc68 100644 --- a/templates/style.css +++ b/templates/style.css @@ -122,4 +122,7 @@ details.mapset summary::-webkit-details-marker { margin-top: 30px; border: 1px solid white; padding: 10px; +} +.warn .note { + font-size: 0.9em; } \ No newline at end of file diff --git a/templates/warn-repack.html b/templates/warn-repack.html index 33e0d4c..2258988 100644 --- a/templates/warn-repack.html +++ b/templates/warn-repack.html @@ -2,5 +2,5 @@

WARNING!

Repacking all beatmaps will take a LONG time. Are you sure you want to continue?

[ Yes ]    [ No ]

-

(The repacking will start after clicking the "yes" button. If you are unsure whether you clicked it, check your session/osz/ folder; there should be some .osz files already.)

+

(The repacking will start after clicking the "yes" button. If you are unsure whether you clicked it, check your session/osz/ folder; there should be some .osz files already.)

\ No newline at end of file