Skip to content

Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.

feat: add purple theme

Miguel Ribeiro4d74c04f0e5b
diff --git a/images/siteicons/purple/category.png b/images/siteicons/purple/category.png
new file mode 100644
index 0000000..6c73a38
Binary files /dev/null and b/images/siteicons/purple/category.png differ
diff --git a/images/siteicons/purple/check.png b/images/siteicons/purple/check.png
new file mode 100644
index 0000000..487174f
Binary files /dev/null and b/images/siteicons/purple/check.png differ
diff --git a/images/siteicons/purple/clone.png b/images/siteicons/purple/clone.png
new file mode 100644
index 0000000..fcdd9ef
Binary files /dev/null and b/images/siteicons/purple/clone.png differ
diff --git a/images/siteicons/purple/delete.png b/images/siteicons/purple/delete.png
new file mode 100644
index 0000000..e2f7d6b
Binary files /dev/null and b/images/siteicons/purple/delete.png differ
diff --git a/images/siteicons/purple/edit.png b/images/siteicons/purple/edit.png
new file mode 100644
index 0000000..5ae3b79
Binary files /dev/null and b/images/siteicons/purple/edit.png differ
diff --git a/images/siteicons/purple/notes.png b/images/siteicons/purple/notes.png
new file mode 100644
index 0000000..bf2f5fd
Binary files /dev/null and b/images/siteicons/purple/notes.png differ
diff --git a/images/siteicons/purple/payment.png b/images/siteicons/purple/payment.png
new file mode 100644
index 0000000..10edded
Binary files /dev/null and b/images/siteicons/purple/payment.png differ
diff --git a/images/siteicons/purple/save.png b/images/siteicons/purple/save.png
new file mode 100644
index 0000000..1e70248
Binary files /dev/null and b/images/siteicons/purple/save.png differ
diff --git a/images/siteicons/purple/subscription.png b/images/siteicons/purple/subscription.png
new file mode 100644
index 0000000..6bdc6e7
Binary files /dev/null and b/images/siteicons/purple/subscription.png differ
diff --git a/images/siteicons/purple/wallos.png b/images/siteicons/purple/wallos.png
new file mode 100644
index 0000000..4798eae
Binary files /dev/null and b/images/siteicons/purple/wallos.png differ
diff --git a/images/siteicons/purple/walloswhite.png b/images/siteicons/purple/walloswhite.png
new file mode 100644
index 0000000..42b9466
Binary files /dev/null and b/images/siteicons/purple/walloswhite.png differ
diff --git a/images/siteicons/purple/web.png b/images/siteicons/purple/web.png
new file mode 100644
index 0000000..961544d
Binary files /dev/null and b/images/siteicons/purple/web.png differ
diff --git a/images/siteicons/purple/websearch.png b/images/siteicons/purple/websearch.png
new file mode 100644
index 0000000..2d62fb8
Binary files /dev/null and b/images/siteicons/purple/websearch.png differ
diff --git a/includes/header.php b/includes/header.php
index 9dc6d15..15a3337 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -52,6 +52,7 @@
<link rel="stylesheet" href="styles/themes/red.css?<?= $version ?>" id="red-theme" <?= $colorTheme != "red" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/green.css?<?= $version ?>" id="green-theme" <?= $colorTheme != "green" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/yellow.css?<?= $version ?>" id="yellow-theme" <?= $colorTheme != "yellow" ? "disabled" : "" ?>>
+ <link rel="stylesheet" href="styles/themes/purple.css?<?= $version ?>" id="purple-theme" <?= $colorTheme != "purple" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/barlow.css">
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/brands.css">
diff --git a/includes/version.php b/includes/version.php
index 17cbc8e..d560e18 100644
--- a/includes/version.php
+++ b/includes/version.php
@@ -1,3 +1,3 @@
<?php
-$version = "v2.9.0";
+$version = "v2.10.0";
?>
\ No newline at end of file
diff --git a/login.php b/login.php
index e20898d..079827c 100644
--- a/login.php
+++ b/login.php
@@ -192,6 +192,7 @@ if ($adminRow['smtp_address'] != "" && $adminRow['server_url'] != "") {
<link rel="stylesheet" href="styles/themes/red.css?<?= $version ?>" id="red-theme" <?= $colorTheme != "red" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/green.css?<?= $version ?>" id="green-theme" <?= $colorTheme != "green" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/yellow.css?<?= $version ?>" id="yellow-theme" <?= $colorTheme != "yellow" ? "disabled" : "" ?>>
+ <link rel="stylesheet" href="styles/themes/purple.css?<?= $version ?>" id="purple-theme" <?= $colorTheme != "purple" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/barlow.css">
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
diff --git a/passwordreset.php b/passwordreset.php
index 2d78bcf..02c7418 100644
--- a/passwordreset.php
+++ b/passwordreset.php
@@ -118,6 +118,7 @@ if (isset($_POST['password']) && $_POST['password'] != "" && isset($_POST['confi
<link rel="stylesheet" href="styles/themes/red.css?<?= $version ?>" id="red-theme" <?= $colorTheme != "red" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/green.css?<?= $version ?>" id="green-theme" <?= $colorTheme != "green" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/yellow.css?<?= $version ?>" id="yellow-theme" <?= $colorTheme != "yellow" ? "disabled" : "" ?>>
+ <link rel="stylesheet" href="styles/themes/purple.css?<?= $version ?>" id="purple-theme" <?= $colorTheme != "purple" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/barlow.css">
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
diff --git a/registration.php b/registration.php
index 7c88c58..efaa954 100644
--- a/registration.php
+++ b/registration.php
@@ -312,6 +312,7 @@ if (isset($_POST['username'])) {
<link rel="stylesheet" href="styles/themes/red.css?<?= $version ?>" id="red-theme" <?= $colorTheme != "red" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/green.css?<?= $version ?>" id="green-theme" <?= $colorTheme != "green" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/yellow.css?<?= $version ?>" id="yellow-theme" <?= $colorTheme != "yellow" ? "disabled" : "" ?>>
+ <link rel="stylesheet" href="styles/themes/purple.css?<?= $version ?>" id="purple-theme" <?= $colorTheme != "purple" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/barlow.css">
diff --git a/scripts/calendar.js b/scripts/calendar.js
index 44b5d61..391d9aa 100644
--- a/scripts/calendar.js
+++ b/scripts/calendar.js
@@ -89,7 +89,7 @@ function exportCalendar(subscriptionId) {
const a = document.createElement('a');
a.href = url;
// Use the subscription name for the file name, replacing any characters that are invalid in file names
- a.download = `${data.name.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.ics`;
+ a.download = `${data.name.replace(/[\/\\:*?"<>|]/g, '_').toLowerCase()}.ics`;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
diff --git a/scripts/settings.js b/scripts/settings.js
index 63d9d2b..426abd1 100644
--- a/scripts/settings.js
+++ b/scripts/settings.js
@@ -1049,7 +1049,7 @@ var sortable = Sortable.create(el, {
function setTheme(themeColor) {
var currentTheme = 'blue';
- var themeIds = ['red-theme', 'green-theme', 'yellow-theme'];
+ var themeIds = ['red-theme', 'green-theme', 'yellow-theme', 'purple-theme'];
themeIds.forEach(function(id) {
var themeStylesheet = document.getElementById(id);
diff --git a/service-worker.js b/service-worker.js
index 7554a22..229119d 100644
--- a/service-worker.js
+++ b/service-worker.js
@@ -21,6 +21,7 @@ self.addEventListener('install', function(event) {
'styles/themes/red.css',
'styles/themes/green.css',
'styles/themes/yellow.css',
+ 'styles/themes/purple.css',
'webfonts/fa-solid-900.woff2',
'webfonts/fa-solid-900.ttf',
'webfonts/fa-brands-400.woff2',
@@ -66,6 +67,8 @@ self.addEventListener('install', function(event) {
'images/siteicons/red/walloswhite.png',
'images/siteicons/yellow/wallos.png',
'images/siteicons/yellow/walloswhite.png',
+ 'images/siteicons/purple/wallos.png',
+ 'images/siteicons/purple/walloswhite.png',
'images/siteimages/empty.png',
'images/avatars/1.svg',
'images/avatars/2.svg',
@@ -116,6 +119,16 @@ self.addEventListener('install', function(event) {
'images/siteicons/yellow/subscription.png',
'images/siteicons/yellow/web.png',
'images/siteicons/yellow/websearch.png',
+ 'images/siteicons/purple/category.png',
+ 'images/siteicons/purple/check.png',
+ 'images/siteicons/purple/delete.png',
+ 'images/siteicons/purple/edit.png',
+ 'images/siteicons/purple/notes.png',
+ 'images/siteicons/purple/payment.png',
+ 'images/siteicons/purple/save.png',
+ 'images/siteicons/purple/subscription.png',
+ 'images/siteicons/purple/web.png',
+ 'images/siteicons/purple/websearch.png',
'images/siteicons/pwa/stats.png',
'images/siteicons/pwa/settings.png',
'images/siteicons/pwa/about.png',
diff --git a/settings.php b/settings.php
index 1a1bd9d..126717c 100644
--- a/settings.php
+++ b/settings.php
@@ -1067,7 +1067,7 @@ require_once 'includes/header.php';
</header>
<div class="account-settings-theme">
<div>
- <div class="theme-selector">
+ <form class="theme-selector">
<div class="theme">
<label for="theme-blue"
class="theme-preview blue <?= $settings['color_theme'] == 'blue' ? 'is-selected' : '' ?>">
@@ -1108,7 +1108,17 @@ require_once 'includes/header.php';
<span class="hover-color"></span>
</label>
</div>
- </div>
+ <div class="theme">
+ <label for="theme-purple"
+ class="theme-preview purple <?= $settings['color_theme'] == 'purple' ? 'is-selected' : '' ?>">
+ <input type="radio" name="theme" id="theme-purple" value="purple"
+ onClick="setTheme('purple')" <?= $settings['color_theme'] == 'purple' ? 'checked' : '' ?>>
+ <span class="main-color"></span>
+ <span class="accent-color"></span>
+ <span class="hover-color"></span>
+ </label>
+ </div>
+ </form>
</div>
<div>
<h2><?= translate('custom_colors', $i18n) ?></h2>
diff --git a/styles/styles.css b/styles/styles.css
index a8696e2..fc6b7cf 100644
--- a/styles/styles.css
+++ b/styles/styles.css
@@ -1899,6 +1899,18 @@ textarea.thin {
background-color: #cd930c;
}
+.theme-preview.purple > .main-color {
+ background-color: #6d4aff;
+}
+
+.theme-preview.purple > .accent-color {
+ background-color: #b086ff;
+}
+
+.theme-preview.purple > .hover-color {
+ background-color: #5e42cd;
+}
+
.color-picker-wrapper {
display: flex;
flex-direction: row;
diff --git a/styles/themes/purple.css b/styles/themes/purple.css
new file mode 100644
index 0000000..b702031
--- /dev/null
+++ b/styles/themes/purple.css
@@ -0,0 +1,21 @@
+:root {
+ --main-color: #6d4aff;
+ --main-color-rgb: 109, 74, 255;
+ --accent-color: #b086ff;
+ --accent-color-rgb: 176, 134, 255;
+ --hover-color: #5e42cd;
+ --hover-color-rgb: 50, 48, 108;
+}
+
+header .logo .logo-image {
+ background-image: url("../../images/siteicons/purple/wallos.png");
+}
+
+.dark header .logo .logo-image {
+ background-image: url("../../images/siteicons/purple/walloswhite.png");
+}
+
+.sort-options > ul > li.selected,
+.filtermenu-content .filter-item.selected {
+ background-image: url("../../images/siteicons/purple/check.png");
+}
\ No newline at end of file
diff --git a/verifyemail.php b/verifyemail.php
index e5150eb..99a6052 100644
--- a/verifyemail.php
+++ b/verifyemail.php
@@ -86,6 +86,7 @@ if (isset($_GET['email']) && isset($_GET['token'])) {
<link rel="stylesheet" href="styles/themes/red.css?<?= $version ?>" id="red-theme" <?= $colorTheme != "red" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/green.css?<?= $version ?>" id="green-theme" <?= $colorTheme != "green" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/themes/yellow.css?<?= $version ?>" id="yellow-theme" <?= $colorTheme != "yellow" ? "disabled" : "" ?>>
+ <link rel="stylesheet" href="styles/themes/purple.css?<?= $version ?>" id="purple-theme" <?= $colorTheme != "purple" ? "disabled" : "" ?>>
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/barlow.css">
<link rel="stylesheet" href="styles/login-dark-theme.css?<?= $version ?>" id="dark-theme" <?= $theme == "light" ? "disabled" : "" ?>>