fix(web): stop spurious page refresh on account menu open; plugin log auto-refresh as switch

Two unrelated frontend fixes:

- LanguageSelector mounts each time the sidebar account dropdown opens and
  unconditionally called i18n.changeLanguage() on mount, emitting a
  languageChanged event even when the language was unchanged. That handed
  every useTranslation() consumer a fresh `t` reference, re-running effects
  keyed on `t` (e.g. the plugins page system-status fetch) and surfacing as
  a page "refresh". Guard the call so it only fires on an actual change.

- Plugin logs auto-refresh control changed from a toggle Button to a
  Switch + Label; the on/off button i18n keys are replaced by a single
  static logsAutoRefresh label across all 8 locales.
This commit is contained in:
RockChinQ
2026-06-21 11:58:01 -04:00
parent 9daf22d661
commit 812b1fff4c
10 changed files with 33 additions and 28 deletions
+1 -2
View File
@@ -566,8 +566,7 @@ const zhHant = {
tabLogs: '日誌',
logsLevelAll: '全部級別',
logsRefresh: '重新整理',
logsAutoRefreshOn: '自動重新整理:開',
logsAutoRefreshOff: '自動重新整理:關',
logsAutoRefresh: '自動重新整理',
logsEmpty: '暫無日誌。外掛透過 logger 列印的日誌會顯示在這裡。',
fileUpload: {
tooLarge: '檔案大小超過 10MB 限制',