feat(settings): add developer settings section and mermaid rendering switch#77
feat(settings): add developer settings section and mermaid rendering switch#77gushishang wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4009823fbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const languageItem = settingsConfig[0]?.items.find((item) => item.key === 'language') | ||
| if (languageItem?.type === 'link') { | ||
| languageItem.options = createLanguageOptions() |
There was a problem hiding this comment.
Refresh binary option labels after language switch
After changing i18n.global.locale.value, this callback only rebuilds the language selector options, but the mermaid and debugger selects keep the old createBinaryOptions() labels because their option arrays are created once at config initialization. In practice, switching language in Settings leaves those dropdowns translated in the previous locale until a reload/reopen, which is a regression from the previous behavior that refreshed debugger options on language change.
Useful? React with 👍 / 👎.
|
Its not a bug.Its a feature
在 2026-05-17 23:18:46,"chatgpt-codex-connector[bot]" ***@***.***> 写道:
@chatgpt-codex-connector[bot] commented on this pull request.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:4009823fbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Open a pull request for review
Mark a draft as ready
Comment ***@***.*** review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting ***@***.*** address that feedback".
In src/config/user.config.ts:
+ const languageItem = settingsConfig[0]?.items.find((item) => item.key === 'language')
if (languageItem?.type === 'link') {
languageItem.options = createLanguageOptions()
Refresh binary option labels after language switch
After changing i18n.global.locale.value, this callback only rebuilds the language selector options, but the mermaid and debugger selects keep the old createBinaryOptions() labels because their option arrays are created once at config initialization. In practice, switching language in Settings leaves those dropdowns translated in the previous locale until a reload/reopen, which is a regression from the previous behavior that refreshed debugger options on language change.
Useful? React with 👍 / 👎.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Summary
Testing
|
|
@codex
At 2026-05-20 18:22:37, "chatgpt-codex-connector[bot]" ***@***.***> wrote:
chatgpt-codex-connector[bot] left a comment (NetLogo-Mobile/plweb2#77)
Summary
Fixed the Settings i18n regression by adding refreshLinkOptionsAfterLocaleSwitch() to rebuild translated option lists for all relevant link items after locale changes (language, mermaid, and debugger). src/config/user.config.tsL24-L32
Updated the language setting callback to call the new refresh helper immediately after i18n.global.locale.value is changed, so binary dropdown labels update without reload/reopen. src/config/user.config.tsL44-L47
Committed the fix on the current branch with commit message: fix(settings): refresh binary options on language switch (commit 1dc6907).
Created a follow-up PR message via make_pr summarizing this incremental fix on top of the original PR.
Testing
✅ npm run build
View task →
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Motivation
Description
src/config/user.config.ts中添加mermaid开关以及新的developer分组,包含apiBaseUrl与staticBaseUrl两个input类型的配置项,并将debugger与exportLogs移入该分组。src/views/Settings.vue中增加input控件支持(使用n-input),实现handleInputChange、持久化到userConfig并保留回调机制以即时生效或触发提示。src/services/utils.ts的getPath中读取userConfig.apiBaseUrl和userConfig.staticBaseUrl(回退到import.meta.env的默认值),以支持自定义服务器与图床。src/services/pltxt2htm/advancedParser.ts中根据userConfig.mermaid的值决定是否执行 Mermaid 渲染流程;同时加入对storageManager的引用以读取设置。src/i18n/zh.ts,src/i18n/en.ts,src/i18n/de.ts,src/i18n/ja.ts,src/i18n/fr.ts中添加/更新了developer、mermaid、apiBaseUrl、staticBaseUrl等文案键以保持多语言一致性。Testing
npm run lint:i18n,i18n 检查通过(i18n check passed)。npm run build,项目构建成功(生成dist/,构建完成且无阻断错误)。Codex Task