Skip to content

Firefly III: a personal finances manager

feat: Expand logo in startup scripts

James Cole78aa8bd8384e
diff --git a/app/Console/Commands/System/UpgradeFireflyInstructions.php b/app/Console/Commands/System/UpgradeFireflyInstructions.php
index 1e0330b0dc..13a8f3970c 100644
--- a/app/Console/Commands/System/UpgradeFireflyInstructions.php
+++ b/app/Console/Commands/System/UpgradeFireflyInstructions.php
@@ -107,6 +107,9 @@ class UpgradeFireflyInstructions extends Command
$text = $config[$compare];
}
}
+ $this->newLine();
+ $this->showLogo();
+ $this->newLine();
$this->showLine();
$this->boxed('');
if (null === $text || '' === $text) {
@@ -136,6 +139,43 @@ class UpgradeFireflyInstructions extends Command
$this->line($line);
}
+ /**
+ * The logo takes up 8 lines of code. So 8 colors can be used.
+ * @return void
+ */
+ private function showLogo(): void
+ {
+ $today = date('m-d');
+ $month = date('m');
+ // variation in colors and effects just because I can!
+ // default is Ukraine flag:
+ $colors = ['blue', 'blue', 'blue', 'yellow', 'yellow', 'yellow', 'default', 'default'];
+
+ // 5th of May is Dutch liberation day and 29th of April is Dutch King's Day and September 17 is my birthday.
+ if ('05-01' === $today || '04-29' === $today || '09-17' === $today) {
+ $colors = ['red', 'red', 'red', 'white', 'white', 'blue', 'blue', 'blue'];
+ }
+
+ // National Coming Out Day, International Day Against Homophobia, Biphobia and Transphobia and Pride Month
+ if ('10-11' === $today || '05-17' === $today || '06' === $month) {
+ $colors = ['red', 'bright-red', 'yellow', 'green', 'blue', 'magenta', 'default', 'default'];
+ }
+
+ // International Transgender Day of Visibility
+ if ('03-31' === $today) {
+ $colors = ['bright-blue', 'bright-red', 'white', 'white', 'bright-red', 'bright-blue', 'default', 'default'];
+ }
+
+ $this->line(sprintf('<fg=%s> ______ _ __ _ _____ _____ _____ </>', $colors[0]));
+ $this->line(sprintf('<fg=%s> | ____(_) / _| | |_ _|_ _|_ _| </>', $colors[1]));
+ $this->line(sprintf('<fg=%s> | |__ _ _ __ ___| |_| |_ _ | | | | | | </>', $colors[2]));
+ $this->line(sprintf('<fg=%s> | __| | | \'__/ _ \ _| | | | | | | | | | | </>', $colors[3]));
+ $this->line(sprintf('<fg=%s> | | | | | | __/ | | | |_| | _| |_ _| |_ _| |_ </>', $colors[4]));
+ $this->line(sprintf('<fg=%s> |_| |_|_| \___|_| |_|\__, | |_____|_____|_____| </>', $colors[5]));
+ $this->line(sprintf('<fg=%s> __/ | </>', $colors[6]));
+ $this->line(sprintf('<fg=%s> |___/ </>', $colors[7]));
+ }
+
/**
* Render upgrade instructions.
*/
@@ -152,7 +192,11 @@ class UpgradeFireflyInstructions extends Command
}
}
+ $this->newLine();
+ $this->showLogo();
+ $this->newLine();
$this->showLine();
+
$this->boxed('');
if (null === $text || '' === $text) {
$this->boxed(sprintf('Thank you for updating to Firefly III, v%s', $version));