如何在流星中更改“configure google”或“configure github”布局的弹出窗口?

如何在流星中更改“configure google”或“configure github”布局的弹出窗口?

问题描述:

我想在流星的Google/Github OAuth提供商的配置弹出窗口中添加一个名为“配置其他服务”的附加按钮,以及现有的按钮“保存配置”和“我将在稍后完成”。如何在流星中更改“configure google”或“configure github”布局的弹出窗口?

可以针对上述文件布局更改哪个文件或服务配置参数或文件?

要更改弹出窗口的内容,您需要修改生成弹出窗口的HTML模板。

在这种情况下,模板被称为_configureLoginServiceDialog,它是该文件的accounts-ui-unstyledlogin_buttons_dialogs.html 中发现的。当您添加任何accounts-ui包变体时,accounts-ui-unstyled被添加为依赖项。

但由于模板位于包中,因此无法直接对其进行修改。

您需要做的是在您的项目中创建您自己的accounts-ui-unstyled包(原文位于:https://github.com/meteor/meteor/tree/devel/packages/accounts-ui-unstyled),然后meteor remove accounts-ui-unstyledmeteor add my-own:accounts-ui-unstyled

+0

谢谢@JesperWe!这样可行! –