webapp: add hashed minified asset pipeline

This commit is contained in:
3252a8
2026-04-26 20:04:30 +03:00
parent 250df445f0
commit 5ec179b6d6
10 changed files with 755 additions and 25 deletions
File diff suppressed because one or more lines are too long
@@ -291,6 +291,6 @@
<!-- WEBAPP_I18N_SCRIPT -->
<!-- WEBAPP_CONFIG_SCRIPT -->
<script src="./subscription_webapp.js" defer></script>
<!-- WEBAPP_JS_SCRIPT -->
</body>
</html>
+5 -5
View File
@@ -435,7 +435,7 @@ const MOCK = (() => {
referral_bonus_explanation: 'Bonuses are awarded once for each invited user when they purchase a subscription.'
}
};
const I18N = readJsonScript('i18n') || (MOCK && MOCK.i18n) || FALLBACK_I18N;
const I18N = readJsonScript('i18n') || (MOCK && MOCK.i18n) || {};
const accent = CFG.primaryColor || '#00fe7a';
document.documentElement.style.setProperty('--accent', accent);
@@ -2440,14 +2440,14 @@ const MOCK = (() => {
if (document.documentElement.lang) candidates.push(document.documentElement.lang);
for (const raw of candidates) {
const short = String(raw).toLowerCase().split('-')[0];
if (I18N[short]) return short;
if (I18N && I18N[short]) return short;
}
return 'ru';
}
function setLanguage(lang) {
const short = String(lang || '').toLowerCase().split('-')[0];
if (!I18N[short]) return;
if (I18N && Object.keys(I18N).length && !I18N[short]) return;
state.langOverride = short;
try { localStorage.setItem('rw_webapp_lang', short); } catch (e) { }
applyI18n();
@@ -2459,8 +2459,8 @@ const MOCK = (() => {
}
function t(key, params = {}) {
const table = I18N[getLanguage()] || I18N.ru;
const fallback = I18N.ru[key] || key;
const table = (I18N && I18N[getLanguage()]) || (I18N && I18N.ru) || {};
const fallback = (I18N && I18N.ru && I18N.ru[key]) || key;
const template = table[key] || fallback;
return template.replace(/\{(\w+)\}/g, (_, name) => (
Object.prototype.hasOwnProperty.call(params, name) ? String(params[name]) : ''
File diff suppressed because one or more lines are too long
@@ -228,7 +228,7 @@
}
.lang-dropdown-item.is-active {
@apply text-[var(--accent)];
@apply bg-[var(--bg-card-hover)] text-[var(--text-primary)];
}
.lang-dropdown-flag {