Skip to content

Commit

Permalink
Show notes to subscriptions list on the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Feb 14, 2024
1 parent 323679e commit f53f253
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions endpoints/subscriptions/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
$print[$id]['payer_user_id'] = $subscription['payer_user_id'];
$print[$id]['price'] = floatval($subscription['price']);
$print[$id]['url'] = $subscription['url'];
$print[$id]['notes'] = $subscription['notes'];

if (isset($_COOKIE['convertCurrency']) && $_COOKIE['convertCurrency'] === 'true' && $currencyId != $mainCurrencyId) {
$print[$id]['price'] = getPriceConverted($print[$id]['price'], $currencyId, $db);
Expand Down
Binary file added images/siteicons/notes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions includes/list_subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ function printSubscriptions($subscriptions, $sort, $categories, $members, $i18n)
}
?>
</div>
<?php
if ($subscription['notes'] != "") {
?>
<div class="subscription-notes">
<span class="notes">
<img src="images/siteicons/notes.png" alt="<?= translate('notes', $i18n) ?>" />
<?= $subscription['notes'] ?>
</span>
</div>
<?php
}
?>
</div>
<?php
}
Expand Down
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$version = "v1.2.4";
$version = "v1.2.5";
?>
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
$print[$id]['payer_user_id'] = $subscription['payer_user_id'];
$print[$id]['price'] = floatval($subscription['price']);
$print[$id]['url'] = $subscription['url'];
$print[$id]['notes'] = $subscription['notes'];

if (isset($_COOKIE['convertCurrency']) && $_COOKIE['convertCurrency'] === 'true' && $currencyId != $mainCurrencyId) {
$print[$id]['price'] = getPriceConverted($print[$id]['price'], $currencyId, $db);
Expand Down
19 changes: 17 additions & 2 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ main > .contain {
overflow: hidden;
}

.subscription-notes {
display: none;
flex-direction: row;
padding: 6px 5px;
overflow: hidden;
}

.subscription-main > span,
.subscription-secondary > span {
display: flex;
Expand Down Expand Up @@ -294,6 +301,12 @@ main > .contain {
cursor: pointer;
}

.subscription-notes > span {
display: flex;
align-items: center;
font-size: 14px;
}

@media (max-width: 768px) {
.subscription-main > .name {
display: none;
Expand All @@ -316,11 +329,13 @@ main > .contain {
}
}

.subscription.is-open .subscription-secondary {
.subscription.is-open .subscription-secondary,
.subscription.is-open .subscription-notes {
display: flex;
}

.subscription-secondary img {
.subscription-secondary img,
.subscription-notes img {
height: 20px;
margin-right: 10px;
}
Expand Down

0 comments on commit f53f253

Please sign in to comment.