-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
浏览器打开链接 #777
Comments
Issue分析及修改建议问题描述:用户希望在ChatALL应用中增加一个选项,以通过默认的网页浏览器打开链接,而不是通过ChatALL的新窗口。这是因为用户的浏览器中有许多插件,而ChatALL打开的新窗口没有。 解决方案:
示范代码: 结论:这样的改动可以在不影响当前用户体验的前提下,为希望使用默认浏览器插件的用户提供便利,增强了应用的灵活性和用户满意度。 注意:人工智能生成内容仅供参考。 |
Issue #777 分析和具体化的修改建议Vuex Store更新// src/store/index.js
const store = createStore({
state: {
// 其他状态...
openLinksExternally: false, // 默认为false,使用内部窗口
},
mutations: {
// 其他mutations...
toggleOpenLinksExternally(state) {
state.openLinksExternally = !state.openLinksExternally;
},
},
}); Electron主进程中的更改// Vue组件内请求打开外部链接
if (this.$store.state.openLinksExternally) {
ipcRenderer.send('open-link-externally', 'https://example.com');
} else {
window.open('https://example.com');
}
// Electron主进程监听打开链接的请求
ipcMain.on('open-link-externally', (event, url) => {
shell.openExternal(url);
}); 设置页面中的UI更新在设置页面添加一个开关以让用户可以选择是否希望通过外部浏览器打开链接。 请注意这些示范代码基于对项目结构的假设,实际需要根据项目的实现细节进行调整和完善。 注意:人工智能生成内容仅供参考。 |
If it’s the login link, it must opened through the ChatALL to ensure the chatbot functions properly. |
Is your feature request related to a problem? / 你想要的功能和什么问题相关?
通过ChatALL应用打开的新窗口不如在浏览器上打开的网页方便我操作,因为我的浏览器有很多插件而ChatALL打开的新窗口没有。
The new window opened through the ChatALL application is not as convenient as the web page opened on the browser because my browser has many plugins and the new window opened by ChatALL is not.
Describe the solution you'd like. / 你想要的解决方案是什么?
在设置里增加一个选项,通过浏览器打开链接,而不是通过ChatALL的新窗口。
An option is added to the settings to open the link via the browser instead of via the new ChatALL window.
Describe alternatives you've considered. / 你考虑过的其他方案是什么?
No response
Additional context / 其他信息
No response
The text was updated successfully, but these errors were encountered: