Skip to content

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

Improve update banners and release links

Gareth Preston6e9c271d9107
diff --git a/admin.php b/admin.php
index 3ace79f..117a1ba 100644
--- a/admin.php
+++ b/admin.php
@@ -477,23 +477,27 @@ $loginDisabledAllowed = $userCount == 1 && $settings['registrations_open'] == 0;
if ($hasUpdate) {
?>
<div class="updates-list">
- <p><?= translate('new_version_available', $i18n) ?>.</p>
+ <p class="updates-list-title">
+ <i class="fa-solid fa-arrow-up"></i>
+ <?= translate('new_version_available', $i18n) ?>.
+ </p>
<p>
<?= translate('current_version', $i18n) ?>:
<span>
- <?= $version ?>
- <a href="https://github.com/ellite/Wallos/releases/tag/<?= $version ?>" target="_blank">
- <i class="fa-solid fa-external-link"></i>
+ <?= htmlspecialchars($version) ?>
+ <a href="https://github.com/ellite/Wallos/releases/tag/<?= htmlspecialchars($version) ?>"
+ target="_blank" title="<?= translate('external_url', $i18n) ?>" rel="noreferrer">
+ <i class="fa-solid fa-arrow-up-right-from-square"></i>
</a>
</span>
</p>
<p>
<?= translate('latest_version', $i18n) ?>:
- <span>
- <?= $latestVersion ?>
- <a href="https://github.com/ellite/Wallos/releases/tag/<?= $latestVersion ?>"
- target="_blank">
- <i class="fa-solid fa-external-link"></i>
+ <span class="updates-list-latest">
+ <?= htmlspecialchars($latestVersion) ?>
+ <a href="https://github.com/ellite/Wallos/releases/tag/<?= htmlspecialchars($latestVersion) ?>"
+ target="_blank" title="<?= translate('external_url', $i18n) ?>" rel="noreferrer">
+ <i class="fa-solid fa-arrow-up-right-from-square"></i>
</a>
</span>
</p>
diff --git a/index.php b/index.php
index 99f43b7..fb10c28 100644
--- a/index.php
+++ b/index.php
@@ -117,11 +117,23 @@ while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
if (version_compare($version, $latestVersion) == -1) {
?>
<div class="update-banner">
- <?= translate('new_version_available', $i18n) ?>:
- <span><a href="https://github.com/ellite/Wallos/releases/tag/<?= htmlspecialchars($latestVersion) ?>"
- target="_blank" rel="noreferer">
- <?= htmlspecialchars($latestVersion) ?>
- </a></span>
+ <div class="update-banner-icon">
+ <i class="fa-solid fa-arrow-up"></i>
+ </div>
+ <div class="update-banner-text">
+ <strong><?= translate('new_version_available', $i18n) ?></strong>
+ <span>
+ <?= translate('current_version', $i18n) ?>: <?= htmlspecialchars($version) ?>
+ <i class="fa-solid fa-arrow-right"></i>
+ <b><?= htmlspecialchars($latestVersion) ?></b>
+ </span>
+ </div>
+ <a class="update-banner-link"
+ href="https://github.com/ellite/Wallos/releases/tag/<?= htmlspecialchars($latestVersion) ?>"
+ target="_blank" title="<?= translate('external_url', $i18n) ?>" rel="noreferrer">
+ <?= translate('release_notes', $i18n) ?>
+ <i class="fa-solid fa-arrow-up-right-from-square"></i>
+ </a>
</div>
<?php
}
diff --git a/styles/dark-theme.css b/styles/dark-theme.css
index dcb1bd8..ab75639 100644
--- a/styles/dark-theme.css
+++ b/styles/dark-theme.css
@@ -182,14 +182,6 @@ select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238B94A7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
-.update-banner {
- color: #FFF;
-}
-
-.update-banner>span>a {
- color: #FFF;
-}
-
.totp-qrcode-container {
padding: 14px;
border: 1px solid #DDD;
diff --git a/styles/styles.css b/styles/styles.css
index 38c5f6b..df56964 100644
--- a/styles/styles.css
+++ b/styles/styles.css
@@ -1320,10 +1320,35 @@ header #avatar {
.credits-list>div>span,
.updates-list>p>span {
- color: #AAA;
+ color: var(--text-muted);
font-size: 16px;
}
+.updates-list>p.updates-list-title {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 10px;
+ font-weight: 500;
+}
+
+.updates-list>p.updates-list-title>i {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 26px;
+ height: 26px;
+ border-radius: 50%;
+ background-color: var(--main-color);
+ color: var(--text-color-inverted);
+ font-size: 12px;
+}
+
+.updates-list>p>span.updates-list-latest {
+ color: var(--main-color);
+ font-weight: 600;
+}
+
.credits-list>div>span>a,
.updates-list>p>span>a,
.settings-notes>p>span>a {
@@ -3220,22 +3245,114 @@ input[type="radio"]:checked+label::after {
}
.update-banner {
- padding: 15px 20px;
- background-color: var(--accent-color);
- border: 1px solid var(--main-color);
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 14px;
+ padding: 14px 18px 14px 22px;
+ background-color: var(--box-background-color);
+ background-image: linear-gradient(135deg, rgba(var(--main-color-rgb), 0.14), rgba(var(--main-color-rgb), 0.04));
+ border: 1px solid rgba(var(--main-color-rgb), 0.3);
border-radius: 12px;
margin-bottom: 20px;
- text-align: center;
color: var(--text-color);
+ box-shadow: var(--box-shadow);
+ overflow: hidden;
+}
+
+.update-banner::before {
+ content: "";
+ position: absolute;
+ top: 0px;
+ bottom: 0px;
+ left: 0px;
+ width: 4px;
+ background-color: var(--main-color);
}
-.update-banner>span {
+.update-banner-icon {
+ flex: 0 0 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 38px;
+ height: 38px;
+ border-radius: 50%;
+ background-color: var(--main-color);
+ color: var(--text-color-inverted);
+ font-size: 16px;
+ box-shadow: 0 0 0 4px rgba(var(--main-color-rgb), 0.15);
+}
+
+.update-banner-text {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ min-width: 0px;
+ flex: 1 1 auto;
+}
+
+.update-banner-text>strong {
+ font-size: 16px;
+ font-weight: 600;
+}
+
+.update-banner-text>span {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 6px;
+ font-size: 14px;
+ color: var(--text-muted);
+}
+
+.update-banner-text>span>i {
+ font-size: 11px;
+}
+
+.update-banner-text>span>b {
+ font-weight: 600;
+ color: var(--main-color);
+}
+
+.update-banner-link {
+ flex: 0 0 auto;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 8px;
+ padding: 8px 14px;
+ border-radius: 8px;
+ background-color: var(--main-color);
+ color: var(--text-color-inverted);
+ font-size: 14px;
font-weight: 500;
+ text-decoration: none;
+ transition: background-color 0.2s;
}
-.update-banner>span>a {
- color: var(--text-color);
- text-decoration: underline;
+.update-banner-link:hover {
+ background-color: var(--hover-color);
+}
+
+.update-banner-link>i,
+.update-banner-link:hover>i {
+ color: var(--text-color-inverted);
+ font-size: 12px;
+}
+
+@media (max-width: 768px) {
+ .update-banner {
+ flex-wrap: wrap;
+ }
+
+ .update-banner-link {
+ width: 100%;
+ box-sizing: border-box;
+ justify-content: center;
+ }
}
.demo-banner {