dsfdsf
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-24 23:54:04 +02:00
parent 739e4d4c42
commit d6f09326f4
21 changed files with 355 additions and 364 deletions

View File

@@ -99,51 +99,6 @@
overflow-x: clip;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"] {
--mc-bg: #09111f;
--mc-surface: rgba(8, 15, 29, 0.76);
--mc-surface-strong: rgba(15, 23, 42, 0.94);
--mc-line: rgba(148, 163, 184, 0.18);
--mc-line-strong: rgba(255, 255, 255, 0.12);
--mc-text: #e5eef8;
--mc-text-muted: #a7b5c8;
--mc-accent: #3dd9c4;
--mc-accent-strong: #7dd3fc;
color: var(--mc-text);
background:
linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
radial-gradient(circle at top left, rgba(13, 148, 136, 0.16), transparent 26%),
radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 22%),
linear-gradient(180deg, #04111d 0%, #0f172a 42%, #111827 100%);
background-size: 24px 24px, 24px 24px, auto, auto, auto;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"][data-module-accent="logo"] {
--mc-accent: #ed1671;
--mc-accent-strong: #06a9c8;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"][data-module-accent="pink"] {
--mc-accent: #ed1671;
--mc-accent-strong: #f6aa21;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"][data-module-accent="cyan"] {
--mc-accent: #06a9c8;
--mc-accent-strong: #8bc53f;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"][data-module-accent="orange"] {
--mc-accent: #f6aa21;
--mc-accent-strong: #ed1671;
}
#mining-checker-app .mc-grid-bg[data-module-theme="custom"][data-module-accent="green"] {
--mc-accent: #8bc53f;
--mc-accent-strong: #06a9c8;
}
#mining-checker-app .mc-shell {
width: min(1360px, calc(100% - 24px));
max-width: 100%;

View File

@@ -12,6 +12,23 @@
const fxBaseUrl = root.dataset.fxUrl || 'https://currencyapi.net';
const fxCurrenciesUrl = root.dataset.fxCurrenciesUrl || fxBaseUrl;
const fxApiKeyMask = root.dataset.fxApiKeyMask || '';
const configuredSections = (() => {
try {
const parsed = JSON.parse(root.dataset.sectionsJson || '[]');
if (!Array.isArray(parsed)) {
return [];
}
return parsed
.map((section) => {
const key = section && typeof section.key === 'string' ? section.key.trim() : '';
const label = section && typeof section.label === 'string' ? section.label.trim() : '';
return key && label ? [key, label] : null;
})
.filter(Boolean);
} catch (error) {
return [];
}
})();
const initialDebugMode = (() => {
try {
return window.localStorage.getItem('mining-checker-debug-enabled') === '1';
@@ -289,12 +306,10 @@
baseline_coins_total: '',
daily_cost_amount: '',
daily_cost_currency: 'EUR',
report_currency: 'EUR',
crypto_currency: 'DOGE',
fx_max_age_hours: 3,
module_theme_mode: 'inherit',
module_theme_accent: 'teal',
preferred_currencies: ['DOGE', 'USD', 'EUR'],
report_currency: 'EUR',
crypto_currency: 'DOGE',
fx_max_age_hours: 3,
preferred_currencies: ['DOGE', 'USD', 'EUR'],
cost_plans: [],
currencies: [],
payouts: [],
@@ -585,8 +600,6 @@
report_currency: 'EUR',
crypto_currency: 'DOGE',
fx_max_age_hours: 3,
module_theme_mode: 'inherit',
module_theme_accent: 'teal',
});
const [moduleAuthForm, setModuleAuthForm] = useState({
required: true,
@@ -1017,8 +1030,6 @@
report_currency: normalized.settings.report_currency || 'EUR',
crypto_currency: normalized.settings.crypto_currency || 'DOGE',
fx_max_age_hours: normalized.settings.fx_max_age_hours || 3,
module_theme_mode: normalized.settings.module_theme_mode || 'inherit',
module_theme_accent: normalized.settings.module_theme_accent || 'teal',
});
setFxSelection(Array.isArray(normalized.settings.preferred_currencies) && normalized.settings.preferred_currencies.length
? normalized.settings.preferred_currencies
@@ -1243,8 +1254,6 @@
report_currency: settingsForm.report_currency || 'EUR',
crypto_currency: settingsForm.crypto_currency || 'DOGE',
fx_max_age_hours: settingsForm.fx_max_age_hours || 3,
module_theme_mode: settingsForm.module_theme_mode || 'inherit',
module_theme_accent: settingsForm.module_theme_accent || 'teal',
preferred_currencies: Array.isArray(currentSettings.preferred_currencies)
? currentSettings.preferred_currencies
: fxSelection,
@@ -1806,7 +1815,7 @@
setCookie('mining_checker_report_currency', '', 0);
}
const tabs = [
const tabs = configuredSections.length ? configuredSections : [
['overview', 'Ueberblick'],
['measurements', 'Messpunkte'],
['currencies', 'Waehrungen'],
@@ -1871,17 +1880,8 @@
const debugConsoleText = debugEntries
.map((entry) => `${entry.time} · ${entry.type}\n${JSON.stringify(entry, null, 2)}`)
.join('\n\n');
const moduleThemeMode = ['inherit', 'custom'].includes(String(currentSettings.module_theme_mode || ''))
? String(currentSettings.module_theme_mode)
: 'inherit';
const moduleThemeAccent = ['teal', 'logo', 'pink', 'cyan', 'orange', 'green'].includes(String(currentSettings.module_theme_accent || ''))
? String(currentSettings.module_theme_accent)
: 'teal';
return h('div', {
className: 'mc-grid-bg',
'data-module-theme': moduleThemeMode,
'data-module-accent': moduleThemeAccent,
}, [
h('div', { key: 'shell', className: 'mc-shell mc-stack' }, [
h('header', { key: 'header', className: 'mc-hero' }, [
@@ -2949,20 +2949,6 @@
selectField('Standard-FIAT-Währung', settingsForm.report_currency || 'EUR', selectableFiatCurrencies.map((currency) => currency.code), (value) => setSettingsForm({ ...settingsForm, report_currency: value })),
selectField('Standard-Krypto-Währung', settingsForm.crypto_currency || 'DOGE', selectableCryptoCurrencies.map((currency) => currency.code), (value) => setSettingsForm({ ...settingsForm, crypto_currency: value })),
inputField('FX maximal in Stunden wiederverwenden', 'number', String(settingsForm.fx_max_age_hours || 3), (value) => setSettingsForm({ ...settingsForm, fx_max_age_hours: value }), '0.25'),
selectField('Modul-Layout', settingsForm.module_theme_mode || 'inherit', [
{ value: 'inherit', label: 'Wie Main-Site' },
{ value: 'custom', label: 'Custom' },
], (value) => setSettingsForm({ ...settingsForm, module_theme_mode: value })),
settingsForm.module_theme_mode === 'custom'
? selectField('Custom-Farbschema', settingsForm.module_theme_accent || 'teal', [
{ value: 'teal', label: 'Mining Teal' },
{ value: 'logo', label: 'Logo Mix' },
{ value: 'pink', label: 'Pink' },
{ value: 'cyan', label: 'Cyan' },
{ value: 'orange', label: 'Orange' },
{ value: 'green', label: 'Gruen' },
], (value) => setSettingsForm({ ...settingsForm, module_theme_accent: value }))
: null,
h('button', {
type: 'submit',
className: 'mc-button mc-button--primary',