feat: persist display and experimental settings on the db
feat: small styles changed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
$query = "SELECT * FROM settings";
|
||||
$result = $db->query($query);
|
||||
$settings = $result->fetchArray(SQLITE3_ASSOC);
|
||||
if ($settings) {
|
||||
$cookieExpire = time() + (30 * 24 * 60 * 60);
|
||||
setcookie('theme', $settings['dark_theme'] ? 'dark': 'light', $cookieExpire);
|
||||
$settings['theme'] = $settings['dark_theme'] ? 'dark': 'light';
|
||||
$settings['showMonthlyPrice'] = $settings['monthly_price'] ? 'true': 'false';
|
||||
$settings['convertCurrency'] = $settings['convert_currency'] ? 'true': 'false';
|
||||
$settings['removeBackground'] = $settings['remove_background'] ? 'true': 'false';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user