mirror of
git://f0xx.org/android_cast
synced 2026-07-29 05:17:39 +03:00
be sync
This commit is contained in:
@@ -52,11 +52,18 @@
|
||||
var key = el.getAttribute('data-i18n-title');
|
||||
if (key) el.setAttribute('title', t(key));
|
||||
});
|
||||
var flag = document.getElementById('locale-flag');
|
||||
var code = document.getElementById('locale-code');
|
||||
var disp = LANG_DISPLAY[lang] || LANG_DISPLAY.en;
|
||||
if (flag) flag.textContent = disp.flag;
|
||||
if (code) code.textContent = disp.code;
|
||||
document.querySelectorAll('.locale-flag').forEach(function (el) {
|
||||
el.textContent = disp.flag;
|
||||
});
|
||||
document.querySelectorAll('.lang-select').forEach(function (sel) {
|
||||
SUPPORTED.forEach(function (code) {
|
||||
var meta = LANG_DISPLAY[code] || LANG_DISPLAY.en;
|
||||
var opt = sel.querySelector('option[value="' + code + '"]');
|
||||
if (opt) opt.textContent = meta.flag + ' ' + meta.code;
|
||||
});
|
||||
sel.value = lang;
|
||||
});
|
||||
document.documentElement.setAttribute('lang', lang);
|
||||
var footerLeft = document.querySelector('.platform-footer__left[data-i18n]');
|
||||
if (footerLeft) {
|
||||
|
||||
@@ -416,20 +416,21 @@
|
||||
.landing-rail { --landing-rail-w: 36px; }
|
||||
}
|
||||
|
||||
.landing-top-tools .locale-picker {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(26, 35, 50, 0.5);
|
||||
.landing-top-tools .hub-locale {
|
||||
margin: 0;
|
||||
}
|
||||
.landing-top-tools .locale-picker__select {
|
||||
border: none;
|
||||
background: transparent;
|
||||
.landing-top-tools .hub-locale .locale-flag {
|
||||
font-size: 1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.landing-top-tools .hub-locale select {
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,14 +106,13 @@ unset($__platformDir);
|
||||
<option value="light">Light</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="locale-picker" data-i18n-title="lang.label" title="Language">
|
||||
<label class="toolbar-select locale-toolbar-select hub-locale" data-i18n-title="lang.label" title="Language">
|
||||
<span class="locale-flag" id="locale-flag" aria-hidden="true">🇬🇧</span>
|
||||
<span class="locale-code" id="locale-code" aria-hidden="true">EN</span>
|
||||
<select class="lang-select locale-picker__select" id="lang-select" data-i18n-aria="lang.label" aria-label="Language">
|
||||
<select class="lang-select" id="lang-select" data-i18n-aria="lang.label" aria-label="Language">
|
||||
<option value="en">EN</option>
|
||||
<option value="ru">RU</option>
|
||||
</select>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user