mirror of
https://github.com/rottenwheel/moner.ooo.git
synced 2025-01-03 05:48:06 +00:00
commit
3bfbe0b1c5
4 changed files with 40 additions and 5 deletions
|
@ -20,7 +20,7 @@ $api_cg = json_decode(file_get_contents('coingecko.json'), true);
|
||||||
// Configuration file
|
// Configuration file
|
||||||
$config = [];
|
$config = [];
|
||||||
if (file_exists('config.php')) {
|
if (file_exists('config.php')) {
|
||||||
$config = require 'config.php';
|
$config = require_once 'config.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$display_servers_guru = isset($config['servers_guru']) && $config['servers_guru'] === true;
|
$display_servers_guru = isset($config['servers_guru']) && $config['servers_guru'] === true;
|
||||||
|
@ -106,5 +106,5 @@ foreach (array_reverse($preferred_currencies) as $currency) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output the HTML
|
// Output the HTML
|
||||||
require 'templates/index.php';
|
require_once 'templates/index.php';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -122,6 +122,18 @@ p {
|
||||||
.btn {
|
.btn {
|
||||||
min-width: 38px;
|
min-width: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#donation-qr {
|
||||||
|
width: auto;
|
||||||
|
height: 80vh;
|
||||||
|
max-width: 600px;
|
||||||
|
max-height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#donation-qr-container {
|
||||||
|
height: auto;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-tooltip-auto {
|
.bs-tooltip-auto {
|
||||||
|
@ -137,3 +149,19 @@ p {
|
||||||
border-width: 0.4rem 0.4rem 0;
|
border-width: 0.4rem 0.4rem 0;
|
||||||
border-top-color: #000;
|
border-top-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#donation-qr-container {
|
||||||
|
display: none;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
#donation-qr {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#donation-qr-toggle:checked ~ #donation-qr-container {
|
||||||
|
display: flex;
|
||||||
|
}
|
|
@ -3,6 +3,14 @@ import '../css/custom.css';
|
||||||
|
|
||||||
import Tooltip from 'bootstrap/js/dist/tooltip';
|
import Tooltip from 'bootstrap/js/dist/tooltip';
|
||||||
|
|
||||||
|
/////
|
||||||
|
let inactivityTimeout = 30; // in seconds
|
||||||
|
let fetchInterval = 30; // in seconds
|
||||||
|
/////
|
||||||
|
|
||||||
|
inactivityTimeout = inactivityTimeout * 1000;
|
||||||
|
fetchInterval = fetchInterval * 1000;
|
||||||
|
|
||||||
const tooltipTriggerList = Array.from(document.querySelectorAll('[data-toggle="tooltip"]'));
|
const tooltipTriggerList = Array.from(document.querySelectorAll('[data-toggle="tooltip"]'));
|
||||||
const tooltipList = tooltipTriggerList.map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl, { placement: 'top' }));
|
const tooltipList = tooltipTriggerList.map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl, { placement: 'top' }));
|
||||||
console.log(tooltipList);
|
console.log(tooltipList);
|
||||||
|
@ -14,13 +22,12 @@ const runConvert = () =>
|
||||||
lastModifiedField === 'xmr' ? xmrConvert() : fiatConvert();
|
lastModifiedField === 'xmr' ? xmrConvert() : fiatConvert();
|
||||||
|
|
||||||
let updateInterval
|
let updateInterval
|
||||||
const startFetching = () => updateInterval = setInterval(fetchUpdatedExchangeRates, 5000);
|
const startFetching = () => updateInterval = setInterval(fetchUpdatedExchangeRates, fetchInterval);
|
||||||
const stopFetching = () => {
|
const stopFetching = () => {
|
||||||
clearInterval(updateInterval)
|
clearInterval(updateInterval)
|
||||||
updateInterval = null;
|
updateInterval = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const inactivityTimeout = 30 * 1000; // 30 seconds
|
|
||||||
let lastActivity = Date.now()
|
let lastActivity = Date.now()
|
||||||
|
|
||||||
const resetActivity = () => lastActivity = Date.now()
|
const resetActivity = () => lastActivity = Date.now()
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
<?php echo $info;
|
<?php echo $info;
|
||||||
if ($display_servers_guru) {
|
if ($display_servers_guru) {
|
||||||
echo $servers_guru;
|
echo $servers_guru;
|
||||||
};
|
}
|
||||||
echo $attribution; ?>
|
echo $attribution; ?>
|
||||||
</small>
|
</small>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
Loading…
Reference in a new issue