xycyxc
This commit is contained in:
@@ -6,14 +6,6 @@ require_once dirname(__DIR__) . '/bootstrap.php';
|
||||
$moduleConfig = require dirname(__DIR__) . '/config/module.php';
|
||||
$design = module_design('mining-checker');
|
||||
$defaultProjectKey = (string) ($moduleConfig['default_project_key'] ?? 'doge-main');
|
||||
$fxConfig = (array) ($moduleConfig['fx'] ?? []);
|
||||
$fxProvider = (string) ($fxConfig['provider'] ?? 'currencyapi');
|
||||
$fxBaseUrl = rtrim((string) ($fxConfig['url'] ?? 'https://currencyapi.net'), '/');
|
||||
$fxCurrenciesUrl = rtrim((string) ($fxConfig['currencies_url'] ?? $fxBaseUrl), '/');
|
||||
$fxApiKey = (string) ($fxConfig['api_key'] ?? '');
|
||||
$fxApiKeyMasked = $fxApiKey === ''
|
||||
? ''
|
||||
: (strlen($fxApiKey) <= 10 ? $fxApiKey : substr($fxApiKey, 0, 6) . '...' . substr($fxApiKey, -4));
|
||||
$sections = is_array($design['sections'] ?? null) ? $design['sections'] : [];
|
||||
$activeView = trim((string) ($_GET['view'] ?? 'overview'));
|
||||
$allowedViews = [];
|
||||
@@ -57,10 +49,6 @@ $moduleJs = str_replace('</script>', '<\/script>', $moduleJs);
|
||||
<div id="mining-checker-app"
|
||||
data-default-project-key="<?= e($defaultProjectKey) ?>"
|
||||
data-api-base="/api/mining-checker/v1"
|
||||
data-fx-provider="<?= e($fxProvider) ?>"
|
||||
data-fx-url="<?= e($fxBaseUrl) ?>"
|
||||
data-fx-currencies-url="<?= e($fxCurrenciesUrl) ?>"
|
||||
data-fx-api-key-mask="<?= e($fxApiKeyMasked) ?>"
|
||||
data-active-view="<?= e($activeView) ?>"
|
||||
data-sections-json="<?= e(is_string($sectionsJson) ? $sectionsJson : '[]') ?>"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user