feat: persist display and experimental settings on the db

feat: small styles changed
This commit is contained in:
Miguel Ribeiro
2024-02-22 00:11:08 +01:00
committed by GitHub
parent 3e61711dd4
commit f0a6f1a2f1
15 changed files with 242 additions and 36 deletions
+6 -4
View File
@@ -7,9 +7,11 @@
include_once '../../includes/list_subscriptions.php';
require_once '../../includes/getsettings.php';
$theme = "light";
if (isset($_COOKIE['theme'])) {
$theme = $_COOKIE['theme'];
if (isset($settings['theme'])) {
$theme = $settings['theme'];
}
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
@@ -57,11 +59,11 @@
$print[$id]['url'] = $subscription['url'];
$print[$id]['notes'] = $subscription['notes'];
if (isset($_COOKIE['convertCurrency']) && $_COOKIE['convertCurrency'] === 'true' && $currencyId != $mainCurrencyId) {
if (isset($settings['convertCurrency']) && $settings['convertCurrency'] === 'true' && $currencyId != $mainCurrencyId) {
$print[$id]['price'] = getPriceConverted($print[$id]['price'], $currencyId, $db);
$print[$id]['currency_code'] = $currencies[$mainCurrencyId]['code'];
}
if (isset($_COOKIE['showMonthlyPrice']) && $_COOKIE['showMonthlyPrice'] === 'true') {
if (isset($settings['showMonthlyPrice']) && $settings['showMonthlyPrice'] === 'true') {
$print[$id]['price'] = getPricePerMonth($cycle, $frequency, $print[$id]['price']);
}
}