SHA256
Добавить отключаемое предупреждение о звонках в настройках
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { t, th } from '../i18n/index.js';
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
import { getShowCallWarning, setShowCallWarning } from '../services/call-warning-preference.js';
|
||||
import { getShowPublicHistoryWarning, setShowPublicHistoryWarning } from '../services/public-history-consent.js';
|
||||
|
||||
export const pageMeta = { id: 'application-settings-view', get title() { return t('screens.application_settings_view.text_001'); } };
|
||||
@@ -26,6 +27,19 @@ export function render({ navigate, chrome }) {
|
||||
input.checked = getShowPublicHistoryWarning();
|
||||
input.addEventListener('change', () => setShowPublicHistoryWarning(input.checked));
|
||||
section.append(row);
|
||||
const callRow = document.createElement('label');
|
||||
callRow.className = 'nav-row nav-row--switch';
|
||||
callRow.innerHTML = `
|
||||
<span class="nav-row__text">
|
||||
<span class="nav-row__label">${th('screens.application_settings_view.call_warning')}</span>
|
||||
<span class="nav-row__hint">${th('screens.application_settings_view.call_hint')}</span>
|
||||
</span>
|
||||
<input class="switch" type="checkbox" />
|
||||
`;
|
||||
const callInput = callRow.querySelector('input');
|
||||
callInput.checked = getShowCallWarning();
|
||||
callInput.addEventListener('change', () => setShowCallWarning(callInput.checked));
|
||||
section.append(callRow);
|
||||
screen.append(section);
|
||||
return screen;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user