fix(dashboard): update aiocqhttp tutorial links to new docs path#7038
fix(dashboard): update aiocqhttp tutorial links to new docs path#7038Soulter merged 1 commit intoAstrBotDevs:masterfrom
Conversation
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- For the updated security warning link in
AddNewPlatform.vue, consider including an anchor to the specific security section onaiocqhttp.html(if one exists) so users land directly on the relevant guidance rather than the top of the page.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the updated security warning link in `AddNewPlatform.vue`, consider including an anchor to the specific security section on `aiocqhttp.html` (if one exists) so users land directly on the relevant guidance rather than the top of the page.
## Individual Comments
### Comment 1
<location path="dashboard/src/components/platform/AddNewPlatform.vue" line_range="261-263" />
<code_context>
<p>{{ tm('dialog.securityWarning.aiocqhttpTokenMissing') }}</p>
<span><a
- href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7"
+ href="https://docs.astrbot.app/platform/aiocqhttp.html"
target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
</v-card-text>
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Consider adding rel="noopener noreferrer" for security when using target="_blank".
This prevents the new tab from accessing `window.opener` and potentially manipulating or redirecting the original page.
```suggestion
<span><a
href="https://docs.astrbot.app/platform/aiocqhttp.html"
target="_blank"
rel="noopener noreferrer">{{ tm('dialog.securityWarning.learnMore') }}</a></span>
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| <span><a | ||
| href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7" | ||
| href="https://docs.astrbot.app/platform/aiocqhttp.html" | ||
| target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span> |
There was a problem hiding this comment.
🚨 suggestion (security): Consider adding rel="noopener noreferrer" for security when using target="_blank".
This prevents the new tab from accessing window.opener and potentially manipulating or redirecting the original page.
| <span><a | |
| href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7" | |
| href="https://docs.astrbot.app/platform/aiocqhttp.html" | |
| target="_blank">{{ tm('dialog.securityWarning.learnMore') }}</a></span> | |
| <span><a | |
| href="https://docs.astrbot.app/platform/aiocqhttp.html" | |
| target="_blank" | |
| rel="noopener noreferrer">{{ tm('dialog.securityWarning.learnMore') }}</a></span> |
There was a problem hiding this comment.
Code Review
This pull request updates documentation links for the aiocqhttp platform in both the AddNewPlatform component and the platform utility mapping. Feedback was provided regarding the removal of a specific anchor in the security warning link, which may make it more difficult for users to find relevant safety information on the new documentation page.
| <p>{{ tm('dialog.securityWarning.aiocqhttpTokenMissing') }}</p> | ||
| <span><a | ||
| href="https://docs.astrbot.app/deploy/platform/aiocqhttp/napcat.html#%E9%99%84%E5%BD%95-%E5%A2%9E%E5%BC%BA%E8%BF%9E%E6%8E%A5%E5%AE%89%E5%85%A8%E6%80%A7" | ||
| href="https://docs.astrbot.app/platform/aiocqhttp.html" |
There was a problem hiding this comment.
The previous link included an anchor (#附录-增强连接安全性) that directed users to a specific section on connection security. The new link points to the top of the page, which makes it harder for users to find this critical information. To improve usability, please consider adding an anchor to the new URL if a corresponding section exists on the new documentation page.
Summary
Fix OneBot (
aiocqhttp) tutorial links in Dashboard that still point to the oldnapcatpath.dashboard/src/utils/platformUtils.jsaiocqhttptutorial URL:.../platform/aiocqhttp/napcat.html->.../platform/aiocqhttp.htmldashboard/src/components/platform/AddNewPlatform.vue.../deploy/platform/aiocqhttp/napcat.html#...->.../platform/aiocqhttp.htmlWhy
The docs page has been migrated to:
The old links can lead to wrong pages / stale routes.
Related Issue
Closes #7037
Test
aiocqhttp/napcat.htmlordeploy/platform/aiocqhttplinks remain in repo.Summary by Sourcery
Update dashboard links to point OneBot (aiocqhttp) users to the new documentation URL.
Bug Fixes: