Simplify control language and theme labels
This commit is contained in:
@@ -23,8 +23,8 @@ Control은 라즈베리파이/리눅스 호스트의 팬과 시스템 상태를
|
|||||||
- WakeLock 버튼으로 대시보드 화면 꺼짐 방지
|
- WakeLock 버튼으로 대시보드 화면 꺼짐 방지
|
||||||
- Reboot 버튼으로 2단계 확인 후 시스템 재부팅 요청
|
- Reboot 버튼으로 2단계 확인 후 시스템 재부팅 요청
|
||||||
- 기본 브라우저 alert/confirm/prompt 대신 대시보드 디자인에 맞춘 custom dialog 사용
|
- 기본 브라우저 alert/confirm/prompt 대신 대시보드 디자인에 맞춘 custom dialog 사용
|
||||||
- Translate 버튼으로 `en`, `ko` UI 언어 토글
|
- Translate 버튼으로 `en`, `ko` UI 언어 토글. 버튼 표시는 상태 suffix 없이 고정
|
||||||
- Theme 버튼으로 `dark`, `light` UI 테마 토글
|
- Theme 버튼으로 `dark`, `light` UI 테마 토글. 버튼 표시는 상태 suffix 없이 고정
|
||||||
|
|
||||||
## 주요 API
|
## 주요 API
|
||||||
|
|
||||||
@@ -125,8 +125,8 @@ control-push-healthcheck.service
|
|||||||
6. Push 등록은 권한 요청과 구독 저장이 끝나면 즉시 상태를 갱신합니다.
|
6. Push 등록은 권한 요청과 구독 저장이 끝나면 즉시 상태를 갱신합니다.
|
||||||
7. WakeLock 버튼은 활성 상태를 초록색 버튼으로 표시합니다.
|
7. WakeLock 버튼은 활성 상태를 초록색 버튼으로 표시합니다.
|
||||||
8. Reboot 버튼은 `재부팅` 단어 입력과 관리자 암호 재입력을 모두 통과한 뒤 서버 API로 재부팅을 요청합니다.
|
8. Reboot 버튼은 `재부팅` 단어 입력과 관리자 암호 재입력을 모두 통과한 뒤 서버 API로 재부팅을 요청합니다.
|
||||||
9. Translate 버튼은 최초 접속 시 디바이스 언어를 기본값으로 사용하고, 변경값은 `localStorage`의 `controlLang`에 저장합니다.
|
9. Translate 버튼은 최초 접속 시 디바이스 언어를 기본값으로 사용하고, 변경값은 `localStorage`의 `controlLang`에 저장합니다. 라벨은 `Translate` 또는 `번역`으로만 표시합니다.
|
||||||
10. Theme 버튼은 기본값 `dark`로 시작하고, 변경값은 `localStorage`의 `controlTheme`에 저장합니다.
|
10. Theme 버튼은 기본값 `dark`로 시작하고, 변경값은 `localStorage`의 `controlTheme`에 저장합니다. 라벨은 `Theme` 또는 `테마`로만 표시합니다.
|
||||||
11. Push 발송, 수신, 표시, 클릭 이벤트를 기록하고 구독 DB의 건강 상태를 갱신합니다.
|
11. Push 발송, 수신, 표시, 클릭 이벤트를 기록하고 구독 DB의 건강 상태를 갱신합니다.
|
||||||
|
|
||||||
## 주요 함수/모듈
|
## 주요 함수/모듈
|
||||||
|
|||||||
+3
-11
@@ -117,10 +117,6 @@
|
|||||||
translateButton: 'Translate',
|
translateButton: 'Translate',
|
||||||
themeButton: 'Theme',
|
themeButton: 'Theme',
|
||||||
rebootButton: 'Reboot',
|
rebootButton: 'Reboot',
|
||||||
themeDark: 'Theme: Dark',
|
|
||||||
themeLight: 'Theme: Light',
|
|
||||||
langEn: 'Translate: EN',
|
|
||||||
langKo: 'Translate: KO',
|
|
||||||
dialogAlert: 'Alert',
|
dialogAlert: 'Alert',
|
||||||
dialogConfirm: 'Confirm',
|
dialogConfirm: 'Confirm',
|
||||||
dialogInput: 'Input',
|
dialogInput: 'Input',
|
||||||
@@ -254,10 +250,6 @@
|
|||||||
translateButton: '번역',
|
translateButton: '번역',
|
||||||
themeButton: '테마',
|
themeButton: '테마',
|
||||||
rebootButton: '재부팅',
|
rebootButton: '재부팅',
|
||||||
themeDark: '테마: 다크',
|
|
||||||
themeLight: '테마: 라이트',
|
|
||||||
langEn: '번역: EN',
|
|
||||||
langKo: '번역: KO',
|
|
||||||
dialogAlert: '알림',
|
dialogAlert: '알림',
|
||||||
dialogConfirm: '확인',
|
dialogConfirm: '확인',
|
||||||
dialogInput: '입력',
|
dialogInput: '입력',
|
||||||
@@ -372,7 +364,7 @@
|
|||||||
if (themeMeta) {
|
if (themeMeta) {
|
||||||
themeMeta.content = state.theme === 'light' ? '#f4f7fb' : '#0f1115';
|
themeMeta.content = state.theme === 'light' ? '#f4f7fb' : '#0f1115';
|
||||||
}
|
}
|
||||||
els.themeBtn && (els.themeBtn.textContent = state.theme === 'dark' ? t('themeDark') : t('themeLight'));
|
els.themeBtn && (els.themeBtn.textContent = t('themeButton'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyLang(lang) {
|
function applyLang(lang) {
|
||||||
@@ -382,8 +374,8 @@
|
|||||||
document.querySelectorAll('[data-i18n]').forEach(node => {
|
document.querySelectorAll('[data-i18n]').forEach(node => {
|
||||||
node.textContent = t(node.dataset.i18n);
|
node.textContent = t(node.dataset.i18n);
|
||||||
});
|
});
|
||||||
els.translateBtn && (els.translateBtn.textContent = state.lang === 'ko' ? t('langKo') : t('langEn'));
|
els.translateBtn && (els.translateBtn.textContent = t('translateButton'));
|
||||||
els.themeBtn && (els.themeBtn.textContent = state.theme === 'dark' ? t('themeDark') : t('themeLight'));
|
els.themeBtn && (els.themeBtn.textContent = t('themeButton'));
|
||||||
els.rebootBtn && (els.rebootBtn.textContent = t('rebootButton'));
|
els.rebootBtn && (els.rebootBtn.textContent = t('rebootButton'));
|
||||||
if (els.dmesgToggle) {
|
if (els.dmesgToggle) {
|
||||||
els.dmesgToggle.textContent = state.dmesgOpen ? t('hide') : t('show');
|
els.dmesgToggle.textContent = state.dmesgOpen ? t('hide') : t('show');
|
||||||
|
|||||||
Reference in New Issue
Block a user